Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "jq"
-
Reinventing the wheel can be very valuable. Even if you don't create a better wheel, you'll learn a lot about how it works, which can really help you out in the long term.16
-
- Wife logs onto uni website Saturday at 11pm to drop an elective, drop deadline is Monday
- Goes to course list and chooses course to drop
- "Course modification is available Monday-Saturday from 6am to 10pm"
😑 are you kidding me..
Like 😡😠 websites don't have business hours! Servers don't need nights or weekends off!! It's ridiculous to think that someone had to code this block for these hours, more effort than just leaving it always available.6 -
GTX 1080 now down to $499 due to 1080ti release!
..bought an aftermarket 1070 for $450 just a few months ago.
I'm not mad, just disappointed.8 -
I saw a post about headphones that reminded me.
Last week I was trying to find out why my code wasn't working. At about an hr in my wife asks me "honey, why do you have headphones on but they aren't plugged into anything?"
I looked at her partially spaced and thought to myself "I have headphones on?!?!"
Lol I tend to do this a lot.4 -
Saw this on Facebook and couldn't help but share here! 😂
A young woman submitted the tech support message below (about her relationship to her husband) presumably did it as a joke…
The query:
Dear Tech Support,
’Last year I upgraded from Boyfriend 5.0 to Husband 1.0 and noticed a distinct slowdown in overall system performance, particularly in the flower and jewelry applications, which operated flawlessly under Boyfriend 5.0.
In addition, Husband 1.0 uninstalled many other valuable programs, such as: Romance 9.5 and Personal Attention 6.5, and then installed undesirable programs such as: NBA 5.0, NFL 3.0 and Golf Clubs 4.1.
Conversation 8.0 no longer runs, and House cleaning 2.6 simply crashes the system. Please note that I have tried running Nagging 5.3 to fix these problems, but to no avail.
What can I do?
Signed,
Desperate
The response (that came weeks later out of the blue):
Dear Desperate,
“First keep in mind, Boyfriend 5.0 is an Entertainment Package, while Husband 1.0 is an operating system. Please enter command: I thought you loved me.html and try to download Tears 6.2 and do not forget to install the Guilt 3.0 update. If that application works as designed, Husband 1.0 should then automatically run the applications Jewelry 2.0 and Flowers 3.5.
However, remember, overuse of the above application can cause Husband 1.0 to default to Grumpy Silence 2.5, Happy Hour 7.0 or Beer 6.1. Please note that Beer 6.1 is a very bad program that will download the Farting and Snoring Loudly Beta.
Whatever you do, DO NOT, under any circumstances, install Mother-In-Law 1.0 (it runs a virus in the background that will eventually seize control of all your system resources.)
In addition, please, do not attempt to re-install the Boyfriend 5.0 program. These are unsupported applications and will crash Husband 1.0.
In summary, Husband 1.0 is a great program, but it does have limited memory and cannot learn new applications quickly. You might consider buying additional software to improve memory and performance. We recommend: Cooking 3.0.Good Luck!’
Good Luck!3 -
Applied to a Jr. Dev job and was hired as a Digital Marketer — I can deal with this, I’m AdWords & Analytics certified. What I can’t abide is that I spent the last year working my ass off learning to code and the person next to me with the Jr. Dev position only uses DIVI and has zero inclination to study, learn or write basic HTML & CSS—much less PHP. I’m not an expert by any means but I love programming, I love the problem solving, the challenges and the culture of it all. So far, and these are only two examples, I’ve shown him how to use the target attribute to open a page as a new tab, and how to register a nav in the functions.php file to create a menu but he is unwilling to even attempt it. Rather, he told me that I was too technical and that no one would be using code in this day and age.
For the record, I think DIVI is a cool platform, it’s clear that my boss knows nothing about code to be fair and I love my job— this is my only issue so far😂 I just needed to rant.5 -
How could I only name one favorite dev tool? There are a *lot* I could not live without anymore.
# httpie
I have to talk to external API a lot and curl is painful to use. HTTPie is super human friendly and helps bootstrapping or testing calls to unknown endpoints.
https://httpie.org/
# jq
grep|sed|awk for for json documents. So powerful, so handy. I have to google the specific syntax a lot, but when you have it working, it works like a charm.
https://stedolan.github.io/jq/
# ag-silversearcher
Finding strings in projects has never been easier. It's fast, it has meaningful defaults (no results from vendors and .git directories) and powerful options.
https://github.com/ggreer/...
# git
Lifesaver. Nough said.
And tweak your command line to show the current branch and git to have tab-completion.
# Jetbrains flavored IDE
No matter if the flavor is phpstorm, intellij, webstorm or pycharm, these IDE are really worth their money and have saved me so much time and keystrokes, it's totally awesome. It also has an amazing plugin ecosystem, I adore the symfony and vim-idea plugin.
# vim
Strong learning curve, it really pays off in the end and I still consider myself novice user.
# vimium
Chrome plugin to browse the web with vi keybindings.
https://github.com/philc/vimium
# bash completion
Enable it. Tab-increase your productivity.
# Docker / docker-compose
Even if you aren't pushing docker images to production, having a dockerfile re-creating the live server is such an ease to setup and bootstrapping the development process has been a joy in the process. Virtual machines are slow and take away lot of space. If you can, use alpine-based images as a starting point, reuse the offical one on dockerhub for common applications, and keep them simple.
# ...
I will post this now and then regret not naming all the tools I didn't mention. -
I hate these idiots that post source code examples as an image just so they can keep their cool highlighting and style. How the fuck am I supposed to test that without re-typing the whole thing myself? Ever try OCR on source code? Not too great, is it.12
-
Apple app signing and certificates: how do people even circumvent/hack these things? I'm hardly able to do it legit.4
-
Var X1 = "" ;
Var X2 = "" ;
Var A = "" ;
Var A2 = 1;
...why. Just why ever name variables like that.1 -
Internal mail form CIO's office:
"Thank you for being part of the internal trial for NPMe, we have decided to remove this tool in favour of Artifactory because of its support for multiple platforms and tools. We are sorry for the inconvenience, here is a link to migration scripts ..."
Migration "script" readme, please clone this repo, create file A, and B, and install these 2 dependencies.
Dependency 1:
- "install via homebrew ..."
- .... homebrew needs to update, checking for updates
- 10 mins later = Update failed, please upgrade to Ruby version 2.3
- Installs ruby version manager
- GPG signature verification failed
- Install GPG v2 + accept keys
- Install ruby version manager
- "please execute this command before running rvm"
- execute command
- "rvm install ruby-2.3"
- Install failed, please see log file
- Opens log file
- "Xcode on its own is not sufficient, please install xcode cli tools"
- Install xcode tools
- 5 minutes later -> "rvm install ruby-2.3"
- 10 minutes later "brew install jq"
Ok back to read me, "login to Artifactory, go here and copy paste XXX."
- Login to Artifactory
- Eventually find repo
- Login again to actually see credentials for some reason
- Screen doesn't match instructions in readme
- Click around
- Back to readme
- Back to artifactory
- Login again
- Execute command auth / setup command
- Copy contents to npmrc file .... now all my scoped packages are going to point to 1 specific repo
Fuck the migration, Fuck these shitty instructions, i'll set them all up again manually. See tags below for further opinions on this matter.undefined fuck ruby fuck homebrew fuck this fuck shitty cli fuck artifactory fuck cli fuck jq fuck rvm2 -
So I just spent the last few hours trying to get an intro of given Wikipedia articles into my Telegram bot. It turns out that Wikipedia does have an API! But unfortunately it's born as a retard.
First I looked at https://www.mediawiki.org/wiki/API and almost thought that that was a Wikipedia article about API's. I almost skipped right over it on the search results (and it turns out that I should've). Upon opening and reading that, I found a shitload of endpoints that frankly I didn't give a shit about. Come on Wikipedia, just give me the fucking data to read out.
Ctrl-F in that page and I find a tiny little link to https://mediawiki.org/wiki/... which is basically what I needed. There's an example that.. gets the data in XML form. Because JSON is clearly too much to ask for. Are you fucking braindead Wikipedia? If my application was able to parse XML/HTML/whatevers, that would be called a browser. With all due respect but I'm not gonna embed a fucking web browser in a bot. I'll leave that to the Electron "devs" that prefer raping my RAM instead.
OK so after that I found on third-party documentation (always a good sign when that's more useful, isn't it) that it does support JSON. Retardpedia just doesn't use it by default. In fact in the example query that was a parameter that wasn't even in there. Not including something crucial like that surely is a good way to let people know the feature is there. Massive kudos to you Wikipedia.. but not really. But a parameter that was in there - for fucking CORS - that was in there by default and broke the whole goddamn thing unless I REMOVED it. Yeah because CORS is so useful in a goddamn fucking API.
So I finally get to a functioning JSON response, now all that's left is parsing it. Again, I only care about the content on the page. So I curl the endpoint and trim off the bits I don't need with jq... I was left with this monstrosity.
curl "https://en.wikipedia.org/w/api.php/...=*" | jq -r '.query.pages[0].revisions[0].slots.main.content'
Just how far can you nest your JSON Wikipedia? Are you trying to find the limits of jq or something here?!
And THEN.. as an icing on the cake, the result doesn't quite look like JSON, nor does it really look like XML, but it has elements of both. I had no idea what to make of this, especially before I had a chance to look at the exact structured output of that command above (if you just pipe into jq without arguments it's much less readable).
Then a friend of mine mentioned Wikitext. Turns out that Wikipedia's API is not only retarded, even the goddamn output is. What the fuck is Wikitext even? It's the Apple of wikis apparently. Only Wikipedia uses it.
And apparently I'm not the only one who found Wikipedia's API.. irritating to say the least. See e.g. https://utcc.utoronto.ca/~cks/...
Needless to say, my bot will not be getting Wikipedia integration at this point. I've seen enough. How about you make your API not retarded first Wikipedia? And hopefully this rant saves someone else the time required to wade through this clusterfuck.12 -
Fuck jQuery. The only reason I see anyone using it legitemately is because of backwards compatibility. Almost every jq method is either native js or native css. The problem is, some devs become practically dependent on a library. By then, they are no longer js devs. They are jQuery devs. When you find yourself going to the docs of a lib before native methods 9 times out of 10 you've gone past the turning point. When you find yourself including jQuery instinctively, you're gone. StackOverflow is a great example of this:
Question - 1 up
Pure JS answer - 0 ups
jQuery answer (same length) - 2 ups and accepted
Come on man. It's 2018! We shouldn't be writing jQuery anymore. Native methods ftw!15 -
Fucking windows automatic reboots! They seriously need to fuck off with that. As of this morning I have a finance person who can't log on, a floor manager that can't schedule his employees and a robotics controller pc that rebooted and didn't save the changes I made! Seriously, FUCK OFF!14
-
For some reason the backend kept throwing errors when I tried to save a long string containing markdown. Initially I assumed I must be escaping things incorrectly but that all looked fine. Asked the backend guy to take a look.
Turned out that in order to count the number of words they were using a regex, which seems fine, unless you construct the regex out of my string and run that over the word count regex... 🤔 -
Thank you devrant for the awesome stickers i put one on my laptop and one on my on my desktop the last one i may put on my car.
-
Seriously what's wrong with the market right now, this is basically what some job ads said. They were even from the same company
Frontend job ad: are you a rainbow rockstar developer who just loves to code OwO(unpaid overtime) [buzzwords...]
Embedded systems job ad:
Serious job description
Required experience in c/c++
Other non bs stuff8 -
Not much of a haxk, just a stupid thing that works.
In my hs videogame programming class, the teacher has this program called LANSchool (most of you have heard of it) which he used to restrict apps/browsers to the point of uselessness . He didn't (and still doesn't) know anything about the stuff he 'teaches', most is tought by TAs.
Here's the dumb part: he WHITELISTED APPS. A friend, one of the TAs, figured out that if you rename something 'Google Chrome', lanschool wouldn't care. So I got Chromium (for unblocked internet) and switched its blue icons in the exe for original chrome icons, then renamed it 'Google Chrime'. Woo.
LANSchool is such a bad program (you can even unblock a site by spamming the F key for refresh).
The teacher did, and still does, treat the TAs like trash. He's a babysitter while students listen to online vids and the TAs.2 -
Why do people still use both curl or wget? There's httpie and it's awesome!
http PUT your-host.com header-name:value parameter=value
Profit!
And it formats the response for json without jq. It will just show binary for binary content and you download by adding the download flag.
Yet why is curl still the default!?4 -
Looking at some new dev tools I spotted this gem:
"If install fails, keep trying to install a few times."
Thanks for the tip!1 -
Just in case any other devranters are in China, here is this morning's updated chart if you have wechat you can follow this account, stay safe and wash your hands5
-
Whenever I see a website ask
1. Accept all cookies
2. Customize selection
I can see what they're really saying...
1. Accept! and I'll fuck off out of your way and let you read.
2. So you wanna read the content heh? Step into our office. Ok then, lets go through them one-by-one and you can explain to me why you think you don't need that cookie. and then MAYBE we'll fuck off our of your face so you can read the scant few lines of text standing between you and finishing your homework/job/whatever.18 -
Working continuously on a task for like 3 hrs, cant get it done
*goes out, mind refreshed and completes the same task in 5 mins*1 -
One crucial lesson I learned while diving into programming:
Use various learning resources. Everyone explains things a little different.
You can understand stuff much easier. -
Samsung has a bug in their galaxy software that essentially makes you unable to store anything that's not in the root folder on an additional sd card. After 2 years, they still have the bug. Additionally some phones will shit themselves if you try to format an sd card with it
How the fuck can they just leave significant bugs. The whole just get a new phone every other year mentality/industry style is both wasteful and seems to contribute to garbage software7 -
Writing my code, go to run it and boom its not working. I pull up stack over flow to get some insight. At this point i was working on my code for countless hours and became a bit annoyed so i decided to copy what someone wrote on stack over flow delete my code where i thought it was flawed. I run it and Blam bugged the hell outa my code. So i undo go back to my original. Turn to a friend and ask what do you thinks going wrong. He resets my browser and there it goes it works. I just kind of gave him a blank stare and thought to myself Im a dumbass!1
-
Spending the day sending emails back and forth with your client because they can't be bothered to prepare a single overview of what properties the endpoint expects, and instead expect you to piece it together from 6 PDFs of which at least 2 contain contradicting information, another is outdated, and the last one seems to have been exported from word and is missing half the content.
Fun times! -
My wife says to me we need a new car..
Im sitting here trying to decide what I need more a car or a new computer.
Decisions, decision..7 -
!rant :) FUUUUUUUUDGE YEAAAAH!
it's so satisfying when you've been working on a huge ass thing(when maybe you should have tested individual parts) and it just fucking works as intended amazing, I love it!
It's so beautiful to see your own compiler(jk just scanner+parser atm) compile code successfully -
Even seniors make mistakes. In case you were ever doubting yourself - just remember that.
I just had a very senior level programmer on my staff add a function to a production system that issues an SQL UPDATE query without a WHERE clause. Fortunately, only the 1st entry succeeded and the rest failed due to "duplicate record" errors. Clearly he had intended to do a SELECT to check if an entry was present. If it was present, do an UPDATE, otherwise do an INSERT (think UPSERT - but done manually). However instead in the insert part they were both UPDATE's. The first update was normal looking but the second UPDATE was just this weird malformed-looking thing where he tried to do an UPDATE but to every field including the key fields. Clearly he was thinking about an insert but actually writing it as an update. Every now and then I need to remind myself that these things happen. The guy's not dumb - just made a mistake.
I'm just happy it "failed unsuccessfully".4 -
Dear everyone,
Stop turning off the monitors. That doesn't sign you out or turn off the computer, it just makes the next person wonder what's taking so long.1 -
Learning rust with a very tight deadline. Not something I'd recommend since you will be likely to spend more time trying to get your project to compile than getting on with your project.
In my case the project was a compiler(in hindsight I'd have picked ocaml or scala instead).4 -
My personal top 4:
good tea,
good booze,
time with gf,
time with friends,
Just clears my head, but doing any of my other hobbies can really help because it just gets me in a different headspace -
Today after longer vacation I came back to work.
Edit: wrote this rant long time ago, but never finished. Was too pissed.
Some easy meetings, then wanted to start on an easy job.
Just migrating some things from bash regex voodoo to proper tools like JQ.
Finished in roughly 1 h. Lovely.
Made some tea, ate some cookies.
Set up dev environment, found no documentation what so ever, got it running after half an hour.
Annoying, but ok.
Then I tried my scripts...
They worked... Except they didn't.
Console log empty, response code 200 with state: GENERATE_NO_FILES.
Eh. Fuck you. Just fuck you.
Fixed the logging configuration, which was broken since uhm... 2 years plus?
Well... Another half another hour gone...
Kinda pissed now.
Still script return failed...
Poking and trying to sprinkle debug all over that shit cause everything seems ... An incohesive, inconsistent diarrhea.
3 hours later...
Made the ticket to rewrite it.
I did nothing wrong at all.
The API just has no workflow at all. The
*seperate* API calls have to be in an **specific** order - as otherwise the generation will fail, as the prerequisites for the generation are not fulfilled.
Yeah. Completely logical. Especially not to give out any kind of warning or an error message like requirements not met, blablabla.
I drank that evening 2 six packs of beer. I was raging mad....
Then gave that shit to another manager, as I never want to touch that nuclear waste again....
How can someone be so brain damaged -.-1 -
Okay so for all of you who think that you can't do shit without stackoverflow. I'll tell you this, fuck SO. There's this ancient technique of programmers of old probably just about 20-25 years ago called RTFM. Why bother copy pasting some one else's spaghetti(that you might not fully understand) when you can write your own better code! (said in good faith). When something is behaving strange or you don't know what something requires just hit the docs or manual and read about the api because it is describes not only what it wants and needs but also what it does. So try this because it might have more information that you need than stack overflow might tell you12
-
Sending a request to link accounts.
Response: {
errorCode: 200009,
errorMessage: 'Accounts Linked'
}
Wait what? So I checked the docs and this is actually how it is supposed to work... >_<1 -
Besides firefox and emacs there is also Linux, the library emacs uses to interact with the computer hardware
-
I feel like front end guys and gals are basically the folks that make the back end guys and gals look good for the boss. Not in a straight dev shop, but when your boss thinks html is a programming language...3
-
I feel like I know what I shouldn't know. I know a little about using jQ and JS (mainly little plugins) but I can't code js from scratch.
I use vanilla html and css and my environment is notepad++.
I feel like I should know SASS, Pug and use Webstorms or some other professional IDE. And learn js.
Which preprocessors do you prefer? Which IDEs and which point to start learning js from scratch?8 -
Funnily enough my initial experience with Java at uni dampened my enthusiasm for programming I had harboured as a kid. Discontinued the course and studied something else. Cue three years later; took an elective programming in C and some other coding subjects and fell in love with coding. Ended up writing code for my bachelor thesis, lots of free time coding, teaching the elective I had taken only a year before, and now it's my job and I love it. :)
-
!rant
Got my new pc up and running, asrock x370 killer sli/ac mobo, ryzen 2200g cpu and radeon rx550 with 12g ram (don't ask). Nothing fancy but sure beats my old am2 system! New pc is so quiet :D9 -
We came across a bug that only manifested itself in Edge if, and only if, the developer console was closed. Which we only discovered once it went live since during testing we always had the console open to monitor things... D:2
-
Things nobody told you when starting to learn a new programming language:
Congratulations! You became a collector. From now on you will collect websites, books and a ton of related software.4 -
Devrant works surprisingly well here in China, except for saving pictures everything else works(mostly) but it's still nice to be able to use it here
Anyone else have similar experience in their country?11 -
Emacs, once you gotten familiar it's just the best and there's lots of packages to make everything easy to do from emacs. Also it's very configurable
-
Yo, so does anyone here have any experience about using Windows or mac printer drivers on GNU+Linux? So far my strategy has been to try to extract a ppd file from the Windows/mac drivers. It's an epilog fusion laser printer/engraver5
-
Rust is a nice language but the learning curve is quit steep so if you don't have time to pick it up I'd suggest using another language especially for assignments if they give you the choice. Otherwise you might like me and my classmates spend more time fighting the rust compiler than doing the assignment7
-
Anybody else really annoyed at all these people getting mad at zuckerburg? Like, I've always questioned privacy of the internet in general. If you're dumb enough to put sensitive info on the internet (especially on social media) then you shouldn't have the right to complain about privacy. It's your responsibility to protect your information.3
-
!rant very happy to see a development at my uni towards having programming(+related courses) being more and more examined throughout the course through assignments and seminars where you have to explain what you did and why. I think this is a much more suitable solution for some courses best done with practise than having a paper based exam.3
-
Fuck google's link hijacking!
If you don't like it, go into devtools and type:
rwt = null;
-- You're welcome.7 -
My dad showed me vb.net when I was 13 or something and just went ahead to try to make different types of games with Windows forms, it was a lot of fun even if the games were garbage(I had a gazillion buttons on one because I couldn't figure out how to make the logic reusable with the hp bar); it is what put me on the programmer/engineering path1
-
Do you have a programmers union in your country?
In my country we have a general union for all different kinds of jobs and a engineers union. Maybe if developers had a dev union there would perhaps be less bs11 -
Any tips for doing well on the technical interview?
It's my first time doing a technical interview so any tips are welcome. It is for a (paid) field application engineering internship. They said it would mostly be regarding electronics10 -
An example-driven overview of the jq command using NASA NeoWs API
https://monades.roperzh.com/weekly-... -
If I manage to complete my current project as intended then it will be my most successful project so far
-
I have multiple ones, my uni has for one several amazing professors that I admire. Then there's there's the classics Thompson, kernighan, djikstra et al. T.A.D, uncle Bob and last but not least Stallman
All of them has provided insights, knowledge and a better way to view code and software -
Type coercion in JavaScript. I appreciate it's trying to help me out, but it'd be cool if it just told me I made a mistake.1
-
Not sure if reading tech blogs in bed while falling half asleep is a sign of brilliance or insanity.2
-
I had to import some resources into infrastructure-as-code ( IaC ) for a new project. I found the right tool for the job and started working on it.
But I had a lot of resources to import. I decided to use the API of the source provider and transform them into the configuration format required for the IaC tool.
After spending a good half of a day scripting with a combination of `jq` and `yq` and another bunch of tools, I finally completed the import yesterday.
Today, I had to refer to the documentation of the IaC tool for something else and I found that there was a built-in command for pulling resources from the target to the source ( basically what I did with my script ). 🤦
( I hope my manager doesn't find out that I 'wasted' half a day when I could have completed the job within around an hour )
Lesson learnt the hard way ( again ) : READ THE F**KING MANUAL even if it may seem trivial.
*thought to self* : YTF won't you learn this simple thing after so many incidents? RTFM! -
What container/virtualisation technology do you guys prefer?
Also I've been thinking of picking up either k8s or docker, mainly docker for ease of deployment or do you think it's wortb learning both perhaps? I do know they have a bit of different use cases6 -
I believe that there's some evil dark magic in the BEAM that detects if the user or developer is on a non *nix machine and then purposefully throws all kinds of strange errors or just fucking blows itself up for no reason. Take the shit to a *nix machine and it just works like magic and is easy to work with which is part of the reason why I love it and the ecosystem.
-
Anyone else get janky scrolling when reading the comments on a rant? I don't know what kinda funky thing they tried to do with the scrolling but it always strongly resists me scrolling down the page.
Anyways, I have to do this in the DevTools console to stop it:
document.body.innerHTML = document.body.innerHTML.replaceAll('scroll','');4