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 - "byte"
-
-The oldest computer can be traced to Adam and Eve
-Yes, it was an apple
-But with an extremely limited memory
-Just one byte
-Then everything crashed5 -
My girlfriend got bitten by a mosquito and kept scratching it.
After I complained about the size of the bite, she said "c'mon it's just a bit, not big enough to be a byte".
When I finished facepalming (it took a while), I realized how proud I am of her.3 -
Interview with a candidate. He calls himself "C++ expert" on his resume. I think: "oh, great, I love C++ too, we will have an interesting conversation!"
Me: let's start with an easy one, what is 'nullptr'?
Him: (...some undecipherable sequence of words that didn't make any sense...)
In my mind: mh, probably I didn't understand right. Let's try again with something simple and more generic
Me: can you tell me about memory management in C++?
Him: you create objects on the stack with the 'new' keyword and they get automatically released when no other object references them
In my mind: wtf is this guy talking about? Is he confusing C++ with Java? Does he really know C++? Let's make him write some code, just to be sure
Me: can you write a program that prints numbers from 1 to 10?
Ten minutes and twenty mistakes later...
Me: okay, so what is this <int> here in angle brackets? What is a template?
Him: no idea
Me: you wrote 'cout', why sometimes do I see 'std::cout' instead? What is 'std'?
Answer: no idea, never heard of 'std'
I think: on his resume he also said he is a Java expert. Let's see if he knows the difference between the two. He *must* have noticed that one is byte-compiled and the other one is compiled to native code! Otherwise, how does he run his code? He must answer this question correctly:
Me: what is the difference between Java and C++? One has a Virtual Machine, what about the other?
Him: Java has the Java Virtual Machine
Me: yes, and C++?
Him: I guess C++ has a virtual machine too. The C++ Virtual Machine
Me (exhausted): okay, I don't have any other questions, we will let you know
And this is the story of how I got scared of interviews29 -
So a few days ago I felt pretty h*ckin professional.
I'm an intern and my job was to get the last 2003 server off the racks (It's a government job, so it's a wonder we only have one 2003 server left). The problem being that the service running on that server cannot just be placed on a new OS. It's some custom engineering document server that was built in 2003 on a 1995 tech stack and it had been abandoned for so long that it was apparently lost to time with no hope of recovery.
"Please redesign the system. Use a modern tech stack. Have at it, she's your project, do as you wish."
Music to my ears.
First challenge is getting the data off the old server. It's a 1995 .mdb file, so the most recent version of Access that would be able to open it is 2010.
Option two: There's an "export" button that literally just vomits all 16,644 records into a tab-delimited text file. Since this option didn't require scavenging up an old version of Access, I wrote a Python script to just read the export file.
And something like 30% of the records were invalid. Why? Well, one of the fields allowed for newline characters. This was an issue because records were separated by newline. So any record with a field containing newline became invalid.
Although, this did not stop me. Not even close. I figured it out and fixed it in about 10 minutes. All records read into the program without issue.
Next for designing the database. My stack is MySQL and NodeJS, which my supervisors approved of. There was a lot of data that looked like it would fit into an integer, but one or two odd records would have something like "1050b" which mean that just a few items prevented me from having as slick of a database design as I wanted. I designed the tables, about 18 columns per record, mostly varchar(64).
Next challenge was putting the exported data into the database. At first I thought of doing it record by record from my python script. Connect to the MySQL server and just iterate over all the data I had. But what I ended up actually doing was generating a .sql file and running that on the server. This took a few tries thanks to a lot of inconsistencies in the data, but eventually, I got all 16k records in the new database and I had never been so happy.
The next two hours were very productive, designing a front end which was very clean. I had just enough time to design a rough prototype that works totally off ajax requests. I want to keep it that way so that other services can contact this data, as it may be useful to have an engineering data API.
Anyways, that was my win story of the week. I was handed a challenge; an old, decaying server full of important data, and despite the hitches one might expect from archaic data, I was able to rescue every byte. I will probably be presenting my prototype to the higher ups in Engineering sometime this week.
Happy Algo!8 -
I absolutely HATE "web developers" who call you in to fix their FooBar'd mess, yet can't stop themselves from dictating what you should and shouldn't do, especially when they have no idea what they're doing.
So I get called in to a job improving the performance of a Magento site (and let's just say I have no love for Magento for a number of reasons) because this "developer" enabled Redis and expected everything to be lightning fast. Maybe he thought "Redis" was the name of a magical sorcerer living in the server. A master conjurer capable of weaving mystical time-altering spells to inexplicably improve the performance. Who knows?
This guy claims he spent "months" trying to figure out why the website couldn't load faster than 7 seconds at best, and his employer is demanding a resolution so he stops losing conversions. I usually try to avoid Magento because of all the headaches that come with it, but I figured "sure, why not?" I mean, he built the website less than a year ago, so how bad can it really be? Well...let's see how fast you all can facepalm:
1.) The website was built brand new on Magento 1.9.2.4...what? I mean, if this were built a few years back, that would be a different story, but building a fresh Magento website in 2017 in 1.x? I asked him why he did that...his answer absolutely floored me: "because PHP 5.5 was the best choice at the time for speed and performance..." What?!
2.) The ONLY optimization done on the website was Redis cache being enabled. No merged CSS/JS, no use of a CDN, no image optimization, no gzip, no expires rules. Just Redis...
3.) Now to say the website was poorly coded was an understatement. This wasn't the worst coding I've seen, but it was far from acceptable. There was no organization whatsoever. Templates and skin assets are being called from across 12 different locations on the server, making tracking down and finding a snippet to fix downright annoying.
But not only that, the home page itself had 83 custom database queries to load the products on the page. He said this was so he could load products from several different categories and custom tables to show on the page. I asked him why he didn't just call a few join queries, and he had no idea what I was talking about.
4.) Almost every image on the website was a .PNG file, 2000x2000 px and lossless. The home page alone was 22MB just from images.
There were several other issues, but those 4 should be enough to paint a good picture. The client wanted this all done in a week for less than $500. We laughed. But we agreed on the price only because of a long relationship and because they have some referrals they got us in the door with. But we told them it would get done on our time, not theirs. So I copied the website to our server as a test bed and got to work.
After numerous hours of bug fixes, recoding queries, disabling Redis and opting for higher innodb cache (more on that later), image optimization, js/css/html combining, render-unblocking and minification, lazyloading images tweaking Magento to work with PHP7, installing OpCache and setting up basic htaccess optimizations, we smash the loading time down to 1.2 seconds total, and most of that time was for external JavaScript plugins deemed "necessary". Time to First Byte went from a staggering 2.2 seconds to about 45ms. Needless to say, we kicked its ass.
So I show their developer the changes and he's stunned. He says he'll tell the hosting provider create a new server set up to migrate the optimized site over and cut over to, because taking the live website down for maintenance for even an hour or two in the middle of the night is "unacceptable".
So trying to be cool about it, I tell him I'd be happy to configure the server to the exact specifications needed. He says "we can't do that". I look at him confused. "What do you mean we 'can't'?" He tells me that even though this is a dedicated server, the provider doesn't allow any access other than a jailed shell account and cPanel access. What?! This is a company averaging 3 million+ per year in revenue. Why don't they have an IT manager overseeing everything? Apparently for them, they're too cheap for that, so they went with a "managed dedicated server", "managed" apparently meaning "you only get to use it like a shared host".
So after countless phone calls arguing with the hosting provider, they agree to make our changes. Then the client's developer starts getting nasty out of nowhere. He says my optimizations are not acceptable because I'm not using Redis cache, and now the client is threatening to walk away without paying us.
So I guess the overall message from this rant is not so much about the situation, but the developer and countless others like him that are clueless, but try to speak from a position of authority.
If we as developers don't stop challenging each other in a measuring contest and learn to let go when we need help, we can get a lot more done and prevent losing clients. </rant>14 -
https://git.kernel.org/…/ke…/... sure some of you are working on the patches already, if you are then lets connect cause, I am an ardent researcher for the same as of now.
So here it goes:
As soon as kernel page table isolation(KPTI) bug will be out of embargo, Whatsapp and FB will be flooded with over-night kernel "shikhuritee" experts who will share shitty advices non-stop.
1. The bug under embargo is a side channel attack, which exploits the fact that Intel chips come with speculative execution without proper isolation between user pages and kernel pages. Therefore, with careful scheduling and timing attack will reveal some information from kernel pages, while the code is running in user mode.
In easy terms, if you have a VPS, another person with VPS on same physical server may read memory being used by your VPS, which will result in unwanted data leakage. To make the matter worse, a malicious JS from innocent looking webpage might be (might be, because JS does not provide language constructs for such fine grained control; atleast none that I know as of now) able to read kernel pages, and pawn you real hard, real bad.
2. The bug comes from too much reliance on Tomasulo's algorithm for out-of-order instruction scheduling. It is not yet clear whether the bug can be fixed with a microcode update (and if not, Intel has to fix this in silicon itself). As far as I can dig, there is nothing that hints that this bug is fixable in microcode, which makes the matter much worse. Also according to my understanding a microcode update will be too trivial to fix this kind of a hardware bug.
3. A software-only remedy is possible, and that is being implemented by all major OSs (including our lovely Linux) in kernel space. The patch forces Translation Lookaside Buffer to flush if a context switch happens during a syscall (this is what I understand as of now). The benchmarks are suggesting that slowdown will be somewhere between 5%(best case)-30%(worst case).
4. Regarding point 3, syscalls don't matter much. Only thing that matters is how many times syscalls are called. For example, if you are using read() or write() on 8MB buffers, you won't have too much slowdown; but if you are calling same syscalls once per byte, a heavy performance penalty is guaranteed. All processes are which are I/O heavy are going to suffer (hostings and databases are two common examples).
5. The patch can be disabled in Linux by passing argument to kernel during boot; however it is not advised for pretty much obvious reasons.
6. For gamers: this is not going to affect games (because those are not I/O heavy)
Meltdown: "Meltdown" targeted on desktop chips can read kernel memory from L1D cache, Intel is only affected with this variant. Works on only Intel.
Spectre: Spectre is a hardware vulnerability with implementations of branch prediction that affects modern microprocessors with speculative execution, by allowing malicious processes access to the contents of other programs mapped memory. Works on all chips including Intel/ARM/AMD.
For updates refer the kernel tree: https://git.kernel.org/…/ke…/...
For further details and more chit-chats refer: https://lwn.net/SubscriberLink/...
~Cheers~
(Originally written by Adhokshaj Mishra, edited by me. )23 -
To all developers who think "I don't need to delete that one 1KB temp file"
FUCK.YOU.
You are not the only garbage developer who does not clean his shit up. The reason we need TERA FUCKING BYTE storage devices nowadays is because you incompetent shit heads have no idea how an application has to properly work. A temp file is not there to exist for ever. HENCE THE FUCKING WORD TEMPORARY20 -
//
// devRant unofficial UWP update (v2.0.0-beta)
//
After several concepts, about 11 months of development (keep in mind that I released 20 updates for v1 in the meantime, so it wasn't a continous 11 months long development process) and a short closed beta phase, v2 is now available for everyone (as public beta)! :)
I tried to improve the app in every aspect, from finally responsive and good looking UI on Desktop version to backend performance improvements, which means that I almost coded it from scratch.
There are also of course a few new features (like "go to bottom" in rants), and more to come.
It's a very huge update, and unfortunately to move forward, improve the UI (add Fluent Design) and make it at the same level of new UWP apps, I was forced to drop the supported for these old Windows 10 builds:
- Threshold 1 (10240)
- Threshold 2 (10586)
Too many incompatiblity issues with the new UI, and for 1 person with a lot of other commitments outside this project (made for free, just for passion), it's impossible to work at 3 parallel versions of the same app.
I already done something like that during these 11 months (every single of the 20 updates for v1 needed to be implemented a second time for v2).
During the closed beta tests, thanks to the awesome testers who helped me way too much than I ever wished, I found out that there are already incompatiblity issues with Anniversary Update, which means that I will support two versions:
1) One for Creators Update and newer builds.
2) One for Anniversary Update (same features, but missing Fluent Design since it doesn't work on that OS version, and almost completly rewritten XAML styles).
For this reason v2 public beta is out now for Creators Update (and newer) as regular update, and will be out in a near future (can't say when) also for the Anniversary Update.
The users with older OS versions (problem which on PC could be solved in 1-2 days, just download updates) can download only the v1.5.9 (which probably won't be supported with new updates anymore, except for particular critcal bug fixes).
So if you have Windows 10 on PC and want to use v2 today, just be sure you have Creators Update or Fall Creators Update.
If you have Windows 10 PC with Anniversary Update, update it, or if you don't want to do that, wait a few weeks/months for the update with support for your build.
If you have an older version on PC, update it, or enjoy v1.5.9.
If you have Windows 10 Mobile Anniversary Update, update it (if it's possible for your device), or just wait a few weeks/months for the update with support for your build.
If you have Windows 10 Mobile, and because of Microsoft stupid policy, you can't update to Anniversary Update, enjoy v1.5.9, or try the "unofficial" method (registry hack) to update to a newer build.
I hope it's enough clear why not everyone can receive the update today, or at all. :P
Now I would like to thank a few people who made this possible.
As always, @dfox who is always available for help me with API implementations.
@thmnmlist, who helped me a lot during this period with really great UI suggestions (just check out his twitter, it's a really good person, friend, designer and artist: https://twitter.com/thmnmlist).
And of course everyone of the closed beta testers, that reported bugs and precious suggestions (some of them already implemented, others will arrive soon).
The order is random:
@Raamakrishnan
@Telescuffle
@Qaldim
@thmnmlist
@nikola1402
@aayusharyan
@cozyplanes
@Vivaed
@Byte
@RTRMS
@tylerleonhardt
@Seshpengiun
@MEGADROID
@nottoobright
Changelog of v2.0.0-beta:
- New UI with Fluent Design and huge improvements for Desktop;
- Added native support for Fall Creators Update (Build 16299);
- Changed minimum supported version to Creators Update (Build 15063), support for Anniversary Update (Build 14393) will arrive soon;
- Added mouse support for Pull-To-Refresh;
- Added ability to change your username and email;
- Added ability to filter (by 'Day', 'Week', 'Month' and 'All') the top Rants;
- Added ability to open rant links in-app;
- Added ability to zoom GIFs (just tap on them in the Rant View);
- Added 'go to bottom' button in the Rant View (if more than 3 comments);
- Added new theme ('Total Black');
- ...complete changelog in-app and on my website (can't post it here because of the 5000 characters limit)...
What will arrive in future updates:
- 'Active Discussions' screen so you can easily find rants that have recent comments/discussions;
- Support for 'Collabs';
- Push Notifications (it was postponed and announced too many times...);
- More themes and themes options;
- and more...
If you still didn't download devRant unofficial UWP, do it now: https://microsoft.com/store/apps/...
If you find some bugs or you have feature suggestion, post it on the Issue Tracker on GitHub (thanks in advance for your help!): https://github.com/JakubSteplowski/...
I hope you will enjoy it! ;)52 -
Guys check out devRant CUI
https://github.com/Jay9596/...
Very buggy at the moment, but can be used to browse rants,stories,etc.25 -
Sometimes the best "bug" are the troll posts, although personally I agree with it (even though a separate byte for both \r and \n make sense to keep for other purposes).7
-
- Free app:
"5 stars - OMG this app is awesome!!!"
- Add new feature with In-app purchase:
"1 star - App sucks balls. Why we must pay? Make free and I rate 5 stars"
I call them The Rating Terrorists.8 -
Eight bytes walk into a bar. The bartender asks, “Can I get you anything?”
“Yeah,” reply the bytes. “Make us a double.”5 -
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 -
Google: “Your websites must load the first byte in under 500ms and be fully loaded with no render blocking and local caching of all external site callouts to even begin to rank in Google searches.”
Me: “Ok, Google. Your wish is my command.”
*Looks at Chrome’s memory usage to load a blank page*7 -
The amount of people who don't know the difference between kilobyte and kibibyte is too damn high. So much confusion.
TL;DR : Most people use Kilobyte ( KB ) and Kibibyte ( KiB ) wrong and i am angry about it.
When i first got involved with software as a teenager, i always wondered why we convert kilo to mega with multiplying by 1024, when we do it with multiplying by 1000 basically everywhere else. Our physics teacher called this SI unit system and told us that this is an internationally accepted statement. So why is there a different rule ? Did i miss out something ? Regrettably I didn't ask her about this.
I just didn't get fully as a teenager. Now, as I am a developer now, i understand that dealing with power or ten is troublesome. Due to ease of work, we lazily mess with SI system and use it wrongly. Isn't it the time we end this abomination ?
2 years ago i talked to a friend about this, he said that i shouldn't bother.
I talked to a teacher, he said "you are right but using different brand of unit system can be overkill, since there is not much difference anyways." I said okay and left.
1 mega = 1000 kilo
1 giga = 1000 mega etc
also,
MB = Megabyte ( 1000 Kilobyte )
KB = Kilobyte ( 1000 Byte )
MiB = Mebibyte ( 1024 Kibibyte )
KiB = Kibibyte ( 1024 Byte )
I am writing this because today i saw someone do it wrong on the internet, all of these came into mind. I wonder your approach about this, for research purposes.
Call me dick all you want, but i am the guy who always corrects uncertainty, no matter what. Things should be in place, correctly. No i don't have OCD. If you say something like "I have 1 MB of executable file, which means i have 1024 KB of it", i will find you, and i will correct you.37 -
Me: Hey can I take a byte
Friend: Sure, here
*Gives toast*
*bites 8 pieces*
Friend: Dude I said 1 not eight!
Me: You said I can take a byte :(
Based off my imagination6 -
"Your driver weighs 7 GBs!" -
a) it only "weighs" 20MBs
b) when did the byte become a unit of mass? 🤔4 -
*wrestling commentator voice*
"In this weeks episode of encoding hell:
The iiiinnnfamous UTF-8 Byte Order Mark veeeersus PHP!"
For an online shop we developed, there is currently a CSV upload feature in review by our client. Before we developed this feature, we created together with the client a very precise specification, including the file format and encoding (UTF-8).
After the first test day, the client informed us, that there were invalid characters after processing the uploaded file.
We checked the code and compared the customer's file with our template.
The file was encoded in ISO-8859-1 and NOT as specified UTF-8.
But what ever, we had to add an encoding check, thus allowing both encodings from now on.
Well well well welly welly fucking well...
Test day 2: We receive an email from said client, that the CSV is not working, again.
This time: UTF-8 encoding, but some fields had more colums with different values than specified.
Fucking hell.
We tell the customer that.
(I was about to write a nice death threat novel to them, but my boss held me back)
Testing day 3, today:
"The uploading feature is not working with our file, please fix it."
I tried to debug it, but only got misleading errors. After about 30 minutes, at 20 stacks of hatered, I finally had an idea to check the file in a hex editor:
God fucking what!?!!?!11?!1!!!?2!!
The encoding was valid UTF-8, all columns and fields were correct, but this time the file contained somthing different.
Something the world does not need.
Something nearly as wasteful as driving a monster truck in first gear from NYC to LA.
It was the UTF-8 Byte Order Mark.
3 bytes of pure hell.
Fucking 0xEFBBBF.
The archenemy of PHP and sane people.
If the devil had sex with the ethernet port of a rusty Mac OS X Server, then 9 microseconds later a UTF-8 BOM would have been born.
OK, maybe if PHP would actually cope with these bytes of death without crashing, that would be great.3 -
Some words of wisdom passed on by our Scrum.
1. I am responsible for setting boundaries. Work time, sleep time, family time, me time. If I don't set them properly, things WILL get unbalanced very quickly. (And I would add, burnout will follow closely).
2. Being productive isn't about doing more and more in less time. It's about doing only the most important things well, and either saying no to the other things, or finding another way to get them done. (Prioritize!)
3. I can't win (let alone run) a marathon by thinking of it as a 26 mile long sprint, or a week as a five day sprint. (Eat a digital elephant a byte at a time).
4. Loved ones are good judges of when things are in and out of balance.
5. Taking time off is essential. Vacations, yes, but also nights and weekends. (Or you WILL burn out and hate what you do).
Comments in () are mine.1 -
Programmers’ Day is celebrated on the 256th day of the year – chosen because this is the number of distinct values that can be represented with an eight-bit byte, and the highest power of two which is less than 365.1
-
I spent an hour arguing with the CTO, pushing for having all our new products' data in the database (wow) with an API I could hit to fetch said data (wow) prior to displaying it on our order page.
He never actually agreed with me, but he finally acquiesced and wrote the migrations, API, and entered my (rather contrived) placeholder data. (I've been waiting on the boss for details and copy for three days.)
Anyway, it's now live on QA. but. I don't know where QA is for this app, and it's been long enough that i'm kind of afraid to ask.
Does that sound strange?
well.
We have seven (nine?) live applications (three of which share a database), and none of their repos match their URLs, nor even their Heroku app names. (In some of these Heroku names, "db" is short for the app's namesake, while in the rest it's short for "database").
So, I honestly have no idea where "dbappdev" points to, and I don't have access to the DNS records to check. -.-
What's more: I opened "dbappdev" on Heroku and tested out his new API -- lo and behold! it returns nada. Not a single byte. (Given his history I expected a 500, so this is an improvement, I think. Still totally useless, however.)
And furthermore: he didn't push the code to github, so I cannot test (or fix) it locally.
just. UGH.
every day with this guy, i swear.16 -
I swear I work with mentally deranged lunatics.
Dev is/was using TFS's web api to read some config stuff..
Ralph: "Ugh..this is driving me crazy. I've spent all day trying to read this string from TFS and it is not working"
Me: "Um, reading a string from an web api is pretty easy, what's the problem?"
Ralph: "I'm executing the call in a 'using' statement and cannot return the stream."
Me: "Why do you need to return a stream? Return the object you are looking for."
Ralph: "Its not that easy. You can return anything from TFS. All you get back is a stream. Could be XML, JSON, text file, image, anything."
Me: "What are you trying to return?"
Ralph: "XML config. If I use XDoc, the stream works fine, but when I step into each byte from the stream, I the first three bytes have weird characters. I shouldn't have to skip the first three bytes to get the data. I spent maybe 5 hours yesterday digging around the .Net stream readers used in XDoc trying to figure out how it skips the first few bytes."
Me: "Wow...I would have used XDoc and been done and not worried about that other junk."
Ralph: "But I don't know the stream is XML. That's what I need to figure out."
Me: "What is there to figure out? You do know. Its your request. You are requesting a XML config."
Ralph: "No, the request can be anything. What if Sam requests an image? XDoc isn't going to work."
Me: "Is that a use-case? Sam requesting an image?"
Ralph: "Uh..I don't know...he could"
Me: "Sounds like your spending a lot of time doing premature optimization. You know what your accessing TFS for, if it's XML, return XML. If it's an image, return an image. Something new comes along, modify the code to handle it. Eazy peezy."
<boss walks in from a meeting>
Boss: "Whats up guys?"
Ralph: "You know the problem with TFS and not being able to stream the data I had all day yesterday? I finally figured it out. I need to keep this TFS reader simple. I'll start with the XML configs and if we more readers later, we can add them."
Boss: "Oh yea, always start simple and add complexity only when you need it."
Frack...Frack..Frack...you played some victim complaining to anyone who would listen yesterday (which I mostly ignored) about reading data from TFS was this monumental problem no one could solve, then you start complaining to me, I don't fall for the BS, then tell the boss the solution was your idea?
Lunatic or genius? Wally would be proud.4 -
Today I'm trying to study how to encode data in idx-ubyte format for my machine learning project.
Professors I'm going to astonish you!
Good day and good coding to all of you! :)6 -
Like most people I needed some extra cash during uni, so I proceeded to learn CSS + Photoshop (yeah, I know). Followed by PHP and WordPress.
It can be a very shitty platform until you realize that you can stop combining plug-ins from all over the place with dubious code quality and roll your own.
Anyhow I kept at it until I was able to join a niche company doing a quite popular caching plug-in for WP (yeah, W3 Total) when I suddenly became *very* interested in anything and everything performance.
This landed me a very cozy consulting gig in the Nordics - they were using WP for an elephant-traffic website and had run into a myriad of perf issues.
Fixing them and breaking the monolith awarded me with skills in nodejs, linux, asynchronous caching among others.
I was soon in charge with managing the dev boxes for the entire team, and when the main operations dude left, I was promoted to owning the entire platform. (!) Tinkering with Linux for most of my life really came in handy here. (remember Debian potato?)
Used saltstack + aws cloudformation to achieve full parity between all environments. Learned myself some python and all various tips and tricks which in the end amounted to 90% reduction in time-to-first-byte and considerable cost savings.
By the end of the 2yr contract I had turned myself into a fullstack systems engineer and never looked back.
Lawyers not getting along resulted in us having to abandon NewRelic, so I got to learn and deploy the ELK stack as a homegrown replacement, which was super-fun.
Now I work in the engineering effectiveness department of a Swedish fintech unicorn where all languages under the Sun are an option (tho we prefer Python), so the tech stack is unlimited. Infinite tools and technologies, but with strong governing principles and with performance always in mind so as to pick the right tool for the job.
It's like that childhood feeling when you've just dumped a ton of Lego on the floor and are about to build something massive.
I guess the morale here is however disappointed you feel by your current stack - don't. Always strive to make things better, faster, more decoupled, easier to test, etc. and always challenge yourself to go outside the comfort zone.6 -
Manager: What the heck are you guys doing? Pair programming?! That would halve the team productivity!!!
We:
Manager: Alright, Let's do a "quick" four hours meeting. Everyone in the company MUST attend!
We:3 -
I've found and fixed any kind of "bad bug" I can think of over my career from allowing negative financial transfers to weird platform specific behaviour, here are a few of the more interesting ones that come to mind...
#1 - Most expensive lesson learned
Almost 10 years ago (while learning to code) I wrote a loyalty card system that ended up going national. Fast forward 2 years and by some miracle the system still worked and had services running on 500+ POS servers in large retail stores uploading thousands of transactions each second - due to this increased traffic to stay ahead of any trouble we decided to add a loadbalancer to our backend.
This was simply a matter of re-assigning the IP and would cause 10-15 minutes of downtime (for the first time ever), we made the switch and everything seemed perfect. Too perfect...
After 10 minutes every phone in the office started going beserk - calls where coming in about store servers irreparably crashing all over the country taking all the tills offline and forcing them to close doors midday. It was bad and we couldn't conceive how it could possibly be us or our software to blame.
Turns out we made the local service write any web service errors to a log file upon failure for debugging purposes before retrying - a perfectly sensible thing to do if I hadn't forgotten to check the size of or clear the log file. In about 15 minutes of downtime each stores error log proceeded to grow and consume every available byte of HD space before crashing windows.
#2 - Hardest to find
This was a true "Nessie" bug.. We had a single codebase powering a few hundred sites. Every now and then at some point the web server would spontaneously die and vommit a bunch of sql statements and sensitive data back to the user causing huge concern but I could never remotely replicate the behaviour - until 4 years later it happened to one of our support staff and I could pull out their network & session info.
Turns out years back when the server was first setup each domain was added as an individual "Site" on IIS but shared the same root directory and hence the same session path. It would have remained unnoticed if we had not grown but as our traffic increased ever so often 2 users of different sites would end up sharing a session id causing the server to promptly implode on itself.
#3 - Most elegant fix
Same bastard IIS server as #2. Codebase was the most unsecure unstable travesty I've ever worked with - sql injection vuns in EVERY URL, sql statements stored in COOKIES... this thing was irreparably fucked up but had to stay online until it could be replaced. Basically every other day it got hit by bots ended up sending bluepill spam or mining shitcoin and I would simply delete the instance and recreate it in a semi un-compromised state which was an acceptable solution for the business for uptime... until we we're DDOS'ed for 5 days straight.
My hands were tied and there was no way to mitigate it except for stopping individual sites as they came under attack and starting them after it subsided... (for some reason they seemed to be targeting by domain instead of ip). After 3 days of doing this manually I was given the go ahead to use any resources necessary to make it stop and especially since it was IIS6 I had no fucking clue where to start.
So I stuck to what I knew and deployed a $5 vm running an Nginx reverse proxy with heavy caching and rate limiting linked to a custom fail2ban plugin in in front of the insecure server. The attacks died instantly, the server sped up 10x and was never compromised by bots again (presumably since they got back a linux user agent). To this day I marvel at this miracle $5 fix.1 -
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 -
So I found this in the code:
Inet4Address.getByAddress (new byte[] {0x7f,0x00,0x00,0x01})
It's localhost. Why the actual fuck would you declare 127.0.0.1 as a fucking byte array!15 -
Hi everyone, long time no see.
Today I want to tell you a story about Linux, and its acceptance on the desktop.
Long ago I found myself a girlfriend, a wonderful woman who is an engineer too but who couldn't be further from CS. For those in the know, she absolutely despises architects. She doesn't know the size units of computers, i.e. the multiples of the byte. Breaks cables on the regular, and so on. For all intents and purposes, she's a user. She has written some code for a college project before, but she is by no means a developer.
She has seen me using Linux quite passionately for the last year or so, and a few weeks ago she got so fed up with how Windows refused to work on both her computers (on one of them literally failing to run exe's, go figure), that she allowed me to reinstall both systems, with one of them being dualbooted Windows 10 + Linux.
The computer that runs Linux is not one she uses very often, but for gaming (The Sims) it's her platform to go. On it I installed Debian KDE, for the following reasons:
- It had to be stable as I didn't want another box to maintain.
- It had to be pretty OOTB, as first impressions are crucial.
- It had to be easy to use, given her skill level.
- It had to have a GUI abstraction to apt, the KDE team built Discover which looks gorgeous.
She had the following things to say about Linux, when she went to download The Sims from a torrent (I installed qBittorrent for her iirc).
"Linux is better, there's no need to download anything"
"Still figuring things out, but I'm liking it"
"I'm scared of using Windows again, it's so laggy"
"Linux works fine, I'm becoming a Linux user"
Which you can imagine, it filled me with pride. We've done it boys. We've built a superior system that even regular users can use, if the system is set up to be user-friendly.
There are a few gripes I still have, and pitfalls I want to address. There's still too many options, users can drown in the sheer amount of distro's to choose from. For us that's extremely important but they need to have a guide there. However, don't do remote administration for them! That's even worse than Microsoft's tracking! Whenever you install Linux on someone else's computer, don't be all about efficiency, they are coming from Windows and just want it to be easy to use. I use Mate myself, but it is not the thing I would recommend to others. In other words, put your own preferences aside in favor of objective usability. You're trying to sell people on a product, not to impose your own point of view. Dualboot with Windows is fine, gaming still sucks on Linux for the most part. Lots of people don't have their games on Steam. CAD software and such is still nonexistent (OpenSCAD is very interesting but don't tell me it's user-friendly). People are familiar with Windows. If you were to be swimming for the first time in the deep water, would you go without aids? I don't think so.
So, Linux can be shown and be actually usable by regular people. Just pitch it in the right way.11 -
I have noticed on here, there is a direct correlation between the number of swear words in a post and that posts ++ count. As a programmer who doesn't swear (I know, "just give it a few years" or "YOUR NOT A REAL PROGRAMMER!!" [side note, I also don't drink coffee]), I guess my ++ counter will only ever be allocated 1 byte...10
-
Interesting bug hunt!
Got called in because a co-team had a strange bug and couldn't make sense of it. After a compiler update, things had stopped working.
They had already hunted down the bug to something equivalent to the screenshot and put a breakpoint on the if-statement. The memory window showed the memory content, and it was indeed 42. However, the debugger would still jump over do_stuff(), both in single step and when setting a breakpoint on the function call. Very unusual, but the rest worked.
Looking closer, I noticed that the pointer's content was an odd number, but was supposed to be of type uint32_t *. So I dug out the controller's manual and looked up the instruction set what it would do with a 32 bit load from an unaligned address: the most braindead thing possible, it would just ignore the lowest two address bits. So the actual load happened from a different address, that's why the comparison failed.
I think the debugger fetched the memory content bytewise because that would work for any kind of data structure with only one code path, that's how it bypassed the alignment issue. Nice pitfall!
Investigating further why the pointer was off, it turned out that it pointed into an underlying array of type char. The offset into the array was correctly divisible by 4, but the beginning had no alignment, and a char array doesn't need one. I checked the mapfiles and indeed, the old compiler had put the array to a 4 byte boundary and the new one didn't.
Sure enough, after giving the array a 4 byte alignment directive, the code worked as intended.8 -
Can someone tell who the fuck lets morons with absolutely 0 knowledge of how the industry works go on and write articles concerning "what programming languages to learn" clickbait articles?
Look, I never looked into them. Not even when starting, I knew (out of spite) that the people that built Windows Vista were developers and then I went ahead to look what a software engineer was. I went down the rabbit hole from that and my next step at the time (I was on the local library) was to go ahead and look for programming books, C++ and Java caught my eye, so I got them two books and went down. Later on I found about JS and Python and similar shit like that and I just continued to learn. I seldom bothered to learn from internet articles because to my opinion if I needed to read documentation then I might as well fucking read it from the people that designed X technology.
some were good, some were shit, etc etc, but I never bothered to look for "what programming languages to learn" articles because I could give close to two shits about some other dickhead telling me what to learn, I have always been rather hesitant to take other people's opinion into consideration when it comes to my own learning.
BUT today I clicked on one of those articles out of curiosity.....
"Many DEVELOPER (notice the lack of proper grammar) choose to leave Visual Basic in favor of more modern frameworks like C#, Java or .NET"
Ok, so, for whatever the fuck reason Java is mentioned along C# and a fucking framework (.NET) rather than just C# for microsoft shit, is this moron talking about VB.NET at all? is he going about VB6? what? what is going on here?
Obj C is not relevant at all and should be immediately replaced by Swift since it is a modern, and stable language (never mind that each release has breaking changes on entire code bases, yeah, fuck it, just jump alltogether and ignore Obj C and the decades of stable code it has)
"Coffeescript has been replaced by the newer features of Java" <--- ok fam, you lost me here, give me your "ITPro" card please and then kick yourself repeatedly in the groin since I won't be bothered touching you, i might get some stOOpid on me.
Fuck, these articles are all over the place, from idiots like the one above, to the moron raving about pharo smalltalk shitting on every tech you use.
Just.....please bring back shit like byte magazine and shit.....please? or Linux Format, make Linux Format more popular across the board, where people who know their shit think twice before spewing their bullshit to the masses? Some fucking kid there might want to know where to start and these fucking idiots are out there just ruining shit for everything.25 -
so im deciding to byte the bullet and roll down the angular road.
install node they say, its quick and easy they say... 1 hour later after
./configure
make
im starting to wonder if i made the right decision.10 -
The GashlyCode Tinies
A is for Amy whose malloc was one byte short
B is for Basil who used a quadratic sort
C is for Chuck who checked floats for equality
D is for Desmond who double-freed memory
E is for Ed whose exceptions weren’t handled
F is for Franny whose stack pointers dangled
G is for Glenda whose reads and writes raced
H is for Hans who forgot the base case
I is for Ivan who did not initialize
J is for Jenny who did not know Least Surprise
K is for Kate whose inheritance depth might shock
L is for Larry who never released a lock
M is for Meg who used negatives as unsigned
N is for Ned with behavior left undefined
O is for Olive whose index was off by one
P is for Pat who ignored buffer overrun
Q is for Quentin whose numbers had overflows
R is for Rhoda whose code made the rep exposed
S is for Sam who skipped retesting after wait()
T is for Tom who lacked TCP_NODELAY
U is for Una whose functions were most verbose
V is for Vic who subtracted when floats were close
W is for Winnie who aliased arguments
X is for Xerxes who thought type casts made good sense
Y is for Yorick whose interface was too wide
Z is for Zack in whose code nulls were often spied
- Andrew Myers4 -
As a follow-up to my comment on this rant: https://devrant.com/rants/1029538 I want to share with you my new project: BinToBmp!
It converts any file into a beautiful bitmap image illustrating all bytes as pixels. Each byte indicates an index to a color table (very happy bitmap makes it this simple).
Useful? No. Fun to make? Hell yeah!
Take a look at it on my github page:
https://github.com/Forside/BinToBmp
Download:
https://github.com/Forside/...
Print your favorite song and hang it on the wall or make a shirt from your latest compiled application. So many possibilities!
More infos in the readme.
Updates coming soon :)
P.S.: The image displays the converted jar.30 -
Here are few hillarious coding puns I found....
class Brick implements Throwable { }
byte me;
char acter;
float stone;
Exception taken;
string me_along;
int elligence;5 -
Is obsidian a fucking joke?
Seriously, is it a joke? Why would you ever care so much about indexing literally everything, if the entire thing crashes and/or takes >5min to LITERALLY just open the fucking directory and/or (so help you) if that directory is full of projects/repos or whatever the fuck and the total size of said directory is like >5GB.
WHY THE FUCK WOULD YOU INDEX EVERYTHING? -- "Ohh obsidian's not supposed to be used a fully fledged IDE, ohh obsidian should just handle MD files and normal sized projects, ohh the plugins and ease-of-use" -- Fuck.
There's no fucking real reason to index everything, BY DEFAULT. You open a directory with Obsidian? Doesn't matter, it's 1 byte, it's 100GB, you get indexed. Deal with it. It will use LITERALLY every resource your computer has. I'm surprised it doesn't go galaxy brain and ping if any other computers/devices are on the network and then attempt to connect and use their hardware (obsidian can be like a node!).
How shit can you be at understanding basic data structures and algorithms, where you just revert to based google-chrome brain and let the FUCKING TEXT EDITOR -- OBSIDIAN IS A FUCKING TEXT EDITOR HOLY SHIT -- hog all conceivable memory.
I swear to <some-deity> if anyone fucking says "Ohhhhhhhh actually, it's not a text editor, it has plugins and features and shit, it does all dis cool stff", OR, "Ohhhhh actually, obsidian indexes things for a very specific/rationale/apt/pragmatic/academic reason" OR "ohhhh, I have 100 iphones, 1000 ipads and a trillion desktop computers that each have 256GB of memory, why you hating on obsidian?" then go kick rocks. The fucking lot of you. Are you fucking kidding me.8 -
Uggg..... I'm trying to encode a binary file in Python which may be an image or may be an executable, and then decode it back into a file (I plan on editing it in the middle, but baby steps for now..) but nothing is working!!
My plan is to:
Open binary file.
Decode as base64, or something else that could easily handle binary.
Convert byte data to string (for editory perpousos - I won't be editing bytes, I'll be doing custom encoding but that's irrelevant for this test)
Convert back to a byte string/array (with .encode(), probably)
Write to file.
I do this, yet the output has been altered... Though I haven't touched anything..
It's so enfuriating.. x.x18 -
Hi android devs!
How can I record a double[] or byte[] into a pcm in order to convert it to a wav file?
My life depends on this one 😬13 -
Dear ESLint,
- you convinced me to put a space between function() and {
- you convinced me to use single quotes for strings in place of double quotes
- you convinced me to put a space between inline operators
- you had me when you said that trailing spaces shouldn't compare in my code
- you said to put semicolons at the end of each instruction, and I thought it wasn't a so bad idea
BUT NO FUCK OFF NO NEVER I WON'T NEVER PUT A FUCKING TRAILING COMMA IN THE END OF JAVASCRIPT OBJECT IT'S MEANINGLESS UGLY A WASTE OF A FUCKING BYTE.
WHY THE FUCK I SHOULD TYPE var obj = {a: 'some text',} INSTEAD OF var obj = {a: 'some text'} WHY WHAT'S THE MEANING OF THAT FUCKING COMMA9 -
While we're talking about Microsoft and GitHub.
This is what people dealing with billions of dollars on daily basis look like. The awkward looking guy just fucked millions of developers all over the world so he's a byte uncomfortable about all this.11 -
Today, I found this gem here in the codebase I've taken over:
#define BYTE unsigned char
FFS, use typedef, it's there for a reason. Solving the puzzle in the first comment.6 -
My first contact with an actual computer was the Sinclair ZX80, a monster with 512 bytes of ram (as in 1/2 kbyte)
It had no storage so you had to enter every program every time and it was programmed in basic using key combinations, you could not just write the commands since it did not have memory enough to keep the full text in memory.
So you pressed the cmd key along with one of the letter keys and possibly shift to enter a command, like cmd+p for print and it stored s byte code.8 -
This is my first rant here, so I hope everyone has a good time reading it.
So, the company I am working for got me going on the task to do a rewrite of a firmware that was extended for about 20 years now. Which is fine, since all new machines will be on a new platform anyways. (The old firmware was written for an 8051 initially. That thing has 256 byte of ram. Just imagine the usage of unions and bitfields...)
So, me and a few colleagues go ahead and start from scratch.
In the meantime however, the client has hired one single lonely developer. Keep in mind that nobody there understands code!
And oh boy did he go nuts on the old code, only for having it used on the very last machine of the old platform, ever! Everything after that one will have our firmware!
There are other machines in that series, using the original extended firmware. Nothing is compatible, bootloaders do not match, memory layouts do not match, code is a horrible mess now, the client is writing the specification RIGHT NOW (mind, the machine is already sold to customers), there are no tests, and for the grand finale, the guy canceled his job and went to a different company. Did I mention the bugs it has and the features it lacks?
Guess who's got to maintain that single abomination of a firmware now?1 -
Buffer usage for simple file operation in python.
What the code "should" do, was using I think open or write a stream with a specific buffer size.
Buffer size should be specific, as it was a stream of a multiple gigabyte file over a direct interlink network connection.
Which should have speed things up tremendously, due to fewer syscalls and the machine having beefy resources for a large buffer.
So far the theory.
In practical, the devs made one very very very very very very very very stupid error.
They used dicts for configurations... With extremely bad naming.
configuration = {}
buffer_size = configuration.get("buffering", int(DEFAULT_BUFFERING))
You might immediately guess what has happened here.
DEFAULT_BUFFERING was set to true, evaluating to 1.
Yeah. Writing in 1 byte size chunks results in enormous speed deficiency, as the system is basically bombing itself with syscalls per nanoseconds.
Kinda obvious when you look at it in the raw pure form.
But I guess you can imagine how configuration actually looked....
Wild. Pretty wild. It was the main dict, hard coded, I think 200 entries plus and of course it looked like my toilet after having an spicy food evening and eating too much....
What's even worse is that none made the connection to the buffer size.
This simple and trivial thing entertained us for 2-3 weeks because *drumrolls please* none of the devs tested with large files.
So as usual there was the deployment and then "the sudden miraculous it works totally slow, must be admin / it fault" game.
At some time it landed then on my desk as pretty much everyone who had to deal with it was confused and angry, for understandable reasons (blame game).
It took me and the admin / devs then a few days to track it down, as we really started at the entirely wrong end of the problem, the network...
So much joy for such a stupid thing.18 -
React or Angular?
Vim or Emacs?
Tabs or Spaces?
.....
I'm fed up with these questions :(
Whatever is suitable for your job or whichever is comfortable for you, go with that...16 -
Follow-up to my previous story: https://devrant.com/rants/1969484/...
If this seems to long to read, skip to the parts that interest you.
~ Background ~
Maybe you know TeamSpeak, it's basically a program to talk with other people on servers. In TeamSpeak you can generate identities, every identity has a security level. On your server you can set a minimum security level you need to connect. Upgrading the security level takes longer as the level goes up.
~ Technical background ~
The security level is computed by doing this:
SHA1(public_key + offset)
Where public_key is your public key in Base64 and offset is an 8 Byte unsigned long. Offset is incremented and the whole thing is hashed again. The security level comes from the amount of Zero-Bits at the beginning of the resulting hash.
My plan was to use my GPU to do this, because I heared GPUs are good at hashing. And now, I got it to work.
~ How I did it ~
I am using a start offset of 0, create 255 Threads on my GPU (apparently more are not possible) and let them compute those hashes. Then I increment the offset in every thread by 255. The GPU also does the job of counting the Zero-Bits, when there are more than 30 Zero-Bits I print the amount plus the offset to the console.
~ The speed ~
Well, speed was the reason I started this. It's faster than my CPU for sure. It takes about 2 minutes and 40 seconds to compute 2.55 Billion hashes which comes down to ~16 Million hashes per second.
Is this speed an expected result, is it slow or fast? I don't know, but for my needs, it is fucking fast!
~ What I learned from this ~
I come from a Java background and just recently started C/C++/C#. Which means this was a pretty hard challenge, since OpenCL uses C99 (I think?). CUDA sadly didn't work on my machine because I have an unsupported GPU (NVIDIA GeForce GTX 1050 Ti). I learned not to execute an endless loop on my GPU, and so much more about C in general. Though it was small, it was an amazing project.1 -
The lower the level language, the more concerned I am with performance for some reason...irrational I know.
Programming in C: oh no I have this extra if statement which may have to copy the 16 byte struct.
Programming in Python: oh hey I can simplify the logic if I write a class to dynamically build this regex, compile it, and search through a 1MB text file.5 -
Idea: Corruption as a service.
RESTful API where you send a URL to a file, an intensity and a method, and if the file's under some size, we return a URL to the now-corrupted file on the server, which is removed after like 5 minutes of inactivity or something.
Depending on method and intensity, corruption amount varies from one byte to every byte being either replaced or added to/subtracted from by a certain amount.23 -
Got to admit. Got a little surprised when stream.ReadByte() returned an integer instead of a byte.8
-
What the actual fuck. I just found out that on one of the SSD's I bought, the optimal partition start / finish sizes which apparently on that unit only occur every 65 THOUSAND 4kB sectors (which translates to about a quarter GB) means that I have to throw away half a GB worth of space on that disk in order to align it. Very optimized indeed, dear SSD manufacturer! Huge alignment numbers for just that much extra wastage in the name of optimization. Something like 4x sector size on 512 byte sectors or 1x sector size on 4k sectors.. ain't nobody gonna need that. Let's make it a quarter GB.
And that's what they call engineering?10 -
Found a big box of forgotten thumb drives at the shop, still packaged and everything. 7 yrs old or so. Figured I should test them. They're all the same 2GB Kingston drive. 30 tested good, 13 had 0 byte raw capacity, 12 reported that they were CD drives, 13 reported 1.1TB capacity, and 9 either got really hot or went up in smoke.6
-
UTF-8 without BOM.
{ ä, ö, ü } are not going to be decoded correctly.
Why the fuck does BOMless UTF-8 still exist? Such a pain in the ass.7 -
Is there anything uglier than XML documentation comments? The signal to noise ratio is appalling, like an exercise in redundancy for the sake of redundancy.
/// <summary>
/// Initializes a new instance of the <see cref="CipherInfo"/> class.
/// </summary>
/// <param name="keySize">Size of the key.</param>
/// <param name="cipher">The cipher.</param>
public CipherInfo(int keySize, Func<byte[], byte[], Cipher> cipher)
{ ... }
Compare that to the equivalent markdown documentation comments:
/// Initializes a new instance of the <see cref="CipherInfo"/> class.
/// ##Parameters
/// - `keySize` - Size of the key.
/// - `cipher` - The cipher.
public CipherInfo(int keySize, Func<byte[], byte[], Cipher> cipher)
{ ... }3 -
My goal was to hack the game to increment a random byte of memory every frame if SELECT was pressed. Mission accomplished!
(Done with ASM hacks, not recompiling from the pokeblue disasm)1 -
ARRRGGHHH! When the person sitting next to you produces nothing but shit and you know it's shit but, your boss doesn't because he's never written single byte of code in his life!2
-
when someone tries to wrap their MIDI in 3 layers of crypto to distribute it without allowing access but they used ZipCrypto on a file format with a 14 byte header where only 4 bytes change3
-
Dev: Hey infra guys, our backend time to first byte takes 8 seconds! Can you guys investigate?
Network team: Oh yeah that's normal, we don't investigate anything below 30s, that's our SLA 😎
😵5 -
Two bytes meet. The first byte asks, “Are you ill?”
The second byte replies, “No, just feeling a bit off. -
Just go to GPT and get me the code today!!!
Like wtf why does every non-tech guy thinks GPT is the solution for each problem.
So, a workmate wanted a fullstack system ready in 2 days and argues that its too easy with GPT. I mean yeah GPT helps, sometimes, on frequent rare occasions. But, that can't be the solution to everything, like ask it to setup the whole backend frontend integration, will it? ask it to manage assets will it? ask it to write complex code, it fails, miserably, okay like me but that's the point. Just because random transformers pop up each week containing some random shitty weights (not always agreed) that can't replace a full stack developer. These 'attention' seeking models are as good as another tool, a bit efficient, but at the end of the day its just a tool, all it does is lessen the typing time but gives more errors too. The average time remains the same. And my non-tech manager can't understand he can't do it himself earlier using GPT. Succkkkkkkssss!5 -
Can someone help me settle an argument with a coworker?
So let's say there is a REST interface that returns a PDF representation of an resource...but it requires the authorization header in order to authorize that you have access to the document in question.
And let's say there is a link on the page that redirects to this endpoint to serve up the document. He thinks you can add a header to the HTTP request that goes out when you click on the link (a regular old anchor tag) with onclick without making an xhr call.
I told him that you would have to use an xhr call to add headers, and that even then you would receive a byte stream back, which without using a blob and an object url or a data uri you wouldn't be able to display it in a new tab or start a download.
Regardless he went on to tell me I was wrong. The next day he said he had done it. I asked him to show me, and he said "oh it's at home", and then proceeded to ridicule me in front of my architect. He always pulls this one up's man ship bullshit and I hate it. And I am pretty sure he's wrong.10 -
I think I'm getting crazy...
Yesterday evening I finally thought it was a great idea to set up Gitlab CI to let the server build (ng cli) and deploy (via FTP) an Angular5 SPA on commits on the master branch.
BUT...
The npm package "vinyl-ftp" thinks it is pretty fucking funny to just randomly stop in the middle of uploading files or just upload some files with 0 bytes in size.
WHAT THE HELL?
After some hate infested trial and error, it seems that the more parallel channels I set up, the more chance I get that all files are correctly uploaded, but never all.
If anybody here happens to be some kind of mighty byte bender and knows what to do, I'd be thankful. But I will probably try out a different client in the docker image...1 -
The process of making my paging MIDI player has ground to a halt IMMEDIATELY:
Format 1 MIDIs.
There are 3 MIDI types: Format 0, 1, and 2.
Format 0 is two chunks long. One track chunk and the header chunk. Can be played with literally one chunk_load() call in my player.
Format 2 is (n+1) chunks long, with n being defined in the header chunk (which makes up the +1.) Can be played with one chunk_load() call per chunk in my player.
Format 1... is (n+1) chunks long, same as Format 2, but instead of being played one chunk at a time in sequence, it requires you play all chunks
AT THE SAME FUCKING TIME.
65534 maximum chunks (first track chunk is global tempo events and has no notes), maximum notes per chunk of ((FFFFFFFFh byte max chunk data area length)/3 = 1,431,655,763d)/2 (as Note On and Note Off have to be done for every note for it to be a valid note, and each eats 3 bytes) = 715,827,881 notes (truncated from 715,827,881.5), 715,827,881 * 65534 (max number of tracks with notes) = a grand total of 46,911,064,353,454 absolute maximum notes. At 6 bytes per (valid) note, disregarding track headers and footers, that's 281,466,386,120,724 bytes of memory at absolute minimum, or 255.992 TERABYTES of note data alone.
All potentially having to be played
ALL
AT
ONCE.
This wouldn't be so bad I thought at the start... I wasn't planning on supporting them.
Except...
>= 90% of MIDIs are Format 1.
Yup. The one format seemingly deliberately built not to be paged of the three is BY FAR the most common, even in cases where Format 0 would be a better fit.
Guess this is why no other player pages out MIDIs: the files are most commonly built specifically to disallow it.
Format 1 and 2 differ in the following way: Format 1's chunks all have to hit the piano keys, so to speak, all at once. Format 2's chunks hit one-by-one, even though it can have the same staggering number of notes as Format 1. One is built for short, detailed MIDIs, one for long, sparse ones.
No one seems to be making long ones.6 -
I wonder what data type dfox uses to store the voting score. We definitely know it's not a byte. Next up, let's test if it's an int163
-
Sometimes I wish I could just print out Ubuntu byte by byte onto a paper and then throw it into a fire to just watch it burn... ....🤔.... .....hold on!.... ....waaaait a moment.... can I just literally do "dd if=/dev/sda | lp" ?!! 😈 ...brb1
-
WHY IS IT SO FUCKIN ABSURDLY HARD TO PUSH BITS/BYTES/ASM ONTO PROCESSOR?
I have bytes that I want ran on the processor. I should:
1. write the bytes to a file
2a. run a single command (starting virtual machine (that installed with no problems (and is somewhat usable out-of-the-box))) that would execute them, OR
2b. run a command that would image those bytes onto (bootable) persistent storage
3b. restart and boot from that storage
But nooo, that's too sensible, too straightforward. Instead I need to write those bytes as a parameter into a c function of "writebytes" or whatever, wrap that function into an actual program, compile the program with gcc, link the program with whatever, whatever the program, build the program, somehow it goes through some NASM/MASM "utilities" too, image the built files into one image, re-image them into hdd image, and WHO THE FUCK KNOWS WHAT ELSE.
I just want... an emulator? probably. something. something which out of the box works in a way that I provide file with bytes, and it just starts executing them in the same way as an empty processor starts executing stuff.
What's so fuckin hard about it? I want the iron here, and I want a byte funnel into that iron, and I want that iron to run the bytes i put into the fuckin funnel.
Fuckin millions of indirection layers. Fuck off. Give me an iron, or a sensible emulation of that iron, and give me the byte funnel, and FUCK THE FUCK AWAY AND LET ME PLAY AROUND.8 -
Dont blame me for making Minecraft plugins, but holy shit i really hate stairs right now.
Im modifying some old code of mine to add extra features, and i just need to be able to rotate stairs 90, 180 and 270 degrees, then im past this bump.
Stairs get their direction based on a byte value that makes no fucking sense to me.
North = 3
West = 1
East = 0
South = 2
Ive been drawingto see if that made me go "oh like that", checking if the bits of each value had a system, and now im here.
Titshit.
I dont know who made it like this, but i really dont want to make some static switch or if/else statement to process this directional trash. I want it flexible.
If you spotted a system to the numbers, please mail me a rock, and then tell me how i fix this.12 -
In modern applications it's media files that take up so much space, code files are relatively s-
*checks size of Rust project* -> 4GB wtf?
Turns out Rust Language Server generated fucking 3.6 gigabytes of "code analysis"!
Hey, I like what they're doing with RLS but seriously, 3.6 GB? I'm on an SSD, people. Every byte counts.
Rust is still 😍 though -
Staring at computer trying to figure out why I can't read a float from modbus. I swapped the bytes correctly for my platform. I also ensured the endianess of the words matched my platform (byte endianess is not the sames as word endianess, fml). Was driving home thinking about what could be wrong. My mind saw this code:
uint32_t newint;
for(int count=0; count<2; count++){
newint |= words[count] << count;
}
Then I am fuck! It should be:
newint |= words[count] << (count*16);
This was later turned into float. I kept getting values in the 1e-40 or some shit. Now it makes sense. The upper word was not set.
This is such newb shit. Fuck you newb shit I should just know!
Reading more I realized that the endianess of words can vary between devices even though the spec calls for big endian words. Fuck you non-compliant vendors! So I gotta add a flag for fucked up devices. Fine. The pay off is a generic way to add modbus to our opcua server. I want this easily editable in the field. For now it is readonly. So that makes it nicer.
Just a little torqued that I solved this driving home instead of at work. Too close to the code. I think tomorrow I will have my boss review it to tell me of other logical crap I missed.3 -
My friend was telling me that there is a way of translating Python programs into Gava byte code for the Gava Virtual Machine. using something called Gython.5
-
TIL you can crash a Tomcat request processing if the app reads request bodies using a reader() and you feed it a json body with an innocent nbsp :) the whole request processing just goes *pooooft*
reminds me of an ios bug which could brick the phone if it received an sms with weird chars.
These lynch-pin-bugs where a single byte/char in the right place at the right time can tear things down, are so subtle and fascinate me for some reason :)3 -
I never understood the ‚space vs tabs‘ war ...
Tabs can do everything that spaces can plus more:
* look the same as spaces, but its width is configurable (at least in a decent editor)
* the safe space (1 byte vs 3 or 4)
* you can decrease the intendation leven with one bsckspace keypress in every(!) editor.
So the winner can only be tabs? Why would I even limit myself with spaces?
I dont wanna start a flame war, just curious what you guys (especially the spaces lovers) think about it11 -
Can you help me to come up with a company name?
I want to provide dev services (mainly mobile apps) but I also want to have couple projects of my own, so I can't go with a name which indicates only mobile apps. This is the keyword list that I have at the moment:
dev
optimal
baltic
digital
digital
app
cyber
data
vision
systems
projects
solutions
apps
systems
tech
development
software
strategy
byte
builder
services
industries
house
Factory
incubator
media
dev
projects
net
tools
system
center
tech
pro
loft
devs
and these are my current ideas:
appswat.com
appdevhouse.com
balticdevs.com
devbaltic.com
balticincubator.com
appdecision.com
balticstrategy.com
appmobservice.com
appmobservices.com
appmobileservice.com
appbaltic.com
devbaltic.com
mobilebaltic.com
databaltic.com
balticcyber.com
solutionmob.com
mobiledevmedia.com
balticmobilevision.com
balticmobilesoftware.com
mobilemediasystem.com
probaltictech.com
But none of them seem good enough :/
What do you think about appbaltic.com or devbaltic.com ? Does this name makes sense for you native speakers?
Baltic because it will be an eastern european company located next to Baltic sea. We will provide dev services and have couple projects of our own.14 -
Just a quick rant on JavaScript,
So there’s a lot of people hating javascript, and while not a long time ago i was part of them, but I changed my opinion a little.
I think JavaScript is a great way to deal with website programming as it is quick and efficient, but I would not say to program directly on it, use a js-compilable language (CoffeScript, TypeScript, Kotlin(I think), etc.), but then you might say: “Well, no need for js then, compile it in byte code”. That would break the point of how I see web design/dev. The main intent behind webpages is to have an easy and fast way to send code to other computers to render them, that’s why it is interpreted: “Easy to send” and “*All* computers can handle it” with the proper browser. You need to be able to change the way the website is rendered and/or works sometimes, for diverse reasons like copy/pasting data, make it render properly or use plugins/add-ons to change that code to suit your needs.
I think js should be kept as a “readable byte-code”, so that means: {
Keep comments when compiling the js-compilable code,
Add standardized machine-readable comments that will indicate to smart code viewers how to show a particular thing (Like have a higher-end function compiled in js shown as a minimized code with explanations of the function)
Keep it nicely formated and don’t obfuscate (coz that’s annoying)
Etc.
}
So you bypass the quirks and all that pesky js stuff, while keeping it’s good sides.
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
Part 2:
Web design for non-web:
Ok so things like node.js, electron, react-native and all that stuff; I won’t say they’re bad but...
Why we have this is because web designers wanted to make desktop apps and were like “Hey! Making web pages is easy! Let’s port it to desktop”, the problem is: Web technologies were made to work on a restricted canvas, aka a browser. It’s good on web for reasons mention earlier and more. But it’s not on desktop! You’re trying to push it outside of those boundaries. It’s difficult to make it break that canvas and go outside, make something that really works! For social media clients and that kind of stuff that you want to make a little more inclusive, yes! it’s a great idea (hello devrantron ;), but not if it’s an exact same copy of the website, just use the website. But for things that are supposed to really make use of YOUR computer; no!
I see those PWA (progressive webapps aka mobile app, but it’s an offline website”), I stand for the same positions, social media and those sort of things: yes, great idea! Games? 🤢.
I have way more to say but I have difficulties to remember them while reading, so feel free to comment your thoughts
Lol, “just a quick rant”1 -
"Our Data Service comes PRE-P0WN'D"
Those SHIT-FOR-BRAINS data service providers GLOAT that their data can be natively integrated into most BI platforms, no code required.
How? Because they will EXPOSE THE ENTIRE FUCKING THING ON THE INTERNET.
LITERALLY.
UNAUTHENTICATED URL WITH THE ENTIRE DATASET.
STATIC. WON'T EVER FUCKING CHANGE.
NO VPN REQUIRED. NO AUTHENTICATION HEADERS. NO IN-TRANSIT ENCRYPTION.
"It is safe! No one will know the secret token that is a parameter in the url"
BLOODY BYTE BUTTS, BATMAN! IT IS A FUCKING UNAUTHENTICATED URL THAT DOES NOT REQUIRES RENEWAL NOR A VPN, IT WILL LEAK EVENTUALLY!
That is the single fucking worst SELF-P0WN I have ever seen.
Now I know why there are fucking toddlers "hacking" large scale databases all over the globe.
Because there are plenty of data service providers that are FUCKING N00BS.4 -
Why tf people still use anything that is not UTF-8?? I could understand if you are from a language with most of its chars out of the first byte, but still, it is increadible the amount of things encoded using latin-1 and similar others... It is time to STOP!1
-
We're rebuilding out company's platform from the bottom up, and throughout this process I've learned a lot. However, the stuff I've done lately has fascinated me the most. We're implementing OpenOffice for converting files to PDF. Since I started with this task I've had to implement secure running of OpenOffice by sandboxing and queues, but by far the coolest thing was what I did today. I was trying to implement IPC, and damn was it fun. I actually ended up writing a full parser for raw byte streams, since we had to include some special information. It was fun 😁
-
Visual Studio Code !!
It has tons of features, form keybinding, to language support
I just love the inbuilt terminal support
And with git integration and some plugins, there's absolutely no need for separate git client -
We don't like someone correcting our grammar...
But we would be so grateful if someone corrects our code :)3 -
"You broke the build"
o.O
Me checking the build.
Oh. There's a weird 500 from github.
Oh yeah:
Error 503 first byte timeout
on the package.json of some node dependency.
That's what you get for relying on the cloud. -
I'm delirious so here's your daily dose of fuck:
```fasm
; --- * --- * ---
; 64-bit byte-by-byte mash
macro clamp_u8 {
mov cl,$08;
mov rdx,rax;
rept 8 \{
rol rdx,cl;
xor al,dl;
\};
};
; --- * --- * ---
; give 8-bit random seed
macro prng_u8 {
rdtsc;
shl rdx,32;
or rax,rdx;
clamp_u8;
};
; --- * --- * ---
; roll dice
d20: prng_u8;
; x%20, according to gcc ;>
mov edi,eax;
mov eax,-51;
mul dil;
shr ax,12;
lea eax,[rax+rax*4];
lea edx,[0+rax*4];
mov eax,edi;
sub eax,edx;
; discard high and give
and rax,$FF;
ret;
```
I guess `d20` could be inlined too but I thought it'd be too much.
Is it faster than straight C? Probably not. But it's way lighter, so it loads faster. Below five hundred bytes mother fucker.
Now if you'll excuse me, I'll go sit in the darkness repeteadly typing roll 1d20 on the terminal. For reasons.9 -
Q: What's the relation between Java and Javascript?
Ans: What's the relation between Car and Carpet?!5 -
Let's focus/master computer architectures, coding paradigms, datastructures. Everything comes after that...the problem with todays academics is that they are more focused on immediately deploying students to industry; theyre more focused on teaching specific frameworks and specific language instead of teaching how things work...i bet most students (at least in my country) are having troubles with endianess or encoding or even byte manipulation or what a thread is....If im going to be the teacher for example of an oop subject, ill let the student choose the language they want as long as the oop paradigm is intact ,it will be fine.. i dont friggin care whether you know vue or angular or swing if you dont even know what a callback is..
-
Here are some of the variable types in java if someone needs it :)
-String myString = "Hello";
//integeres
- Byte myByte = 127; [It can hold up to 128
-Short myShort = 530; [up to 32767] -> 2 bytes
-int myInt = 8021; [up to 2,147,483,647] -> 4 bytes]
-long myLong = 213134; [ up to 9,223,372,036,854,755,807] -> 8bytes
//Decimal Numbers
-float myFloat = 3.14f;
-double myDouble = 23.45;
P.S.
I hate double... idk why
Bye12 -
Huge mistake on a customer billing procedure.
That procedure was generating a file for automatic billing requests from our customer bank to his customers banks.
That procedure was shifting the bank coordinates by one byte right making all payment requests invalid and rejected.
That month the customer got nothing from invoices (more or less 80k euros).
Side note; only one payment was accepted because the guy entering the invoice on the system shifted the bank coordinates by mistake, so the procedure fixed it.
:/ -
How do gophers (Go devs) feel about the new Go logo ?
I can get used to it but it feels more like a logo of a company that might rival Uber.
The gopher gave it an easy to use and understand feel, this new one gives a fast and sleek look. It wants to showcase "Fast" more than anything else.10 -
The last eight years were fun, but I ran out of space while trying to compile a project, and, well, your number came up. I'm sorry...
I need a bigger SSD. I launched Visual Studio (which I rarely use so it only had the default extensions installed) to clone and build the new Windows Terminal to see what it's like. Had to download over 10GB of extensions and features first, and then compiling the project ate up every last byte of remaining space.7 -
I really hate PHP frameworks.
I also often write my own frameworks but propriety. I have two decades experience doing without frameworks, writing frameworks and using frameworks.
Virtually every PHP framework I've ever used has causes more headaches than if I had simply written the code.
Let me give you an example. I want a tinyint in my database.
> Unknown column type "tinyint" requested.
Oh, doctrine doesn't support it and wont fix. Doctrine is a library that takes a perfectly good feature rich powerful enough database system and nerfs it to the capabilities of mysql 1.0.0 for portability and because the devs don't actually have the time to create a full ORM library. Sadly it's also the defacto for certain filthy disgusting frameworks whose name I shan't speak.
So I add my own type class. Annoying but what can you do.
I have to try to use it and to do so I have to register it in two places like this (pseudo)...
Types::add(Tinyint::class);
Doctrine::add(Tinyint::class);
Seems simply enough so I run it and see...
> Type tinyint already exists.
So I assume it's doing some magic loading it based on the directory and commend out the Type::add line to see.
> Type to be overwritten tinyint does not exist.
Are you fucking kidding me?
At this point I figure out it must be running twice. It's booting twice. Do I get a stack trace by default from a CLI command? Of course not because who would ever need that?
I take a quick look at parent::boot(). HttpKernel is the standard for Cli Commands?
I notice it has state, uses a protected booted property but I'm curious why it tries to boot so many times. I assume it's user error.
After some fiddling around I get a stack trace but only one boot. How is it possible?
It's not user error, the program flow of the framework is just sub par and it just calls boot all over the place.
I use the state variable and I have to do it in a weird way...
> $booted = $this->booted;parent::boot();if (!$booted) {doStuffOnceThatDependsOnParentBootage();}
A bit awkward but not life and death. I could probably just return but believe or not the parent is doing some crap if already booted. A common ugly practice but one that works is to usually call doSomething and have something only work around the state.
The thing is, doctrine does use TINYINT for bool and it gets all super confused now running commands like updates. It keeps trying to push changes when nothing changed. I'm building my own schema differential system for another project and it doesn't have these problems out of the box. It's not clever enough to handle ambiguous reverse mappings when single types are defined and it should be possible to match the right one or heck both are fine in this case. I'd expect ambiguity to be a problem with reverse engineer, not compare schema to an exact schema.
This is numpty country. Changing TINYINT UNSIGNED to TINYINT UNSIGNED. IT can't even compare two before and after strings.
There's a few other boots I could use but who cares. The internet seems to want to use that boot function. There's also init stages missing. Believe it or not there's a shutdown and reboot for the kernel. It might not be obvious but the Type::add line wants to go not in the boot method but in the top level scope along with the class definition. The top level scope is run only once.
I think people using OOP frameworks forget that there's a scope outside of the object in PHP. It's not ideal but does the trick given the functionality is confined to static only. The register command appears to have it's own check and noop or simply overwrite if the command is issued twice making things more confusing as it was working with register type before to merely alias a type to an existing type so that it could detect it from SQL when reverse engineering.
I start to wonder if I should just use columnDefinition.
It's this. Constantly on a daily basis using these pretentious stuck up frameworks and libraries.
It's not just the palava which in this case is relatively mild compared to some of the headaches that arise. It's that if you use a framework you expect basic things out of the box like oh I don't know support for the byte/char/tinyint/int8 type and a differential command that's able to compare two strings to see if they're different.
Some people might say you're using it wrong. There is such a thing as a learning curve and this one goes down, learning all the things it can't do. It's cripplesauce.12 -
I bought a laptop with a 4GHz CPU, 32GB of RAM, 2TB fusion drive all to execute a hello world script in the terminal so that it can run fast :)4
-
I swear the implementation of byte arrays in dot net is fucking brilliant, never thought I would give good credit to dot net but the amount of bloody times this shit has saved me is unbelievable...3
-
What's the strangest Assembler or Pseudo-Assembler you've ever encountered?
I wrote a Z-machine (Infocom's virtual text adventure interpreter) and it was quite an interesting interpretation of bytes:
- The first 3 bits of an instruction tell you the opcode category, the rest are the instruction
- The 2nd (and maybe 3rd) byte tell you in 2-Bit chunks the operand types.
- text is encoded in 5-Bit chunks, with special characters for CapsLock that double function as padding (if your text doesn't align with the 3 letters per 2 bytes).
- and of course there are 5 different versions that all work slightly differently (as in CapsLock becomes Shift or "this special character isn't in use anymore")3 -
RIP the great Jerry Pournelle. Enjoyed his wonderfully witty dawn of PC revolution columns in Byte magazine - Chaos Manor. So many memories.
You guys would have loved his columns and he would have loved devRant 😪 -
Turns out MD5 collisions are hard to iterate through. Max combinations of bytes in a 100,000 byte file is (as calculated by Python:)
413502433742660544726868172195767861427618658445205343992065892230166930397146583182005172845204489533665188550385797247605830027690030912310887164176364954875069038057666590769687571726193148717652368418744731692453987107907857683242360451588862381980796040785447771748097295949966591258383632274557701138287596503423452399232536933583768184114874795654760979888748015241761933209111943015224044366005903481415990946152075730054176507652408593662525624208010788644701872255643844493769499469673271219048262961476704374776988472648537308308011235412742501908803475102336862442166237905095612511941476299337727729022024118389323121828087330601048095646801171259973845170877342411799823272475101891307296782554819753985119403152255745494789644397312746702721825997945525576
i'm getting 1227.97 iterations a second. (Note: no, not using C, i don't know enough to do it in C. If someone wants to take my script, redo it in C, and send it to me for comparison, that'd be great.)12 -
My compiler tells me, "Hey, you have an error at line 389, resolve it!"
Me [In wonder]: What the heck are you talking Mr Compiler, my program is of 32 lines only!!!2 -
PC Trivia-
1. What does a baby computer call his father?
Data
2. What do you call a computer superhero?
A Screen Saver
3. Why did the computer cross the road?
To get a byte to eat
4. Why did the computer get glasses?
To improve its websight
5. Why did the computer sneeze?
It had a virus
6. Where do computers go to dance?
The disk-o
7. Why did the computer squeak?
Because someone stepped on its mouse
8. What happened when the computer geeks met?
It was love at first site
9. What is an alien’s favorite place on a computer?
The space bar
10. What’s the best way to learn about computers?
Bit by bit3 -
My biggest dev sin is premature optimization. I'll try to produce the best possible code without the need for it to be there. I will waste my time thinking of wierd edge cases that can be handled with a simple if-else, but why not tweak the algo to handle them internally.
-
Spend hours debugging a python script because tests fail. Turns out ftp (the unix binary) adds CR bytes to every byte in a .gz file that looks like a LF on upload (in test setup). Client and server are both linux. 😭
Yes i know switch to binary mode (that fixed it - why not default??). But still WHY CR? Didn't ask for it. No windows in sight.1 -
Halt and Catch Fire is having another great season. Lived those days and it is so true. CompuServe, Compaq, Commodore, 5 1/4", Tandy 1000, Byte Mag, Atari, The Well... The tech you see is really 1985ish. Attention to detail is appreciated by long time technologists.
H&CF is about building a tech business and much applies to today's startups. That two brilliant tech women are leading the charge adds to it. All the characters are great Cameron, Gordon, Donna, the devs at Mutiny and Joe channeling Jobs (in my opinion) is spot on.
Any H&CF fans have an opinion?4 -
Two bytes meet. The first byte asks, “Are you ill?”
The second byte replies, “No, just feeling a bit off.”1 -
That feeling when you have been working on tiny microprocessors and questioned your self for every declared byte, and suddenly gets to work on the serverside of the project.
-
Another small update on my games modding stuff...
Currently building a command line tool to pack the game data, currently have a working sprite packer and am able to actually read data from the packed file and export all images byte for byte... Holy shit I might be able to actually do this!
Let me know if anyone might be interested in seeing a demo or some very unclean source code!5 -
ARPAWOCKY
Twas brillig, and the Protocols
Did USER-SERVER in the wabe.
All mimsey was the FTP,
And the RJE outgrabe,
Beware the ARPANET, my son;
The bits that byte, the heads that scratch;
Beware the NCP, and shun
the frumious system patch,
He took his coding pad in hand;
Long time the Echo-plex he sought.
When his HOST-to-IMP began to limp
he stood a while in thought,
And while he stood, in uffish thought,
The ARPANET, with IMPish bent,
Sent packets through conditioned lines,
And checked them as they went,
One-two, one-two, and through and through
The IMP-to-IMP went ACK and NACK,
When the RFNM came, he said "I'm game",
And sent the answer back,
Then hast thou joined the ARPANET?
Oh come to me, my bankrupt boy!
Quick, call the NIC! Send RFCs!
He chortled in his joy.
Twas brillig, and the Protocols
Did USER-SERVER in the wabe.
All mimsey was the FTP,
And the RJE outgrabe.
D.L. COVILL
May 19731 -
I just got my third 128GB MicroSD card off Amazon, this time SanDisk. Yet again, trying to do anything not involving the OEM full-disk exFAT partition staying intact (which, fuck that, all that uses that is Windows and Linux, i'm looking for splitting this thicc bih up) shifts EVERYTHING, including MBR+PT/GPT down the disk by 16MB exactly inserting data from... the atmosphere? whatever's using it? ...do SD cards have that secure key/DRM store space thing still?
(EDIT: I do verify that they ARE genuinely the right size after purchasing before reformatting or repartitioning, by the way.)
First it was a Silicon Power card, then a Samsung card, now a SanDisk.
(Also, why all S?)
Luckily, this time it wasn't a pain in the ass to get it to read as anything but "Bad Card" or a 0-byte/empty/non-existent device in Windows/Linux (respectively) so I was able to see that it was indeed the same issue without taking 3 days to jump through device hoops to finally get it to do it again but in such a way that it shifts out and back in all zeroes.2 -
Came across this in a part of a web service I inherited from a junior we fired last year.
I am no C# expert, but I do believe there are better ways to read a byte array from a JSON string, am I right?18 -
What's the worst thing that happened to you today?! 🥲 😕
For me, it is, accidentally putting my node_modules folder into antivirus for scanning!! 😭 😩
I don't know whether I can use my antivirus ever again ... 🥺 😞9 -
So, the other day, I was working in Unity, and trying to find the complement of a byte number. That is, 255 - myByte. So, I write this :
Byte newByte = 255 - myByte;
And it says that it can't convert from a byte to an int. Okay... So, I do this:
Byte newByte = byte.MaxValue - myByte;
And still, it errors the same thing. So, a quick google search proves that no matter what, the subtraction operator returns an int. WHAT IS WRONG WITH C#? That is the dumbest thing ever!4 -
>Working on code
>Shit works as intended first try, nice
>Goes to play strange bootleg Gameboy Color ROM sent by a friend
>ROM immediately fucking dies
wtf.svg
>Pop emulator's debugger
we're executing from VRAM, stack's firmly embedded in ROM
>why
>Add execution breakpoint to entrypoint of game, restart emulated system (because i'm actually using the legit bios i hacked so it allows null/corrupted games to run)
>Step through everything, everything goes well until all of a sudden we call a function and shit hits the goddamn fan
well we have the culprit
>step through subroutine
if <unused_byte_in_HRAM> != 0 then stackPointer+=32;tryAgain();else return
>***y***
>Realize this is using a bootleg Memory Bank Controller with hard-backed encryption so none of the bytes executed or read as data are the right byte
>Find emulator that'll handle the jank MBC
>read code to try and figure out how it works
if checksumExtendedLogoBlob == some_number then set MBC_Bootleg1 else if checksumExtendedLogoBlob == some_other_number then set MBC_Bootleg2 else if...
>of course
>Spend 10 minutes finding the right bootleg MBC
>code shows 8 possible tables for real bit order based on some value in the cart header
>look for code that gets this value
>not in the header
>not in ANY header in this 1000+ file emulator
>not in any related cpp files???
>get desperate
>email author
>"Delivery failed: email doesn't exist"
fuck me i guess2 -
NULL and '/0' are two different things. NULL is a null pointer. '/0' is a null byte. C handles those two differently enough to introduce some interesting issues. Helped a friend debug his code, execvp() was freaking out because he had tried to terminate his argv array with a null byte instead of a null pointer. As far as the system was concerned, that doesn't mean anything more than "oh look there's no string here." Big big difference.3
-
When the program exactly fit on the MCU, using up every available byte of flash. It was just a small display unit, but it felt nice that I had chosen the smallest possible controller for the job.
-
I've been wondering about SQLite, how it decides to execute your SQL and then generates byte code to do it.
Hypothetically if you were sufficiently familiar with the quarks of SQLite at a low enough level, one could craft web requests on sites running it, such that the results of each subsequent request, leave the SQLite engine in a particular state, no?
Suppose previous states, when interleaved with subsequent carefully crafted states, lead to execution and injection vulnerabilities.
Arent ideas like this what lead to the randomization of jump addresses in modern architectures?8 -
mov al, [var]
var db 07h
Error on line 1: undefined operation size.
Silly me defining a byte, using mov on a byte-wide register with said byte-wide variable. What size it could be, the byte-wide variable is soo fucken unknown i'm so sorry.1 -
I was making software for a small handheld RFID scanner that would read specific fields from the tags. Somehow one of the fields always missed the first byte. Given that I was new to working with C I thought it was my lack of skills in the language. Spent days searching my methods, trying to find my mistake. After day two I found out I was given the wrong address to read from, and that I had just wasted two days.2
-
ATTENTION PLEASE! Important announcement following:
Please check your interface implementations for correct byteorder according specification BEFORE YOU START COMPLAINING ABOUT DATA FAILURES ON EXCHANGING DATA.
Freakin hell, if I'd get some money for every byte order mismatch on testing interfaces, I'd be a be a billionaire.
And why are all those highlevel I-know-every-fucking-framework developer incapable of checking the real memory content of a datatype, and the real data content on the interface even if you tell them that their byte order is obviously wrong?
No, your system is not the centre of the universe and I don't care how you get your less-than-32bit-datatypes-are-for-assembler-usage-frameworks to change byteorder. It's not rocket science, if there's no ready-to-use-function then write those 4 lines yourself.
Next time I get to specify an interface I'll go for mixed-endian, just to make sure everybody involved knows the concepts of endianess afterwards.2 -
Me: I'm a developer and what're you?
Him: I'm a tester.
Me: We can be friends until the release...
Him: After that?!
Me: It gets difficult...1 -
It took me five hours to find a Byte Order Mark added at the beginning of a configuration file of a php application.
Everything was working but every downloaded file was corrupted (the bom sequence was prepended to the content). -
Ideas I've had over the years that could pan out and be useful:
SMS-DB: Stands for SMS-Data Burst. Used to allow those with low cell signal or no data plan to transfer data between a phone and some client via the standard SMS text space. Would be slow, but would act kinda like dial-up over SMS (as mobile lines are compressed on all service levels, even LTE, so traditional dial-up wouldn't work!) I have a general idea on how packets would be laid out, but that's about it so far...
everything2PNG: Allows one to transpose any file's data into a PNG with a 3 byte per pixel (full color RGB), which allows for a "compression" of sorts (about 91, 93% on preliminary tests) AND allowing further, more efficient compression of the resulting file. (Plus... it's just kinda cool to see files transposed as PNGs.) I actually have a simple transposer to go to PNG, but can't yet go back. Large files (around 600MB) use upwards of 4GB with efficient paging and other optimizations via NumPy so far, so it's not *viable* yet, but it's coming along nicely.
RPi-GPIO Interconnection Bus: A master/slave or round robin method to allow for Raspberry Pis to communicate using GPIO, which can help free up network bandwidth in RPi cloud computing clusters. At most, this'd allow for 4 bits used for pushing to the GPIO "bus", and 4 bits used for pulling from the "bus". 8 pins total are usually unused minimum, so either 3 or 4 pins for upload, 3 or 4 for download, and potentially 1 or 2 for commands, general non-data communication, etc. I made a version of this concept using Round Robin for a client, but it was horribly slow. (I also don't have distribution rights for the code, so i'm working from scratch.) Definitely doable. -
!rant
...
.UseKestrel(options =>
{
options.Listen(new IPAddress(new byte[]{ 192, 168, 178, 20 }), 5000);
})
...
Look at this easy piece of code(that I added) from an Asp.NET Core 2 template project(MVC). I needed only to add this piece of code to WebHost.CreateDefaultBuilder() (in the Program.cs) to be able to setup a working WebServer which will listen and answer on that IP(local network machine IP) and port, then I opened that port from my modem on this local IP, then used DynDNS with noip.com, tested out on my smartphone with 4G connection and it does work!
This is the EASIEST web project setup and test that I've ever tried and that let me showcase something from my machine to the entire world! :')
Great job Microsoft; can't wait to try the cross-platform of this open standard. -
Q) What's the bravest action ever?
a) Sky diving
b) Rock climbing
c) Underwater diving
d) Doing fixes in Production
Correct Answer: Option (d)2 -
Is there any instructions videos or a book on how to handle managers or other people with severly diminished mental capacity?
Whatever I say gets missinterpered, I had an argument with the teams tattletale so now every step that could someway be interpreted wrong is an big issue that needs to be discussed and solved -> enter missinterpered...
I know when it seems like when the world suddenly doesn't make sense or is out to get you it's most often the observer that has changed but I've twisted and turned all variables (including myself) and realized that I'm in a fucked up situation.
Thanks for letting me vent a byte5 -
A few weeks ago a friend was teaching me about 16bit numbers because we were making one in C# with a function, but he said we need two numbers for the function to work.(so as an example were gonna use 0, 2)
Now I didn’t understand how two numbers were supposed to make one. And my friend could not explain it to me. So I researched the topic all day and the epiphany happened I realized I was looking at it all wrong. I shouldn’t be looking at it as 2 decimal numbers but 2 binary values or two binary arrays forming one byte array with a length of 16.7 -
A new app called Byte which is Vine remade and exactly same as Vine and the creator of vine made it, my question is what was this app developed in? Flutter, reactnative, native or what?4
-
When the invertor goes from ! To ~ and you stress out because its not working 111010 != 0 instead of 000101
-
https://frankforce.com/city-in-a-bo...
I couldn't even come up with this without the size limitation1 -
8 bits is always an octet, and i fucking hate it when people say 8 bits is equal to a byte, because in some some system that's not always true3
-
Why hasn't Google told us 5 years ago that we should use fragments whenever possible so it won't be a pain in the arse to add a navigation drawer?! 😥4
-
so my poor old hp bro is starting to give up on me after 3 years . there are both battery and performance issues. I knew its death was near when i got its keyboard replaced i saw its battery's state 6 months ago. it was fat as me . Now it can't live without the wire for more than 30 mins.
apart from that am getting frustrated with everyday performance of my system. all i open is 50 tabs of chrome and android studio where bitch gradle generates a billion byte sized files at million places and cache folders . (and sometimes a terminal and/or files and/or vscode).
I have decent specs tho i5 7th generation/8gb ddr4 ram/ 2gb nvidea graphics/ 1tb hdd. but still my ubuntu gets stuck everytime i switch between chrome and AS . (maybe i have not made correct swap partitions or maybe there is an issue due to ubuntu/windows dualboot)
what should i do ? I guess i have to spend some shit on a new battery. But apart from that, iwanted to know about performance. how to get a beter performance?
I have heard of solutions like getting an sdd or increasing ram, but am broke af and might not afford a 1tb ssd (yes i do need that much amount of memory, my system is currently at 650 something gb) and about ram i have heard it doesn't offer much improvements. is that true?What should i do?6 -
Another leetcode interview down. I really appreciate the options to choose your own language nowadays; being forced to use C to figure out byte gaps is like being forced to clean the freeway with a toothbrush!1
-
CEO of my company often walks in our office with a joke: "I can't hear you do bit & byte".
I still don't catch it. -
Two bytes meet. The first byte asks, “Are you ill?”
The second byte replies, “No, just feeling a bit off.”9 -
A beginner in learning java. I was beating around the bushes on internet from past a decade . As per my understanding upto now. Let us suppose a bottle of water. Here the bottle may be considered as CLASS and water in it be objects(atoms), obejcts may be of same kind and other may differ in some properties. Other way of understanding would be human being is CLASS and MALE Female be objects of Class Human Being. Here again in this Scenario objects may differ in properties such as gender, age, body parts. Zoo might be a class and animals(object), elephants(objects), tigers(objects) and others too, Above human contents too can be added for properties such as in in Zoo class male, female, body parts, age, eating habits, crawlers, four legged, two legged, flying, water animals, mammals, herbivores, Carnivores.. Whatever.. This is upto my understanding. If any corrections always welcome. Will be happy if my answer modified, comment below.
And for basic level.
Learn from input, output devices
Then memory wise cache(quick access), RAM(runtime access temporary memory), Hard disk (permanent memory) all will be in CPU machine. Suppose to express above memory clearly as per my knowledge now am writing this answer with mobile net on. If a suddenly switch off my phone during this time and switch on.Cache runs for instant access of navigation,network etc.RAM-temporary My quora answer will be lost as it was storing in RAM before switch off . But my quora app, my gallery and others will be on permanent internal storage(in PC hard disks generally) won't be affected. This all happens in CPU right. Okay now one question, who manages all these commands, input, outputs. That's Software may be Windows, Mac ios, Android for mobiles. These are all the managers for computer componential setup for different OS's.
Java is high level language, where as computers understand only binary or low level language or binary code such as 0’s and 1’s. It understand only 00101,1110000101,0010,1100(let these be ABCD in binary). For numbers code in 0 and 1’s, small case will be in 0 and 1s and other symbols too. These will be coverted in byte code by JVM java virtual machine. The program we write will be given to JVM it acts as interpreter. But not in C'.
Let us C…
Do comment. Thank you6 -
i had a project in a networking class where the provided code was meant to act as a proxy (aka just passing bytes around), but because of the implementation, every byte had to be a valid unicode character
anyway lotta people were frustrated so we asked the course staff and their response was basically "we wanted to support python 2 and 3"
...1 -
dammit ti why must your torture be limitless
> eZ80 has awesome DMA-like instruction that copies byte chunks based on registers and it's nigh-instant to copy 64k it's great
> TI has the opcode disabled outside a 4-byte chunk erroneously unincluded from all blacklists and access regulation
> can't bankswitch and keep registers, and can't write to anywhere but those 4 bytes in that bank
> no reusable code in target bank that i can use via mid-func bankswitch1 -
More linux driver woes:
Driver is passed a file position and byte count when asked to read from a device. Sounds easy, right? FUCK no.
For reads, driver is passed struct `filp` with field `f_pos`, a direct pointer to the same struct field, int `count` as a number of bytes to read, and `buf` to return those bytes with. Problem is, requesting, say, 256 bytes from location 10000000h will give the driver `filp->f_pos = 0`, `f_pos = 256`, and `count = 0`. I don't know how to fix this and there's NO help for this shit. None whatsoever.
This shit, right here, is why Linux drivers suck ass.4 -
me: solve emoji ( _ * _ )
c++: I've name-o-phobia
java: I can't byte it
c#: It doesn't look sharp
rust: I' new here
......everyone is fighting....
.
.
python: declare _ not war 😎😎 -
I think the Golang serialization API is utter garbage.
By convention it usually looks like this,
MarshalFormat() ([]byte,error)
UnmarshalFormat([]byte) error
This means that all serialization and deserialization is done on, heap allocated, in memory buffers ( technically also mmaped files, but thats not cross platform).
As the Go GC is ruthlessly optimized for minimum latency, this can potentially cause memory leaks in long running applications.
I think we need a new serialization API that looks more like
SerializeFormat(io.Writer) error
DeserializeFormat(io.Reader) error3 -
I just discovered that Go needs a very long time to compile a 120MB source code file. Beside the fact that the file was very big, it just contained a big amount of byte arrays.
Did anyone had ever such big source code files?5 -
Me: [Curiously] How many seconds are there in a year?!
AI: [Confidently] 24 of them! January 2nd, February 2nd, ..., December 2nd, January 22nd, February 22nd, ..., December 22nd.
Me:
----------------------------------------------------------
Is AI too dumb or too intelligent!!!2 -
More Cool Coding Team Names and Programming Team Names
Error By Night
Bit Legion
Ctrl Intelligence
System React
Fuzz Exception
Goto Hub Gargoyle
Byte Panache
Flip Framework
Syntax Terminators
Twister Boot
Swift Script Doozies
Github Architects
Angular Ajax
😂7 -
Problem: in assembler, i want to proceed an string byte by byte. How can i do this?
My try:
Mov ebx, 0
S:
Mov eax, [var +ebx]
;somethin
Add ebx, 1
Jmp s
But it doesnt cut off the thing rigth8 -
C++ is the building blocks for many high-level programming languages, and since 1984 its first appearance in the markets the C++ core committee developers have introduced its 4 new versions which are C++03 (ISO/IEC 14882:2003 second edition), C++11 (third edition), C++14 (fourth edition) and C++17 is the fifth edition. With each new version, developers introduced new features, libraries and APIs in it.
C++ introduced as the extension of C programming language which made C++ as a compiled programming language, which means the developer required a C++ compiler to translate the C++ code to its equivalent machine or byte language, so the Operating system of the computer can execute the program.
There are various C++ compilers in the market and most of them are open source and free to use, however conventionally when we say C++ compiler, we basically talk about GCC which stands for GNU Compiler Collection.
What is GCC?
GCC stands for GNU Compiler Collection, and it is a collection of programming compilers which induce C, C++, Objective-C, Fortran, and some versions of Java. The first version of GCC introduced in 1987 and it was also known as GNU C compiler which became the standard compiler for C programming language, in that same year GCC also provided Compiler support for the C++ programming language.
Now GCC has various versions and each version give specific support for C++ versions, by now if we look at all the versions of GCC, we have a stable GCC for every version of C++, but there are some exceptions with C++11.
C++11:
C++11 introduced as the 2nd update version of C++, it suffixes 11 because it released in 2011 or because on August 12, 2011, ISO gives official approval to it. Formally C++11 known as C++0X because developers were expecting the new update released in 2010, but with its release in 2011, the core committee developer of C++ changed its name by C++0X to C++11.
C++ 11 replaced the old version of C++03, and it also brings many new features for the C++ developers. The main aim of designing C++11 to stabilize and maintain the backward compatibility of new C++ version with the C+98 and C programming language and that’s become the main reason why core committee developers only introduced new features in the old standard library rather than extending the core language.
GCC does not give Full Support to C++11:
GCC version GCC 4.8.1 purpose the first feature-complete implementation of the C++11 standard, however, the 4.8 and 4.7 does not give the full support for the C++11. The current version of GCC provides the major support for all the standard features of C++11 but if you are using the GCC 4.8 or 4.7 versions then your GCC only provide you with the experimental support for the C++11.
To use the Experimental support of GCC you need to enable it first before you compile or run you C++ 11 version code.
use code std=c++11 or -std=gnu++11 to enable the experimental support for C++11.17 -
I had a splash of inspiration. I would like to develop a method for analyzing unknown bitstreams of data. The method would involve determining the format of the data by trial and error machine learning algorithms. This would allow determining data types and byte formats and meanings of streams of data. Could be useful in data forensics. I would call the method: heuristic translation machine learning. I am currently developing code that does this. It will be fun to learn about reinforcement algorithms.5
-
Why do so many different programs have so many different dependencies...I mean can't everything coexist everywhere.
Spent 2 days on aws only to realize the solution is to switch to GCP. I mean what?1 -
I'm building a script parser to make mods for a game I like. The first step is to write an importer.
The documentation is nonexistent and I'm delving into byte manipulation, which I'm not familiar with - at all. I'm porting existing code from Java to C#, and everything is similar but different enough that I can't always just to a 1:1 transfer.
I get everything working, cleaned up and split into classes so I can write the exporter.
I do an import and the file won't parse. I try all previously know working files and still no good. I clean, rebuild, clean rebuild, run, debug, restart my computer, clear my cache, clean, rebuild. No good.
IT WAS WORKING 5 MINUTES AGO
Proceed to revert to every version from the last hour. No dice.
I was in the wrong folder the whole time.
Navigate to the proper folder, open the filename I know to be good and bingo, works like a charm.
The same project caused me headaches because I had a "== -1", when it should have been "== 1". Between my inexperience with byte manipulation and my untreated astigmatism, I was nearly sent to the shadow realm fixing that.3 -
What makes programmers different from other professions?
- We could feel worthy when our code compiles even after 458 failed attempts :)
-------------------------------------------------------------------------
What's your answer?!6 -
When you debug and notice that "myString".equals("myString") evaluates to false...and after an hour realize it's a 'Byte Order Mark', which of course Java doesn't handle properly. Ended up using BomInputReader from Apache commons, which made my life simpler.
If I ever want to inflict pain on other developers, I shall write files to disk with a byte order mark. 😂 -
man if i could figure out how to do stuff and had the money to do stuff i'd be dangerous as fuck, but as of now i can only posit questions... it sucks.
Examples:
- What do modern browsers/crawlers do when hit with, say, an "HTTP 450 Blocked by Windows Parental Controls" or an "HTTP 374" status code?
- What happens if I do <xyz minor edge case thing> on <system?> (just use your imagination, this happens for every edge case i can think of for every system and the list wouldn't fit in a few megs' worth of half-byte ASCII, much less *here*)
- What if I made like a board to fuck with busses while systems were on? Press a button and for like five bus clock cycles pins like 6 and 7 are shorted? That sort of thing. As for system/bus types, *literally any* (old consoles with expansion ports, PCI/-e/-X/whatever, southbridge, etc.)
- What if I did <filetype> shenanigans by doing <something indescribably horrible> to this file? How do things react?3 -
using System;
using System.Text;
using System.Text.Encodings;
//Bitwise XOR operator is represented by ^. It performs bitwise XOR operation on the corresponding bits of two operands. If the corresponding bits are same, the result is 0. If the corresponding bits are different, the result is 1.
//If the operands are of type bool, the bitwise XOR operation is equivalent to logical XOR operation between them.
using System.Text.Unicode;
using System.Windows;
using System.IO;
namespace Encryption2plzWOrk
{
class Program
{
static void Main(string[] args)
{
//random is basically a second sepret key for RSA exhanges I know there probaley is a better way to do this please tell me in github comments.//
Random r = new Random();
int random = r.Next(2000000,500000000);
int privatekey = 0;
int publickey = 0;
string privateKeyString = Console.ReadLine();
byte[] bytes3 = Encoding.ASCII.GetBytes(privateKeyString);
foreach(byte b in bytes3)
{
privatekey = b + privatekey;
}
int permutations = random/ 10000;
if(privatekey < 256)
{
while(permutations > 0)
{
foreach (byte b in bytes3)
{
privatekey = privatekey + (privatekey ^ permutations)*20;
}
}
}
publickey = privatekey*random;
Console.WriteLine("your public key is {0}",publickey);
}
}
}
would this be considerd ok HOBBYIST encryption and if not how would I do a slow improvment I used bitwise to edit bits so thats a check :D12 -
OK, so I've been working on processing a Japanese dictionary file and things are going smoothly for the most part. Out of ~185,000 entries, I've got 35 that are still causing problems.
The error I'm getting is "Incorrect string value '\xF0\xA4\xAD\xAF' for column...". I've checked all of my encoding and collation settings, and I'm pretty sure I've got it set to properly implement all of Unicode (as well as it does, anyway), as shown in the image attached. My suspicion is the problem characters are likely among the JIS X 0213 character set; in either case we're clearly dealing with a 4-byte character encoding issue here.
If needed I can attach a flag in the database and base64 encode these particular entries so the data isn't lost, but I'd like to just get it to handle the data properly in the first place if possible.
Anyone have any ideas on other items I can check to resolve the error?10 -
Random hardware question if anyone knows: On the various types of hard drives (Spinner, SSD, M.2, etc.) does it require the same amount of energy to read and write a bit? Or do they take a different amount of power. Is this even effectively measurable? If they're the same, what about at the byte level?6
-
What we will miss, if he really softens:
In fact, if the reason is stated as "it makes debugging easier", then I fart in your general
direction and call your mother a hamster.
In short: just say NO TO DRUGS, and maybe you won't end up like the Hurd people.
Of course, I'd also suggest that whoever was the genius who thought it was a good idea to read things ONE F*CKING BYTE AT A TIME with system calls for each byte should be retroactively aborted. Who the f*ck does idiotic things like that? How did they not die as babies, considering
that they were likely too stupid to find a tit to suck on?
Gnome seems to be developed by interface nazis, where consistently the excuse for not doing something is not "it's too complicated to do", but "it would confuse users".
I think the stupidity of your post just snuffed out everything
I think the OpenBSD crowd is a bunch of masturbating monkeys, in that they make such a big deal about concentrating on security to the
point where they pretty much admit that nothing else matters to them.
That is either genius, or a seriously diseased mind. - I can't quite tell which.
Christ, people. Learn C, instead of just stringing random characters together until it compiles (with warnings).
"and anybody who thinks that the above is
(a) legible
(b) efficient (even with the magical compiler support)
(c) particularly safe
is just incompetent and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and
there's no reason for it." -
I am thinking of how I can make data upload reliable. I am sure that I am making it more complex as it could be and I need some pointer.
My goal is to have a pause/resume feature in file uploading.
Here is how it would work.
In order to start uploading , you give the server
1) File Name
2) Folder path you want to upload it to
3) Checksum of the file
Here the server will check whether you can upload it to a folder, whether the file have been previously uploaded (by file name and checksum)
If you could actually upload to the folder , server will return "unique file token" , "folder path" , "unique byte token". Let call it init_upload().
The client will use "unique file token" (to identify the file) , folder path (to know where to upload it to) , "unique byte token" and byte[] (data which to actually upload). Let call this operation data_upload().
If the operation is actually complete , server will return new "unique byte token"
Internally it will actually work like this.Let say we want to upload "file.mp3", when the client call init_upload() it will create
file.mp3 and unique_byte_token.file.mp3.
When the client upload data first time , it will append data to unique_byte_token.file.mp3.
When the client upload data second time , it will check whether the "byte token" that client put is the same as previous "unique_byte_token". If it is same ,
1) we move the data from unique_byte_token.file.mp3 to file.mp3
2) Delete unique_byte_token.file.mp3
3) Create new unique_byte_token.file.mp3
4) Append data to unique_byte_token.file.mp3
The reason I am using "byte token" is because I want to check whether previous upload is actually success.
Let say we need to call 50 part of data_upload() will put 49 part to file.mp3 and 1 part to byte_token.file.mp3.
Finally the client need to call data_upload_complete() which will
1) Put reminding 1 part to file.mp3
2) Remove byte_token.file.mp3 as cleanup6 -
This is what motivates me to move forward in the field of tech:
"Any highly advanced technology is indistinguishable from magic!"9 -
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 -
Sooo. My team and I have module we're supposed to be porting to async code and aiohttp will not work. The server keeps rejecting the byte payload, but if we use synch code like the requests library, it works fine. The code is like identical, the only difference is async. It's been really frustrating because another drop in async version of requests (httpx) works just fine! I don't want to use httpx, the rest of our codebase is already using aiohttp! We think the problem is with gzip encoding being handled incorrectly by aiohttp. I've reported the issue.1
-
Thanks to the simplicity of android command line tools I wasted 2 days trying to set it up and then ended up deleting every byte it created to install android studio which comes with its huge IDE which I'm never going to use.
-
So God created a computer and told Adam not to create an storage for the computer.
Adam wanted to test God, and gave a byte to the computer. And now the computer is crashed.
The whole world is paying for it.1 -
So how does an experienced programmer break his own code in a such a terrible manner.
And why would someone try to make me embrace a bogus thing I KNOW doesn't work to make sure its broken ?
See this is what I hate about this shit.
No programmer would make the mistake that was made. They converted all their classes that interpret STRING VALUES using a parse to BitConverter.
(The input is a byte array) for like, ALL THEIR CLASSES.
Again this seems fucking intentional.
Instead of letting it remain a goddamn class that handed around an open file stream with a binaryreader around it which was simple, they tried some fucking fancy shit and throw readonlyspan<byte> at a read method which is where the code WILL fuck up ! wtf is wrong with you fucking dumb bastards ? IF YOU DONT WANT THE CHOMS GETTING AHEAD SHOOT THEM JESUS CHRIST !
Maybe this is some special interests shit to make sure ArcGis remains the dominant gis package and no ordinary lowly programmer can have a reader to get started with their own manipulations.
YOu fucking bastards screwed up the world and i want to eat your fucking hearts from your chests and wear your fucking scalps and ears on a fucking necklace while burning down your fucking houses !
AND FIX THAT GODDAMN STEAM RELEASE VALVE !!!1 -
Sometimes life just makes you laugh:
https://sci-technews99.blogspot.com/...
https://happymag.tv/uranus-started-...
https://futurism.com/the-byte/... -
The further away from the origin point of technology that is well documented byte by byte opcode reference and an external means of entering them onto a storage medium the easier it will be to steal delete and censor our work
On a lighter note
Stop pretending to preserve our creations when you fucking creatures make a chomo version of everything -
Developed module for e-commerce system to batch upload product information from MS Excel document. First test from user & got error stating that comment is too long. Some input contains about 100 whitespace in end...
Then I found that PHP's built-in trim function isn't trimming Japanese whitespace character. 😓😓😓 ... Quick fix for that..
I doubt i'll never become familiar with that Japanese 2-byte character thing 😶 -
You know
When I first saw etherum talking about am distributed state machine i thought wow. Not very practical but NEAT. I envisioned being able to make a byte code that could be stored in transactions and run by individual clients in an async function and each step of the resulting execution and the values of managed ram would be stored at intervals so other clients could take over and execute a few more statements and compare what should always be expected results that are identical
A grand incredibly inefficient system however really neato from the theoretical computer nerd standpoint !
Boy was I disappointed lol all it is a basic contracts language but yet they state it could be like a word computer ! How ? I thought maybe if you had enough nodes participating maybe you could store registers and the like in transaction values ? Wouldn’t that be the way ?
Seems like as a word computer they’re stuck somewhere between very simplistic js and something prior to amptron in usability yet they advertised as a world computer
Am i missing something ? I mean you could create something that would translate higher level code into smal numeric statements and then send it additions values but what would it be useful for and how would you actually. Store anything ? -
What's the message passing IPC with the least RTT for messages that are in the 16-32 byte range? It's gonna run approximately once per command in an interpreter.5
-
so.
i had a stupid idea that'd let me do a project i had planned and abandoned a while back after getting experience with the new project.
problem: detect and manage empty space in a massive file, allow adding data to those empty spaces from files, and fill in a table in a designated empty space with where dynamically-loaded things are. In Python.
I tried JUST detecting empty space, and Python would break out of loops for no reason at all just at random. "run bottom to top through this file until a non-00h byte is found" would either break out of the loop way earlier than should be possible (8 or 9 bytes into a 32KB empty file) or run way into non-zerofill areas before breaking the loop.
Am I just retarded? Is this more Python conditional fuckery? i'm so lost that it's just on hold for now (and i think i lost that script too) -
🐟💩The image i fetch from s3 is of type byte array
I return it to angular as an ArrayBuffer
Which then needs to be somehow converted to an image so i can fucking show it
Then after research i had to convert ArrayBuffer to Blob
And from Blob to URL encoded object which returns a string that now shows the full image in img tag
Somehow, by a sheer of trials and error i have just accidentally made a very secure way of fetching a very sensitive piece of document (verification document with user's personal data on it) and now in browser this is shown as blob:shit-image/random-hash. Not even the file extension. This means nobody can download this image. You fucking cant. Its a Blob motherfucker! Like a Blob Fish. It saves either a .txt when you try to save it (no idea how) and if you try to open the image in new tab it shows gibberish text. This means you can read-only this highly sensitive document image and not manipulate it, not even download it. Perfect. I have just made a very secure software by accident.
(this blob fish looks like my shit)3 -
Python needs a tool called 2to23.
Also, 2to3 does NOT take into account things like byte encoding changes. Kind of annoying.1