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 - "binary text"
-
*Now that's what I call a Hacker*
MOTHER OF ALL AUTOMATIONS
This seems a long post. but you will definitely +1 the post after reading this.
xxx: OK, so, our build engineer has left for another company. The dude was literally living inside the terminal. You know, that type of a guy who loves Vim, creates diagrams in Dot and writes wiki-posts in Markdown... If something - anything - requires more than 90 seconds of his time, he writes a script to automate that.
xxx: So we're sitting here, looking through his, uhm, "legacy"
xxx: You're gonna love this
xxx: smack-my-bitch-up.sh - sends a text message "late at work" to his wife (apparently). Automatically picks reasons from an array of strings, randomly. Runs inside a cron-job. The job fires if there are active SSH-sessions on the server after 9pm with his login.
xxx: kumar-asshole.sh - scans the inbox for emails from "Kumar" (a DBA at our clients). Looks for keywords like "help", "trouble", "sorry" etc. If keywords are found - the script SSHes into the clients server and rolls back the staging database to the latest backup. Then sends a reply "no worries mate, be careful next time".
xxx: hangover.sh - another cron-job that is set to specific dates. Sends automated emails like "not feeling well/gonna work from home" etc. Adds a random "reason" from another predefined array of strings. Fires if there are no interactive sessions on the server at 8:45am.
xxx: (and the oscar goes to) fuckingcoffee.sh - this one waits exactly 17 seconds (!), then opens an SSH session to our coffee-machine (we had no frikin idea the coffee machine is on the network, runs linux and has SSHD up and running) and sends some weird gibberish to it. Looks binary. Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.
xxx: holy sh*t I'm keeping those
Credit: http://bit.ly/1jcTuTT
The bash scripts weren't bogus, you can find his scripts on the this github URL:
https://github.com/narkoz/...53 -
1. There are 10 types of people in the world: those who understand binary, and those who don't.
2. How many programmers does it take to change a light bulb?
None. It's a hardware problem.
3. A SEO couple had twins. For the first time they were happy with duplicate content.
4. Why is it that programmers always confuse Halloween with Christmas?
Because 31 OCT = 25 DEC
5. Why do they call it hyper text?
Too much JAVA.
6. Why was the JavaScript developer sad?
Because he didn't Node how to Express himself
7. In order to understand recursion you must first understand recursion.
8. Why do Java developers wear glasses? Because they can't C#
9. What do you call 8 hobbits?
A hobbyte
10. Why did the developer go broke?
Because he used up all his cache
11. Why did the geek add body { padding-top: 1000px; } to his Facebook profile?
He wanted to keep a low profile.
12. An SEO expert walks into a bar, bars, pub, tavern, public house, Irish pub, drinks, beer, alcohol
13. I would tell you a UDP joke, but you might not get it.
14. 8 bytes walk into a bar, the bartenders asks "What will it be?"
One of them says, "Make us a double."
15. Two bytes meet. The first byte asks, "Are you ill?"
The second byte replies, "No, just feeling a bit off."
16. These two strings walk into a bar and sit down. The bartender says, "So what'll it be?"
The first string says, "I think I'll have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy~~owmc63^Dz x.xvcu"
"Please excuse my friend," the second string says, "He isn't null-terminated."
17. "Knock, knock. Who's there?"
very long pause...
"Java."
18. If you put a million monkeys on a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.
19. There's a band called 1023MB. They haven't had any gigs yet.
20. There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors.10 -
Wrote a custom printer script in shell.
Went to test the script on some printers.
Neglected to check accuracy of script.
script is supposed to print jpeg.
it doesn't interpret it as an image,
but rather as raw binary in text...
^\<92>Q^H2Ei@0$iA+<89>dl_d<87><8f>Q
mfw each printer in the entire 5 story building
starts printing 500 pages of
RAW
BINARY3 -
So this is my homework, I have to convert Hexadecimal to Text! And I can also convert the Hexadecimal to Binary!! I LOVE THIS STUFF6
-
I did a job interview recently for a company and the test was something like this.
In ruby, write a web server that will serve a specific line number from a text file.
I thought up a simple solution and a more advanced solution, but I opted to go with the simple solution and submit my work quickly. I made a nice web server with tests and everything and it used the sed command to get the line number from the file.
Now, they had various instructions, like it had to perform. They asked how it'd perform with 10G, 100G files. I thought "Eh... it'll be alright."
The solution they were looking for was the "advanced" solution that I thought up, which involved storing a binary file of 32/64 bit integers that reference the byte-offset of the line they're looking for. Basically a binary index file.
This violates all of my sensibilities, because I would never build a database indexer like this using ruby, of all things.
I thought it was a stupid test, and how do these companies honestly expect me to spend hours coding and then tell me I didn't go far enough? It's unethical.
I actually followed-up with the "advanced" solution a couple hours after hearing I was out, just to show them that their process is flawed.2 -
me: the source code is currently store on GitHub and we use GitHub Actions after each updates to compile your code into binary before deploying to your servers
client: storing source code on GitHub (external server) is insecure and breaks compliance
me: so i guess you will need to have a copy of the source code on all your servers and build them directly there (too cheap to have a separate build server) instead of using GitHub Actions
client: yeah
me: keep in mind that all your certificates and tokens are going to be store as plain text in all your servers so if a hacker gain access to anyone of your servers, they will have access to everything.
client: yeah, this is in compliance to our security policy3 -
I wrote a base converter in AssemblyScript that could take a numeric or string radix of 2-36. String options being binary, ternary, etc.
Then I couldn’t figure out how to color scheme it, so went about it the lazy way.
I present to you: Choose your own damned background and text colors.
https://baseconverterwebassembly.netlify.app/...6 -
So here I am reinventing the wheel making an HTTP server in C.
Finished implementing HTTP/1.1 and WebSockets support and now I find out the current thingy is HTTP/2.
Well that's fine, I'll add support for that later. In fact I kinda dig it since it uses binary conventions instead of plain text ones.
I dig a little bit and find out there already is an HTTP/3 going around which uses UDP.
Why me.5 -
"Our central servers firewall has been breached" - Doesn't even work on a server or anything, just his laptop
"How many proxies do we have left?"
"Around 10.200"
I don't take responsibility for any brain damage -
Arguing with a co worker.... he is writing a serial data plotter, and wants me to send the data as text. I’m like ugh no I’m not wasting bandwidth for text data, you are getting it as binary, as my embedded system has a lot of other stuff todo than send debug info, so the quicker I get the data to you the better... plus his program is running on a pc there is no issue regarding resources handling binary data.
He tells me I’m am wrong, and is trying to defend his stance, then all the electrical engineers and other software engineers all stand up and said why in the hell would it be faster to send text than binary? He has no response.23 -
Fuck Unity.
Today the version that those monsters call stable, decided to not render UI text (canvas) in a project I had to upgrade from an older version.
But it performs this practical joke (that stable software must do) only in the fucking editor.
How am I making sure that the text aligns? Ah, just moving the anchor positions, changing the font size, binary fucking searching for the right position for alignment by moving n pixels at a time, and exporting a webgl build and running it to make sure it's aligned
We're shifting to Unreal next year. I'll make sure of it3 -
What if aside from ++'s, devrant also turned their text posts into binary. Who'll read, who'll not? Hmm.8
-
Recently had to start developing on a PLC for a new project and didn’t realize how much these companies fuck their developers.
For example, I’m using CODESYS to write structured text to run on the PLC. CODESYS is free to download. However, in the free tier, they take all your .st files and ur config files and combine them into a SINGLE FUCKING BINARY which completely defeats the purpose of version control.
However, if you BUY their pro license, you can install a git module.
There’s other things that make developing in them suck. For example, the only IDE you can use is the one built into CODESYS and it fucking sucks. Another one is that their builtin IDE has a “dark mode” that only works on certain files. If you open a function file, it uses dark mode. But if you open a struct file, it uses light mode.
Also, having no other runtime than the one built into CODESYS fucking sucks.
Maybe I’ve been spoiled with VSCode and python 🤷♂️5 -
So yesterday, I got a call from some cousins saying my aunt broke a toenail and (since she's diabetic) she could now either lose both legs due to gangrene or die if they amputate. 2 hour drive to get them and me up to see her, 2 back, all the while having to be stone-faced to console 2 grown men. Today is finals week, and I could also get a call any moment from the hospital to tell me she's either dead or now unable to take care of herself. Could even be mid-class with one of those "well put it on speakerphone" teachers.
On the tech front, i'm trying to compile a toolchain from source. But, oh wait, one of the binaries it needs to configure (pkg-config) is self-calling so it crashes my machine. Let's build it from source, then? Nope, it requires a working copy... of... itself? Well, fuck. A "yum reinstall" doesn't help as it just reinstates the self-calling version, and I can't outright remove it because systemctl needs it. Well, apparently it's like a binary but is a text script, somehow, so I removed the recursive line and configuring works. Now though, I'm worried it might be broken, so i'm gonna try and compile from source. But, despite it needing itself, it also needs a SUPER FUCKING SPECIFIC version of libtool, so that's gotta be compiled...
I really wanna fucking shoot myself.3 -
Why do people say Binary to ASCII? Shouldn't they say, "Binary to readable text through/using ASCII"?2
-
Never again will I use eclipses egit extension. First eclipse thought that my plain text java source code should be encoded in some bizarre occult way which made eclipse think its binary what made me try pretty much anything one can do with a .gitattributes file before a colleague suggested to not trust eclipse eith the encoding it was explicitly told to use, then I fetched another branch to merge them which somehow killed my .project file and forced me to delete and refetch the whole thing which led to eclipse not longer recognizing it as a java project. May it be because I'm to stupid to use my tools? Yeah, probably. But I'm done with egit, it's all console gitting from now on, fuck suggested practice.
-
Yet another unusual take for the Orchid STL: Unicode codepoints aren't a part of the string library.
For the purposes of a high level language, the unit of text is a grapheme. Strings can be converted between Unicode and binary blobs. In a binary, indices address bytes. In text, indices address graphemes. For example, searching a string for a substring that consists of a single letter implies the added constraint that the letter must not have accents or other modifiers.
For storage and transfer optimization it's possible to discover the byte length of a string without converting it to binary2