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 - "code faster"
-
Developer (master's degree, -bleeping- smart guy, no kidding) was bragging on how he made a piece of code 3x faster (with the usual pinch that the original dev was incompetent) and spent nearly 6 weeks working on it (wrote his own parallel-foreach library because Microsoft's parallel library was "too slow").
I was the original dev and he didn't know I had my own performance counters where I broke down each stack (database access, network I/O, and the code logic).
Average time was around 5ms (yes milliseconds) and worst case was around 10 seconds. His '3x improvement' was based on the worst test case, which improved by about a second. Showed our boss my graph (laughed out loud, said 'WTF', other curse words) and the dev hasn't spoken to me in weeks (I say 'hi' in the hall and he keeps walking)
Take that master's degree and high IQ and shove it.17 -
So, you start with a PHP website.
Nah, no hating on PHP here, this is not about language design or performance or strict type systems...
This is about architecture.
No backend web framework, just "plain PHP".
Well, I can deal with that. As long as there is some consistency, I wouldn't even mind maintaining a PHP4 site with Y2K-era HTML4 and zero Javascript.
That sounds like fucking paradise to me right now. 😍
But no, of course it was updated to PHP7, using Laravel, and a main.js file was created. GREAT.... right? Yes. Sure. Totally cool. Gotta stay with the times. But there's still remnants of that ancient framework-less website underneath. So we enter an era of Laravel + Blade templates, with a little sprinkle of raw imported PHP files here and there.
Fine. Ancient PHP + Laravel + Blade + main.js + bootstrap.css. Whatever. I can still handle this. 🤨
But then the Frontend hipsters swoosh back their shawls, sip from their caramel lattes, and start whining: "We want React! We want SPA! No more BootstrapCSS, we're going to launch our own suite of SASS styles! IT'S BETTER".
OK, so we create REST endpoints, and the little monkeys who spend their time animating spinners to cover up all the XHR fuckups are satisfied. But they only care about the top most visited pages, so we ALSO need to keep our Blade templated HTML. We now have about 200 SPA/REST routes, and about 350 classic PHP/Blade pages.
So we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA 😑
Now the Backend grizzlies wake from their hibernation, growling: We have nearly 25 million lines of PHP! Monoliths are evil! Did you know Netflix uses microservices? If we break everything into tiny chunks of code, all our problems will be solved! Let's use DDD! Let's use messaging pipelines! Let's use caching! Let's use big data! Let's use search indexes!... Good right? Sure. Whatever.
OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + React + SPA + Redis + RabbitMQ + Cassandra + Elastic 😫
Our monolith starts pooping out little microservices. Some polished pieces turn into pretty little gems... but the obese monolith keeps swelling as well, while simultaneously pooping out more and more little ugly turds at an ever faster rate.
Management rushes in: "Forget about frontend and microservices! We need a desktop app! We need mobile apps! I read in a magazine that the era of the web is over!"
OK, so we enter the Era of Ancient PHP + Laravel + Blade + main.js + bootstrap.css + hipster.sass + REST + GraphQL + React + SPA + Redis + RabbitMQ + Google pub/sub + Neo4J + Cassandra + Elastic + UWP + Android + iOS 😠
"Do you have a monolith or microservices" -- "Yes"
"Which database do you use" -- "Yes"
"Which API standard do you follow" -- "Yes"
"Do you use a CI/building service?" -- "Yes, 3"
"Which Laravel version do you use?" -- "Nine" -- "What, Laravel 9, that isn't even out yet?" -- "No, nine different versions, depends on the services"
"Besides PHP, do you use any Python, Ruby, NodeJS, C#, Golang, or Java?" -- "Not OR, AND. So that's a yes. And bash. Oh and Perl. Oh... and a bit of LUA I think?"
2% of pages are still served by raw, framework-less PHP.32 -
0. Plan before you code. Document everything. You won't remember either your idea or those clever implementations next week (or next month, or next year...).
1. Don't hack your way through, unless that's what you intend to do. Name your variables, functions etc. neatly: autocomplete exists!
Protip: Sometimes you want to check a quick language feature or a piece of code from one of your modules. Resist the urge to quickly hack in the test into your actual project. Maintain a separate file where you can quickly type in and check what you're looking for without hacking on your project (For example, in Python, you can open a new terminal or IDLE window for those quick tests).
2. Keep a quiet environment where you can focus. Recommend listening to something while coding (my latest fad is on asoftmurmur.com). Don't let anything distract you and throw your contextual awareness out of whack.
3. Rubber ducks work. Really. Talking out a complex piece of logic, or that regex or SQL query aids your mind greatly in grasping the concept and clearing the idea. Bounce off code and ideas with a friend or colleague to catch errors and oversights faster. Read more here: https://en.wikipedia.org/wiki/...
4. Since everyone else is saying this (and because it merits saying), USE VERSION CONTROL. Singular most important thing to software development aside from planning and documenting.
5. Remember to flout all of the above once in a while and just make a mess of a project where you have fun throwing everything around all over the place. You'll make mistakes that you never thought were possible by someone of your caliber :) That's how you learn.
Have fun, keep learning!3 -
Really want to get shit done today.
Lets browse Spotify for 3 hours to find good focus music.
Spend 2 hours designing a new IDE color theme and inspections which should really help me do code reviews faster
Oh, lunch time!
Maybe after lunch I should read some random clickbait blog posts on organizational paradigms.
...
And now I'm stranded on devRant. 😫13 -
Do you ever feel coding fatigue?
My dev mana has run dry, I've hit my rate limit.
That moment where your brain thinks "I should finish building this React project, it's good for my portfolio" or "I should really work on fixing this query performance issue, I already know what the problem is" — but your stomach churns at the thought of having to interpret even a single line of code?
The last few days it really does feel like a physical illness, a nauseated feeling whenever I open an IDE. I have written about 12 lines of code since Monday.
It goes beyond writer's block, it's not a lack of focus or inspiration, it's a big knot in my head of everything that's wrong and inconsistent in development, and it causes feelings of dread, desperation and revulsion when trying to wrap my head around the simplest stuff.
Does anyone have good tips to overcome this feeling, something faster and less savings-account-destroying than "take a sabbatical year and travel the world riding an emu"? (seems tempting though)57 -
Manager: Good news everyone, I made a big giant announcement this morning that the app upgrades will be released today!
Dev: They definitely won’t be, we need another 2 weeks minimum. I told you yesterday
Manager: Ok well I already made the announcement that today was the day so too bad for you.
Dev: Doesn’t change the state of things
Manager: 😡 This announcement is supposed to motivate you to work faster! You guys are making me look bad when you don’t support me like this!
Dev: Working as fast as we can, it’s a 2 person dev team for 4 separate applications so it’s quite a bit to get pushed through
Manager: Ok well then stay extra then, we have to get this out asap. Tell your spouses they are not going to be seeing much of you until this work is done. People are starting to ask questions!!!!!
Dev: Not my problem, it’s done when its done. I’m not staying extra.
Manager: !!
// *************
Might be blowing my cover a little but what are they going to do? Fire me? Good luck getting this out without me. They’ve tried to replace me in the past but the cheapest person they could find was 60k more expensive than me and still couldn’t keep up. Probably they’ll ship the work overseas and the code will die in a dumpster fire and cost them even more. Ah well, just another company that doesn’t deserve code.20 -
I am done with people, I just want one single room, with good internet, dual monitor setup... And I can spend my whole life like that... Being social, fuck that shit... I have devRant for that... and rest, I just want to code, listen to music, drink coffee and sleep like hell...
Why is it that I can understand some other dev's code faster that understanding someone's feelings. Why is it that I am good with principles of Programming Languages, but not the basic Principles of Humanity... Yes, I agree I don't have feelings, but is it wrong not to have feelings, I am a dev, I am supposed to be good with Codes, not humans... I want to be in my small space of close people. (My family), and that's it... I am no good with others. I hate Facebook, but love devRant, I spend more time on StackOverflow than that on WhatsApp. Why is it so... Why29 -
Hey, Root? How do you test your slow query ticket, again? I didn't bother reading the giant green "Testing notes:" box on the ticket. Yeah, could you explain it while I don't bother to listen and talk over you? Thanks.
And later:
Hey Root. I'm the DBA. Could you explain exactly what you're doing in this ticket, because i can't understand it. What are these new columns? Where is the new query? What are you doing? And why? Oh, the ticket? Yeah, I didn't bother to read it. There was too much text filled with things like implementation details, query optimization findings, overall benchmarking results, the purpose of the new columns, and i just couldn't care enough to read any of that. Yeah, I also don't know how to find the query it's running now. Yep, have complete access to the console and DB and query log. Still can't figure it out.
And later:
Hey Root. We pulled your urgent fix ticket from the release. You know, the one that SysOps and Data and even execs have been demanding? The one you finished three months ago? Yep, the problem is still taking down production every week or so, but we just can't verify that your fix is good enough. Even though the changes are pretty minimal, you've said it's 8x faster, and provided benchmark findings, we just ... don't know how to get the query it's running out of the code. or how check the query logs to find it. So. we just don't know if it's good enough.
Also, we goofed up when deploying and the testing database is gone, so now we can't test it since there are no records. Nevermind that you provided snippets to remedy exactly scenario in the ticket description you wrote three months ago.
And later:
Hey Root: Why did you take so long on this ticket? It has sat for so long now that someone else filed a ticket for it, with investigation findings. You know it's bringing down production, and it's kind of urgent. Maybe you should have prioritized it more, or written up better notes. You really need to communicate better. This is why we can't trust you to get things out.
*twitchy smile*rant useless people you suck because we are incompetent what's a query log? it's all your fault this is super urgent let's defer it ticket notes too long; didn't read21 -
An intern I was supposed to lead (as an intern) and work with. Which sounded kinda crazy to me, but also fun so I rolled with it. But when I met her I quickly found out she didn't even have a coding editor installed and when I advised one she was "scared of virusses". She had Microsoft Edge in her toolbar, and some picture of a cat as a background. We were given some project by our boss, and a freelance programmer helped us set it up on Trello. Great, lets start! Oke maybe first some R&D, she had to reaeach how to use the Twilio API. After catching her on WhatsApp a few times I realised this wasnt gonna go anywere. After a few weeks of coding and posting a initial project to git I asked her if she could show me the code of the API she made so far..
She told me she was using the quickstart guide (the last 3 FUCKING weeks) which contained some test project with specific use cases.
The one that I did 3 weeks ago that same fucking morning.
AND SHE WAS STILL NOT DONE...
A few days later I asked her about the progress (strangly, I wasn't allowed ti give her another task bcs the freelanc already did) and guess what... She got fking pissed at me
Her: "I will come to you when im done, ok?"
Me: "I just want to see how it is going so far and if you are running into any problems!"
Her: "I dont want to show you right now"
She then goes to my fucking boss to tell him I am bothering her.
And omg... Please dear god please kill me now...
Instead of him saying the she probably didn't do shit. He says to me that the girl thinks im looking down on her and she needs a stress free environment to work in. She will show me when its done. ITS A FUCKING QUICKSTART GUIDE YOU DUMB BITCH.
He then procceeded to whine to me about the email template (another project I do at the same time) which didn't look perfect in all of his clients.
Dont they understand that I am not a frontend developer? Can you stop please? I know nothing about email templates, I told you this!!!
Really... the whole fucking internship the only thing the girl did was ask people if they want more tea. Then she starts cleaning the windows, talk to people for an hour, or clean everyone's dask.
all this while I already made 50% of the fucking product and she just finished the quickstart tutorial 😭. Truly 2 months wasted, and the worse thing is I didn't get any apprication. They constantly blamed me and whined at me. Sometimes for being 3 minutes late, the other for smoking too much, or because I drink to much coffee, or that I dont eat healthy. They even forced me to play Ping Pong. While im just trying to do my job. One of the worst things they got mad at me for if when my laptop got hacked bcs it was infected with some virus. He had remote access and bought 5 iPhones 6's with my paypal while I was on break. I had to go home and quickly reset all my passwords and make sure the iPhones wouldnt get delivered. strange this was, this laptop I only used at the company. So it must have been software I had to download there. Probably phpstorm (torrent). Bcs nobody would give me a license. And the freelancer said I * have to *.
the monday after I still had to reinstall windows so I called them and said I would be late. when I came they were so disrepectfull and didn't understand anything. It went a little like this:
Boss: why u late?
Me: had to reinstall my laptop, sorry.
Boss: why didnt you do this in your own time?
Me: well, I didn't have any time.
Boss: cant you do this in the weekend or something? Because now we have to pay you several hours bcs you downloaded something at home.
Me: I am only using this laptop for work so thats not possible.
Boss: how can that even be possible? You are not doing anything at home with your laptop? Is that why you never do anything at home?
Me: uhm, I have desktop computer you know. Its much faster. And I also need to rest sometimes. Areeb (freelancer) told me to torrent the software. He gave me the link. 2 days later this happends
Boss: Ahh okeee I see.. Well dont let it happen again.
After that nobody at the compamy trusted me with anything computer related. Yes it was my own fault I downloaded a virus but it can happen to anyone. After that I never used Windows again btw, also no more auto login apps.8 -
5 Types Of Programmers
1.The duct tape programmer
The code may not be pretty, but damnit, it works!
This guy is the foundation of your company. When something goes wrong he will fix it fast and in a way that won’t break again. Of course he doesn’t care about how it looks, ease of use, or any of those other trivial concerns, but he will make it happen, without a bunch of talk or time-wasting nonsense. The best way to use this person is to point at a problem and walk away.
2.The OCD perfectionist programmer
You want to do what to my code?
This guy doesn’t care about your deadlines or budgets, those are insignificant when compared to the art form that is programming. When you do finally receive the finished product you will have no option but submit to the stunning glory and radiant beauty of perfectly formatted, no, perfectly beautiful code, that is so efficient that anything you would want to do to it would do nothing but defame a masterpiece. He is the only one qualified to work on his code.
3.The anti-programming programmer
I’m a programmer, damnit. I don’t write code.
His world has one simple truth; writing code is bad. If you have to write something then you’re doing it wrong. Someone else has already done the work so just use their code. He will tell you how much faster this development practice is, even though he takes as long or longer than the other programmers. But when you get the project it will only be 20 lines of actual code and will be very easy to read. It may not be very fast, efficient, or forward-compatible, but it will be done with the least effort required.
4.The half-assed programmer
What do you want? It works doesn’t it?
The guy who couldn’t care less about quality, that’s someone elses job. He accomplishes the tasks that he’s asked to do, quickly. You may not like his work, the other programmers hate it, but management and the clients love it. As much pain as he will cause you in the future, he is single-handedly keeping your deadlines so you can’t scoff at it (no matter how much you want to).
5.The theoretical programmer
Well, that’s a possibility, but in practice this might be a better alternative.
This guy is more interested the options than what should be done. He will spend 80% of his time staring blankly at his computer thinking up ways to accomplish a task, 15% of his time complaining about unreasonable deadlines, 4% of his time refining the options, and 1% of his time writing code. When you receive the final work it will always be accompanied by the phrase “if I had more time I could have done this the right way”.
What type of programmer are you?
Source: www.stevebenner.com16 -
(Interview for sde-3 position)
(continuation of https://devrant.com/rants/2132431/... )
Interviewer - *opens laptop. Gives a question.* solve this.
Me - *a bit surprised that such questions were being asked on a sde-3 level*
this is the 4th or 5th question from geeksforgeeks, isn't it? I know the answer to this. Do u still want me to solve it?
Interviewer - *not believing me* Yes
Me - okay. Well this *writing down the original solution mentioned on the site* is the verbatim code mentioned on the website, with complexity O(n^2).
However I feel this is not the optimal solution. Let me write a better solution.
*I provide a better solution*
This has a complexity of O(n log n) . What do you think?
Interviewer - Nope. This could be a lot better.
Me - okay. Let me see. Did some minor changes, added some caching (obviously this will have no effect on the base algorithm) etc
How about now?
Interviewer - nope. Still not good.
Me - okay. Can you tell me how to improve it?
Interviewer - no we are not allowed to solve problems for you. It is not our interview, it is yours.
Me - that makes no sense. Interviews are a two way street. I'd very much like to know the optimal answer to this.
Interviewer - okay
*copies down the answer from geeksforgeeks*
This is good
Me - *at first I thought this was a prank or something. *
I just mentioned this answer here.
Then I spent the next 10 minutes providing a BETTER solution.
May I know how yours is better?
Interviewer - this solution has 2-3 loops. Yours has a function calling itself.
Me - that's called divide and conquer using recursion mf!
Anyways let's take an example and do a dry run.
Interviewer - okay
*we do dry run*
Interviewer - oh yes. Yours ran faster. But it will run fast only sometimes.
Me - yes. Each time the algorithm rolls a dice to decide if it should run fast or slow. You have one goddamn awesome weed dealer man.
I got to go. Thank you for meeting me.14 -
If I had a dollar every time a non software engineer used the word "just" in a sentence...
"Just" convert this Matlab code to C++
"Just" make it faster
"Just" have it done in a week8 -
About two years ago I get roped into a something when someone was requesting an $8000 laptop to run an "program" that they wrote in Excel to pull data from our mainframe.
In reality they are using our normal application that interacts with the mainframe and screen scrapping it to populate several Excel spreadsheets.
So this guy kept saying that he needed the expensive laptop because he needed the extra RAM and processing power for his application. At the time we only supported 32 bit Windows 7 so even though I told him ten times that the OS wouldn't recognize more than 3.5 GB of RAM he kept saying that increasing the RAM would fix his problem. I also explained that even if we installed the 64 bit OS we didn't have approval for the 64 bit applications.
So we looked at the code and we found that rather than reusing the same workbook he was opening a new instance of a workbook during each iteration of his loop and then not closing or disposing of them. So he was running out of memory due to never disposing of anything.
Even better than all of that, he wanted a faster processor to speed up the processing, but he had about 5 seconds of thread sleeps in each loop so that the place he was screen scrapping from would have time to load. So it wouldn't matter how fast the processor was, in the end there were sleeps and waits in there hard coded to slow down the app. And the guy didn't understand that a faster processor wouldn't have made a difference.
The worst thing is a "dev" that thinks they know what they are doing but they don't have a clue.7 -
Manager: our file IO is slow, any suggestions to make it faster?
Code: multithread writing to a few hundred small (temp) files then single thread combine to one big file and delete the temp files.
Eyes: bleeding31 -
Boss comes in and gives me some js code for syncing data (he hacked it together the other day, really messy with like 5 callback lamdas stacked into each other)
Boss: Make it faster and more reliable and add some progress indicator
So i look at the code and he literally pulls all the data as one json (20+ MiB). Server needs multiple minutes to generate the response (lots of querys), sometimes even causing timeouts....
So i do what everyone would do and clean up the code, split the request into multiple ones, only fetching the necessary data and send the code back to my boss.
He comes in and asks me what all this complexity is about. And why i need 5 functions to do what he did in one. (He didn't -.-). He says he only told me to "make it faster and show progress" not "to split everything up".
So I ask him how he wants to do this over HTTP with just one request...
His response: "I don't care make it work!".
Sometimes i hate my job -.-11 -
I have this little hobby project going on for a while now, and I thought it's worth sharing. Now at first blush this might seem like just another screenshot with neofetch.. but this thing has quite the story to tell. This laptop is no less than 17 years old.
So, a Compaq nx7010, a business laptop from 2004. It has had plenty of software and hardware mods alike. Let's start with the software.
It's running run-off-the-mill Debian 9, with a custom kernel. The reason why it's running that version of Debian is because of bugs in the network driver (ipw2200) in Debian 10, causing it to disconnect after a day or so. Less of an issue in Debian 9, and seemingly fixed by upgrading the kernel to a custom one. And the kernel is actually one of the things where you can save heaps of space when you do it yourself. The kernel package itself is 8.4MB for this one. The headers are 7.4MB. The stock kernels on the other hand (4.19 at downstream revisions 9, 10 and 13) took up a whole GB of space combined. That is how much I've been able to remove, even from headless systems. The stock kernels are incredibly bloated for what they are.
Other than that, most of the data storage is done through NFS over WiFi, which is actually faster than what is inside this laptop (a CF card which I will get to later).
Now let's talk hardware. And at age 17, you can imagine that it has seen quite a bit of maintenance there. The easiest mod is probably the flash mod. These old laptops use IDE for storage rather than SATA. Now the nice thing about IDE is that it actually lives on to this very day, in CF cards. The pinout is exactly the same. So you can use passive IDE-CF adapters and plug in a CF card. Easy!
The next thing I want to talk about is the battery. And um.. why that one is a bad idea to mod. Finding replacements for such old hardware.. good luck with that. So your other option is something called recelling, where you disassemble the battery and, well, replace the cells. The problem is that those battery packs are built like tanks and the disassembly will likely result in a broken battery housing (which you'll still need). Also the controllers inside those battery packs are either too smart or too stupid to play nicely with new cells. On that laptop at least, the new cells still had a perceived capacity of the old ones, while obviously the voltage on the cells themselves didn't change at all. The laptop thought the batteries were done for, despite still being chock full of juice. Then I tried to recalibrate them in the BIOS and fried the battery controller. Do not try to recell the battery, unless you have a spare already. The controllers and battery housings are complete and utter dogshit.
Next up is the display backlight. Originally this laptop used to use a CCFL backlight, which is a tiny tube that is driven at around 2000 volts. To its controller go either 7, 6, 4 or 3 wires, which are all related and I will get to. Signs of it dying are redshift, and eventually it going out until you close the lid and open it up again. The reason for it is that the voltage required to keep that CCFL "excited" rises over time, beyond what the controller can do.
So, 7-pin configuration is 2x VCC (12V), 2x enable (on or off), 1x adjust (analog brightness), and 2x ground. 6-pin gets rid of 1 enable line. Those are the configurations you'll find in CCFL. Then came LED lighting which required much less power to run. So the 4-pin configuration gets rid of a VCC and a ground line. And finally you have the 3-pin configuration which gets rid of the adjust line, and you can just short it to the enable line.
There are some other mods but I'm running out of characters. Why am I telling you all this? The reason is that this laptop doesn't feel any different to use than the ThinkPad x220 and IdeaPad Y700 I have on my desk (with 6c12t, 32G of RAM, ~1TB of SSDs and 2TB HDDs). A hefty setup compared to a very dated one, yet they feel the same. It can do web browsing, I can chat on Telegram with it, and I can do programming on it. So, if you're looking for a hobby project, maybe some kind of restrictions on your hardware to spark that creativity that makes code better, I can highly recommend it. I think I'm almost done with this project, and it was heaps of fun :D12 -
#2 Worst thing I've seen a co-worker do?
Back before we utilized stored procedures (and had an official/credentialed DBA), we used embedded/in-line SQL to fetch data from the database.
var sql = @"Select
FieldsToSelect
From
dbo.Whatever
Where
Id = @ID"
In attempts to fix database performance issues, a developer, T, started putting all the SQL on one line of code (some sql was formatted on 10+ lines to make it readable and easily copy+paste-able with SSMS)
var sql = "Select ... From...Where...etc";
His justification was putting all the SQL on one line make the code run faster.
T: "Fewer lines of code runs faster, everyone knows that."
Mgmt bought it.
This process took him a few months to complete.
When none of the effort proved to increase performance, T blamed the in-house developed ORM we were using (I wrote it, it was a simple wrapper around ADO.Net with extension methods for creating/setting parameters)
T: "Adding extra layers causes performance problems, everyone knows that."
Mgmt bought it again.
Removing the ORM, again took several months to complete.
By this time, we hired a real DBA and his focus was removing all the in-line SQL to use stored procedures, creating optimization plans, etc (stuff a real DBA does).
In the planning meetings (I was not apart of), T was selected to lead because of his coding optimization skills.
DBA: "I've been reviewing the execution plans, are all the SQL code on one line? What a mess. That has to be worst thing I ever saw."
T: "Yes, the previous developer, PaperTrail, is incompetent. If the code was written correctly the first time using stored procedures, or even formatted so people could read it, we wouldn't have all these performance problems."
DBA didn't know me (yet) and I didn't know about T's shenanigans (aka = lies) until nearly all the database perf issues were resolved and T received a recognition award for all his hard work (which also equaled a nice raise).7 -
Use SSDs.
It's not hard. They've been around for a while, small ones are cheap now and are more than enough for at least 90% of developers. The rest can probably afford 2TB NVMe.
Why waste 60$ on a worthless 500GB HDD that will load the OS in the time that's enough for you to make scrambled eggs?
Instead, use 60$ on a 128GB SSD. Sure, it's smaller, but if speed is important for you, you can forget a bit about saving all of the porn you see online, or about installing every free game from Steam.
SSDs are cheap already. And the performance advantage they give is ENORMOUS. You can have a core i9, 64GB of fastest RAM bla bla bla, but if you don't have an SSD, a Celeron with an SSD will seem faster.
Get one, and NEVER again cry about long loading times of IDEs, unless you feel like 30 seconds for the longest load time is too much. If your time is THAT valuable, then you can afford NVMe SSDs in RAID 10 (which can be done easily in software with btrfs if you're on Linux).
Seriously!
Every day I see posts like "Visual Studio is crap because it installs for 6 hours", or "Android studio starts in 30 minutes", or "Visual Studio Code sucks because it loads for too long compared to vim".
It's as if you only have access to budget 10 year old computers.27 -
A decade ago 800x600 was pretty much the standard resolution for devices and 5 sec response time was considered fast. Animations were minimal and websites were easier to read. Programmers debated around topics like which loop runs faster, i++ or ++i, while vs doWhile and so on. In general, we were closer to understanding what happens behind the browser curtain and how code needs to be organized to make it more maintainable.
Today the level of abstraction is much higher. I don't think devs can contemplate on the finer aspects of programming efficiency; they'd rather rely on a code library to do all the grunt work. With the explosion of devices and platforms, the focus has shifted from programming to assembling. Programmers need to know their tools first, then write code. The tool is expected to work well with a millisecond response time, not the programmer's code.
Moving forward, I think programming would be more about building higher abstraction utilities/libraries that are integrated by other tools, which is already happening. Marketing an App would become more important than the actual skill needed to develop it.
A bit far-fetched, but I think the future programmer would be a lot like a stock market analyst who has a bunch of windows in front, just observing data or algorithm patterns created by an AI engine and cherry-picking a specific combination of modules that might make the next big sensational app.8 -
> Root struggles with her ticket
> Boss struggles too
> Also: random thoughts about this job
I've been sick lately, and it's the kind of sick where I'm exhausted all day, every day (infuriatingly, except at night). While tired, I can't think, so I can't really work, but I'm during my probationary period at work, so I've still been doing my best -- which, honestly, is pretty shit right now.
My current project involves legal agreements, and changing agent authorization methods (written, telephone recording, or letting the user click a link). Each of these, and depending on the type of transaction, requires a different legal agreement. And the logic and structure surrounding these is intricate and confusing to follow. I've been struggling through this and the project's ever-expanding scope for weeks, and specifically the agreements logic for the past few days. I've felt embarrassed and guilty for making so little progress, and that (and a bunch of other things) are making me depressed.
Today, I finally gave up and asked my boss for help. We had an hour and a half call where we worked through it together (at 6pm...). Despite having written quite a bit of the code and tests, he was often saying things like "How is this not working? This doesn't make any sense." So I don't feel quite so bad now.
I knew the code was complex and sprawling and unintuitive, but seeing one of its authors struggling too was really cathartic.
On an unrelated note, I asked the most senior dev (a Macintosh Lisa dev) why everything was using strings instead of symbols (in Rails) since symbols are much faster. That got him looking into the benchmarks, and he found that symbols are about twice as fast (for his minimal test, anyway), and he suggested we switch to those. His word is gold; mine is ignorable. kind of annoying. but anyway, he further went into optimizing the lookup of a giant array of strings, and discovered bsearch. (it's a divide-and-conquer lookup). and here I am wondering why they didn't implement it that way to begin with. 🙄
I don't think I'm learning much here, except how to work with a "mature" codebase. To take a page from @Rutee07, I think "mature" here means the same as in porn: not something you ever want ot see or think about.
I mean, I'm learning other things, too, like how to delegate methods from one model to another, but I have yet to see why you would want to. Every use of it I've explored thus far has just complicated things, like delegating methods on a child of a 1:n relation to the parent. Which child? How does that work? No bloody clue! but it does, somehow, after I copy/pasted a bunch of esoteric legacy bs and fussed with it enough.
I feel like once I get a good grasp of the various payment wrappers, verification/anti-fraud integration, and per-business fraud rules I'll have learned most of what they can offer. Specifically those because I had written a baby version of them at a previous job (Hell), and was trying to architect exactly what this company already has built.
I like a few things about this company. I like my boss. I like the remote work. I like the code reviews. I like the pay. I like the office and some socializing twice a year.
But I don't like the codebase. at all. and I don't have any friends here. My boss is friendly, but he's not a friend. I feel like my last boss (both bosses) were, or could have been if I was more social. But here? I feel alone. I'm assigned work, and my boss is friendly when talking about work, but that's all he's there for. Out of the two female devs I work with, one basically just ignores me, and the other only ever talks about work in ways I can barely understand, and she's a little pushy, and just... really irritating. The "senior" devs (in quotes because they're honestly not amazing) just don't have time, which i understand. but at the same time... i don't have *anyone* to talk to. It really sucks.
I'm not happy here.
I miss my last job.
But the reason I left that one is because this job allows me to move and work remotely. I got a counter-offer from them exactly matching my current job, sans the code reviews. but we haven't moved yet. and if I leave and go back there without having moved, it'll look like i just abandoned them. and that's the last thing I want them to think.
So, I'm stuck here for awhile.
not that it's a bad thing, but i'm feeling overwhelmed and stressed. and it's just not a good fit. but maybe I'll actually start learning things. and I suppose that's also why I took the job.
So, ever onward, I guess.
It would just be nice if I could take some of the happy along with me.7 -
Imagine, you get employed to restart a software project. They tell you, but first we should get this old software running. It's 'almost finished'.
A WPF application running on a soc ... with a 10" touchscreen on win10, a embedded solution, to control a machine, which has been already sold to customers. You think, 'ok, WTF, why is this happening'?
You open the old software - it crashes immediately.
You open it again but now you are so clever to copy an xml file manually to the root folder and see all of it's beauty for the first time (after waiting for the freezed GUI to become responsive):
* a static logo of the company, taking about 1/5 of the screen horizontally
* circle buttons
* and a navigation interface made in the early 90's from a child
So you click a button and - it crashes.
You restart the software.
You type something like 'abc' in a 'numberfield' - it crashes.
OK ... now you start the application again and try to navigate to another view - and? of course it crashes again.
You are excited to finally open the source code of this masterpiece.
Thank you jesus, the 'dev' who did this, didn't forget to write every business logic in the code behind of the views.
He even managed to put 6 views into one and put all their logig in the code behind!
He doesn't know what binding is or a pattern like MVVM.
But hey, there is also no validation of anything, not even checks for null.
He was so clever to use the GUI as his place to save data and there is a lot of parsing going on here, every time a value changes.
A thread must be something he never heard about - so thats why the GUI always freezes.
You tell them: It would be faster to rewrite the whole thing, because you wouldn't call it even an alpha. Nobody listenes.
Time passes by, new features must be implemented in this abomination, you try to make the cripple walk and everyone keeps asking: 'When we can start the new software?' and the guy who wrote this piece of shit in the first place, tries to give you good advice in coding and is telling you again: 'It was almost finished.' *facepalm*
And you? You would like to do him and humanity a big favour by hiting him hard in the face and breaking his hands, so he can never lay a hand on any keyboard again, to produce something no one serious would ever call code.4 -
Confluence is good they said
Confluence is awesome they said
Confluence is cloud based and fucking great...
Confluence is starting to lag like it's the 1990's and my keyboard strokes are taking seconds, literal seconds to catch up..
KEYBOARD LAG!! in 2020!!! fuck this JS bullshit.rant i need to stop typing atlassian confluence keyboard lag from hell my browser is your server cloud based morse code would be faster12 -
I spent yesterday refactoring a JavaScript file and it was so fucking bad that I wasn't containing my frustration to the point it git blamed it to make sure I wasn't "wtfing" my boss's code, I wasn't so I went on a rampage.
Anyone who looked at me yesterday would see a pissed off dev with the highest rate of wtf/minute to the screen gesturing and force palming constantly.
I'm a back end dev.
I made a front end code have 90% (?!?!?!) less code, more readable and I can say for sure 10x faster.
There was a fucking setTimeout() with 5 seconds delay to do something that doesn't even need to wait...
Fuck this shit lol.2 -
TL;DR: Fuck you Apple.
10:30 PM, parent needs iPhone update to update Messenger. How hard can this be?
Need to update iPhone from 9.x to latest, which is so outdated it still required iTunes. Fk.
Boot iTunes on Windows 10 pc that is at least 10 years old.
Completely unresponsive
Crash in task manager
Launch and is completely unresponsive. (Also starts playing unrequested music.. Oh joy..)
Fuck this, go to apple.com to download iTunes exe
Gives me some Microsoft store link. Fuck that shit, just give me the executable
Google “iTunes download”. click around on shitty Apple website. Success.
Control panel. Uninstall iTunes. (Takes forever, but it works)
Restart required (of fucking course).
2 eternities later. Run iTunes exe. Restart required. Fk.
Only 1 eternity later. Run iTunes, connect iPhone.
Actually detects the device. (holy shit, a miracle)
Starts syncing an empty library to the phone. Ya, fuck that.
Google. Disable option. Connect phone. Find option to update.
Update started. Going nowhere fast. Time for a walk at 1:00 AM punching the air.
Come back. Generic error message: Update failed (-1). Phone is stuck installing update. (O shit)
1x hard reset
2x hard reset
Google. Find Apple forum with exact question. Absolutely useless replies. (I expected no less)
Google recovery mode. Get into recovery mode.
Receive message: “You can update, but if it fails, you will have to reset to factory settings”. Fuck it, here we go.
Update runs (faster this time). Fails again. Same bullshit error message. (Goddammit, fuck. This might actually be bad.)
Disconnect phone.
… It boots latest iOS version. (holy shit, there is a god)
Immediately kill iTunes. Fuck that shit.
Parents share Apple account
Sign in, 2FA required.
Fat finger the code.
Restart “welcome” process.
Will not send code. What. The. Fuck.
Requests access code on other parent’s iPhone.
No code present. What???
Try restarting welcome process again. No dice. (Of course)
Set code on other parent’s iPhone.
Get message “Code is easy to guess”. Ya. IDGAF
Use code on newly updated iPhone. Some success.
Requires reset of password.
Password cannot be the same as old password (Goddammit)
Change password.
Welcome process done.
Sign in again on same phone after welcome process done in settings. (Nice.)
Sign in again on other phone with updated password
Update Messenger.
Update hangs. Needs more space.
Delete shit.
Update frozen in App Store (Really??)
Restart iPhone.
Update Messenger.
Update complete past 2. Well that was easy.
Apple, fuck you.
Some call Android unintuitive, but I look at the settings app on iPhone and realize you aren’t any better.
This company hasn’t been innovative since 2007. Over 1000 USD for a phone? Are you fucking kidding me?
Updating an iPhone from iOS 9.x is probably uncommon anymore. But this is a fucking joke. Fix your shit.
Shit like this is why I’ll never again own an Apple product. I have HAD IT with the joke of a business.
Thanks for reading.17 -
Not having finished any education, and writing code during interviews.
I have a pretty nice resume with good references, and I think I'm a reasonably good & experienced dev.
But I'm absolutely unable to write code on paper, and really wonder how some devs can just write out algorithms using a pen and reason about it, without trying/failing/playing/fixing in an IDE.
Education I think.
I can transform the theory on a complex Wikipedia page about math/algorithm into code, I can translate a Haskell library into idiomatic python... but what I haven't done is write out sorting functions or fibonacci generators a million times during Java class.
I don't see the point either... but I still feel utterly worthless during an interview if they ask "So you haven't even finished highschool? Can you at least solve this prime number problem using a marker on this whiteboard? Could you explain in words which sorting algorithm is faster and why?"
"Uh... let me fetch a laptop with an IDE, stackoverflow and Wikipedia?"22 -
I've found sites like Udemy/Khanacademy/Codecademy/Brilliant/Edx to be very useful — possibly more useful than expensive education.
But they still need:
1. Better correction/update mechanisms. Human teachers make mistakes and material gets outdated, and while online teachers are rectified faster than classroom teachers, the procedure is still not optimal. Knowledge should be a bit more like a verified wiki.
2. Some have great interactive coding environments, some have great videos, some have awesome texts, some have helpful communities. None has it all. In the end, I don't want to learn a new language by writing code in my browser. It could all be integrated/synced to the point where IDEs have plugins which are synced to online videos, with tests and exercises built in, up to a social network where you could send snippets for review and add reviews to other people's code.
3. Accreditation. Some platforms offer this against payment, but I think those platforms often feel very old school (pun intended), with fixed schedules, marks and enrollments. Self paced is a must.
4. Depth is important. Current online courses are often a bit introductory. We need more advanced courses about algorithms, theoretical computer science, code design, relational algebra, category theory, etc. I get that it's about supply/demand, but we will eventually need to have those topics covered.
I do believe that for CS, full online education will eventually win from the classroom — it's still in its infancy, but has more potential to grow into correct, modern education.10 -
POSTMORTEM
"4096 bit ~ 96 hours is what he said.
IDK why, but when he took the challenge, he posted that it'd take 36 hours"
As @cbsa wrote, and nitwhiz wrote "but the statement was that op's i3 did it in 11 hours. So there must be a result already, which can be verified?"
I added time because I was in the middle of a port involving ArbFloat so I could get arbitrary precision. I had a crude desmos graph doing projections on what I'd already factored in order to get an idea of how long it'd take to do larger
bit lengths
@p100sch speculated on the walked back time, and overstating the rig capabilities. Instead I spent a lot of time trying to get it 'just-so'.
Worse, because I had to resort to "Decimal" in python (and am currently experimenting with the same in Julia), both of which are immutable types, the GC was taking > 25% of the cpu time.
Performancewise, the numbers I cited in the actual thread, as of this time:
largest product factored was 32bit, 1855526741 * 2163967087, took 1116.111s in python.
Julia build used a slightly different method, & managed to factor a 27 bit number, 103147223 * 88789957 in 20.9s,
but this wasn't typical.
What surprised me was the variability. One bit length could take 100s or a couple thousand seconds even, and a product that was 1-2 bits longer could return a result in under a minute, sometimes in seconds.
This started cropping up, ironically, right after I posted the thread, whats a man to do?
So I started trying a bunch of things, some of which worked. Shameless as I am, I accepted the challenge. Things weren't perfect but it was going well enough. At that point I hadn't slept in 30~ hours so when I thought I had it I let it run and went to bed. 5 AM comes, I check the program. Still calculating, and way overshot. Fuuuuuuccc...
So here we are now and it's say to safe the worlds not gonna burn if I explain it seeing as it doesn't work, or at least only some of the time.
Others people, much smarter than me, mentioned it may be a means of finding more secure pairs, and maybe so, I'm not familiar enough to know.
For everyone that followed, commented, those who contributed, even the doubters who kept a sanity check on this without whom this would have been an even bigger embarassement, and the people with their pins and tactical dots, thanks.
So here it is.
A few assumptions first.
Assuming p = the product,
a = some prime,
b = another prime,
and r = a/b (where a is smaller than b)
w = 1/sqrt(p)
(also experimented with w = 1/sqrt(p)*2 but I kept overshooting my a very small margin)
x = a/p
y = b/p
1. for every two numbers, there is a ratio (r) that you can search for among the decimals, starting at 1.0, counting down. You can use this to find the original factors e.x. p*r=n, p/n=m (assuming the product has only two factors), instead of having to do a sieve.
2. You don't need the first number you find to be the precise value of a factor (we're doing floating point math), a large subset of decimal values for the value of a or b will naturally 'fall' into the value of a (or b) + some fractional number, which is lost. Some of you will object, "But if thats wrong, your result will be wrong!" but hear me out.
3. You round for the first factor 'found', and from there, you take the result and do p/a to get b. If 'a' is actually a factor of p, then mod(b, 1) == 0, and then naturally, a*b SHOULD equal p.
If not, you throw out both numbers, rinse and repeat.
Now I knew this this could be faster. Realized the finer the representation, the less important the fractional digits further right in the number were, it was just a matter of how much precision I could AFFORD to lose and still get an accurate result for r*p=a.
Fast forward, lot of experimentation, was hitting a lot of worst case time complexities, where the most significant digits had a bunch of zeroes in front of them so starting at 1.0 was a no go in many situations. Started looking and realized
I didn't NEED the ratio of a/b, I just needed the ratio of a to p.
Intuitively it made sense, but starting at 1.0 was blowing up the calculation time, and this made it so much worse.
I realized if I could start at r=1/sqrt(p) instead, and that because of certain properties, the fractional result of this, r, would ALWAYS be 1. close to one of the factors fractional value of n/p, and 2. it looked like it was guaranteed that r=1/sqrt(p) would ALWAYS be less than at least one of the primes, putting a bound on worst case.
The final result in executable pseudo code (python lol) looks something like the above variables plus
while w >= 0.0:
if (p / round(w*p)) % 1 == 0:
x = round(w*p)
y = p / round(w*p)
if x*y == p:
print("factors found!")
print(x)
print(y)
break
w = w + i
Still working but if anyone sees obvious problems I'd LOVE to hear about it.38 -
Most satisfying bug I've fixed?
Fixed a n+1 issue with a web service retrieving price information. I initially wrote the service, but it was taken over by a couple of 'world class' monday-morning-quarterbacks.
The "Worst code I've ever seen" ... "I can't believe this crap compiles" types that never met anyone else's code that was any good.
After a few months (yes months) and heavy refactoring, the service still returned price information for a product. Pass the service a list of product numbers, service returns the price, availability, etc, that was it.
After a very proud and boisterous deployment, over the next couple of days the service seemed to get slower and slower. DBAs started to complain that the service was causing unusually high wait times, locks, and CPU spikes causing problems for other applications. The usual finger pointing began which ended up with "If PaperTrail had written the service 'correctly' the first time, we wouldn't be in this mess."
Only mattered that I initially wrote the service and no one seemed to care about the two geniuses that took months changing the code.
The dev manager was able to justify a complete re-write of the service using 'proper development methodologies' including budgeting devs, DBAs, server resources, etc..etc. with a projected year+ completion date.
My 'BS Meter' goes off, so I open up the code, maybe 5 minutes...tada...found it. The corresponding stored procedure accepts a list of product numbers and a price type (1=Retail, 2=Dealer, and so on). If you pass 0, the stored procedure returns all the prices.
Code basically looked like this..
public List<Prices> GetPrices(List<Product> products, int priceTypeId)
{
foreach (var item in products)
{
List<int> productIdsParameter = new List<int>();
productIdsParameter.Add(item.ProductID);
List<Price> prices = dataProvider.GetPrices(productIdsParameter, 0);
foreach (var price in prices)
{
if (price.PriceTypeID == priceTypeId)
{
prices = dataProvider.GetPrices(productIdsParameter, price.PriceTypeID);
return prices;
}
* Omitting the other 'WTF?' code to handle the zero price type
}
}
}
I removed the double stored procedure call, updated the method signature to only accept the list of product numbers (which it was before the 'major refactor'), deployed the service to dev (the issue was reproducible in our dev environment) and had the DBA monitor.
The two devs and the manager are grumbling and mocking the changes (they never looked, they assumed I wrote some threading monstrosity) then the DBA walks up..
DBA: "We're good. You hit the database pretty hard and the CPU never moved. Execution plans, locks, all good to go."
<dba starts to walk away>
DevMgr: "No fucking way! Putting that code in a thread wouldn't have fix it"
Me: "Um, I didn't use threads"
Dev1: "You had to. There was no way you made that code run faster without threads"
Dev2: "It runs fine in dev, but there is no way that level of threading will work in production with thousands of requests. I've got unit tests that prove our design is perfect."
Me: "I looked at what the code was doing and removed what it shouldn't be doing. That's it."
DBA: "If the database is happy with the changes, I'm happy. Good job. Get that service deployed tomorrow and lets move on"
Me: "You'll remove the recommendation for a complete re-write of the service?"
DevMgr: "Hell no! The re-write moves forward. This, whatever you did, changes nothing."
DBA: "Hell yes it does!! I've got too much on my plate already to play babysitter with you assholes. I'm done and no one on my team will waste any more time on this. Am I clear?"
Seeing the dev manager face turn red and the other two devs look completely dumbfounded was the most satisfying bug I've fixed.5 -
It's enough. I have to quit my job.
December last year I've started working for a company doing finance. Since it was a serious-sounding field, I tought I'd be better off than with my previous employer. Which was kinda the family-agency where you can do pretty much anything you want without any real concequences, nor structures. I liked it, but the professionalism was missing.
Turns out, they do operate more professionally, but the intern mood and commitment is awful. They all pretty much bash on eachother. And the root cause of this and why it will stay like this is simply the Project Lead.
The plan was that I was positioned as glue between Design/UX and Backend to then make the best Frontend for the situation. Since that is somewhat new and has the most potential to get better. Beside, this is what the customer sees everyday.
After just two months, an retrospective and a hell lot of communication with co-workers, I've decided that there is no other way other than to leave.
I had a weekly productivity of 60h+ (work and private, sometimes up to 80h). I had no problems with that, I was happy to work, but since working in this company, my weekly productivity dropped to 25~30h. Not only can I not work for a whole proper work-week, this time still includes private projects. So in hindsight, I efficiently work less than 20h for my actual job.
The Product lead just wants feature on top of feature, our customers don't want to pay concepts, but also won't give us exact specifications on what they want.
Refactoring is forbidden since we get to many issues/bugs on a daily basis so we won't get time.
An re-design is forbidden because that would mean that all Screens have to be re-designed.
The product should be responsive, but none of the components feel finished on Desktop - don't talk about mobile, it doesn't exist.
The Designer next to me has to make 200+ Screens for Desktop and Mobile JUST so we can change the primary colors for an potential new customer, nothing more. Remember that we don't have responsiveness? Guess what, that should be purposely included on the Designs (and it looks awful).
I may hate PHP, but I can still work with it. But not here, this is worse then any ecommerce. I have to fix legacy backend code that has no test coverage. But I haven't touched php for 4 years, letalone wrote sql (I hate it). There should be no reason whatsoever to let me do this kind of work, as FRONTEND ARCHITECT.
After an (short) analysis of the Frontend, I conclude that it is required to be rewritten to 90%. There have been no performance checks for the Client/UI, therefor not only the components behave badly, but the whole system is slow as FUCK! Back in my days I wrote jQuery, but even that shit was faster than the architecuture of this React Multi-instance app. Nothing is shared, most of the AppState correlate to other instances.
The Backend. Oh boy. Not only do we use an shitty outated open-source project with tons of XSS possibillities as base, no we clone that shit and COPY OUR SOURCES ON TOP. But since these people also don't want to write SQL, they tought using Symfony as base on top of the base would be an good idea.
Generally speaking (and done right), this is true. but not then there will be no time and not properly checked. As I said I'm working on Legacy code. And the more I look into it, the more Bugs I find. Nothing too bad, but it's still a bad sign why the webservices are buggy in general. And therefor, the buggyness has to travel into the frontend.
And now the last goodies:
- Composer itself is commited to the repo (the fucking .phar!)
- Deployments never work and every release is done manually
- We commit an "_TRASH" folder
- There is an secret ongoing refactoring in the root of the Project called "_REFACTORING" (right, no branches)
- I cannot test locally, nor have just the Frontend locally connected to the Staging webservices
- I am required to upload my sources I write to an in-house server that get's shared with the other coworkers
- This is the only Linux server here and all of the permissions are fucked up
- We don't have versions, nor builds, we use the current Date as build number, but nothing simple to read, nonono. It's has to be an german Date, with only numbers and has always to end with "00"
- They take security "super serious" but disable the abillity to unlock your device with your fingerprint sensor ON PURPOSE
My brain hurts, maybe I'll post more on this shit fucking cuntfuck company. Sorry to be rude, but this triggers me sooo much!2 -
Functional Programming. Because Moores Law has moved from making processors faster to multiplying cores, and we may eventually have to code on machines that have 1024 cores or more. Mutable state will cause all kinds of hell in those scenarios. We already have problems with it when we have like 2-3 different threads.4
-
Worst fight I've had with a co-worker?
Had my share of 'disagreements', but one that seemed like it could have gone to blows was a developer, 'T', that tried to man-splain me how ADO.Net worked with SQLServer.
<T walks into our work area>
T: "Your solution is going to cause a lot of problems in SQLServer"
Me: "No, its not, your solution is worse. For performance, its better to use ADO.Net connection pooling."
T: "NO! Every single transaction is atomic! SQLServer will prioritize the operation thread, making the whole transaction faster than what you're trying to do."
<T goes on and on about threads, made up nonsense about priority queues, on and on>
Me: "No it won't, unless you change something in the connection string, ADO.Net will utilize connection pooling and use the same SPID, even if you explicitly call Close() on the connection. You are just wasting code thinking that works."
T walks over, stands over me (he's about 6.5", 300+ pounds), maybe 6 inches away
T: "I've been doing .net development for over 10 years. I know what I'm doing!"
I turn my chair to face him, look up, cross my arms.
Me: "I know I'm kinda new to this, but let me show you something ..."
<I threw together a C# console app, simple connect, get some data, close the connection>
Me: "I'll fire up SQLProfiler and we can see the actual connection SPID and when sql server closes the SPID....see....the connection to SQLServer is still has an active SPID after I called Close. When I exit the application, SQLServer will drop the SPD....tada...see?"
T: "Wha...what is that...SQLProfiler? Is that some kind of hacking tool? DBAs should know about that!"
Me: "It's part of the SQLServer client tools, its on everyone's machine, including yours."
T: "Doesn't prove a damn thing! I'm going to do my own experiment and prove my solution works."
Me: "Look forward to seeing what you come up with ... and you haven't been doing .net for 10 years. I was part of the team that reviewed your resume when you were hired. You're going to have to try that on someone else."
About 10 seconds later I hear him from across the room slam his keyboard on his desk.
100% sure he would have kicked my ass, but that day I let him know his bully tactics worked on some, but wouldn't work on me.7 -
I’m happiest about code I deleted.
Deleted code is easy to maintain, easy to read and it makes applications run faster.
Moreover applications take less disk space and are faster to download.
The more happy than about deleted code I’m about deleted software or destroyed computers.3 -
A nice word to all developers who say stuff like "I know I write bad code, but what does it matter.":
Please try to think in a logical way about what this part you are about to write has to do. It is much more difficult to rewrite code, the longer you wait after you started to code.
Bad code can have big impacts on different levels.
For example financially: Bad coding style or program structure can lead to thousands or much more in losses because of nasty bugs, bad performance, expandability or maintainability.
Think about quality over quantity.
A little example: I had to work together with other coders to meet a fucking tight deadline. The last day we coded like crazy and these dudes started to apply styling changes (CSS) directly as inline styles to the HTML code, instead of taking a few minutes more to find where in the CSS files they had to make the changes.
At the end of the deadline we had more stylingbugs than before. It took us another whopping 3 hours to fix what they had done.
So next time you code: Thinking before coding is mostly faster than just straightahead coding and fixing at the end. 😉2 -
The education system is a fucking joke. How do you get through all the required courses and get to the capstone course where your one goal is to build a simple prototype of a project(like a simple website) for a real world client and not know HTML or CSS when you spent a whole fuckboy semester on a class dedicated to HTML, css, JavaScript and the teacher gave you the PHP. Not only that but you can't even figure out how to use a simple google search to look up the documentation on any of these topics or even the easy to follow tutorials littering the internet on how to use Bootstrap which is what we're fucking using to make it faster to develop the core logic of our app but all you fucking want to do is take shortcuts and create a PowerPoint presentation in google slides and make an easy project look like shit and make me and yourselves look like shit. But don't fucking worry, I'll code the whole thing in a fucking night because you didn't do your part of taking care of just the front end and planned for your incompetence and lack of questions or help. I know you're busy looking for a job for after you graduate but you can't even answer a simple programming question. Let me give you the solution on how to reverse a string, cuz you don't remember c# but it literally takes 30 seconds to google the solution that is everywhere. My project team is why no one takes a degree from this university seriously.9
-
So a consulting company was hired to write stored procedures for us. I don't know where they found these guys, but the code was horrible and took ages to run.
We other devs weren't happy at all, but management forbade us to rewrite the code, cause the consultants would've gotten money for nothing then. As a "fix", these guys just reduced batch sizes to a very low amount of rows and management was happy that the procedures were so much faster now and gave their ok.
Fast forward a few weeks (to now). Obviously a reduced batch size means the procedures will run faster, but more often and it will take weeks to load all the data we need.
Result: Management ordered us to rewrite the SPs and we're all torn between laughing and crying.4 -
Coworker: "Look our WebApp loads much faster in Chrome (0.8s) than in Firefox (4.6s). This clearly shows that Chrome has the better JS-Engine"
Me internally: "No, it just shows how bad your JS-Code is, and not optimized, you dense Mo**Fu**"5 -
Somebody asked on how to get started on Full Stack web application development.
This is how I got started.
Client side Web Application Development:
---------------------------------------------------------------
• Start with basic HTML, CSS and JS, JSON. For quick learning, see W3Schools for these topic or YouTube it.
• Get a local web server. "200 OK!" webserver chrome extension is a good start. (https://chrome.google.com/webstore/...)
• Learn Chrome Dev Tools to debug the pages. YouTube it.
• Get a good IDE. I am very happy with VSCode. You can use it for very serious WebApps.
• Start learning JavaScript language in depth, but just related to Web Browser related topic or you would get sucked in server side too early.
• Install node.js. Learn NPM package manager. Learn basic node commands.
• Learn complexity of JS file referencing, JS modules in browser. Just learn, don't use it yet, to understand the benefits of code bundlers.
• Learn Webpack code bundler.
• Learn how to make you simple site much faster and using in Mobile using "Progressive Web Apps".
• Now learn to make modular UIs. I love React. Focus on getting the UI code modulear. Create Single Page sites. (You are not there yet to create a Web App) “Create-React-App” started kit is a good starting point.
• Learn to create multi-page site using React-router.
• Learn application state management using Redux.
• Learn to create application decision engine using Redux-Saga.
Practice and master each stage.
Along above, learn git / GitHub (to learn from others code), find good web resources like Medium / Smashing magazine, good YouTube channels etc. I subscribed to some popular Udemy courses too.
Server side Web development:
------------------------------------------
:) First learn client side Web Application development. Server side learning is another story.3 -
Okay, I love programming - making my code better faster more readable^^ but I am not a nerd, I have no idea what's going on in star wars or star trek, I do not fucking care about Game of Thrones - I prefer to go out in some clubs and so... I hate it when people are so fucking surprised about my job and interests.
There are programmers who are not nerds live with it!21 -
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 -
So today, I managed to make one of my colleagues feel like an idiot. In this contract, I work mostly for ui integration, while he build the pages with angular before I add all the html structure and fancy css.
We are building the front-end/ui for an industrial device with a touch screen. For that last 2 days he was blocked on a bug that when you click the confirm button on a delete popup, it would somehow select an input in the page before it was deleted and would lock the ui when showing the virtual keyboard (the poor thing didn't know what to do and wouldn't close).
During those two days, he asked all the other devs for help, trying to find a pattern or anything that could help, while I was focused on writing my css and stuff since it was my priority and I was hired specifically for that (I was aware of the bug and gave my input but I never saw it being reproduced)
So today, he start his new routine of raging at his desk and he decides to show me on my device for some reason. I immediately notice a pattern. It would always select one of the two fields behind the popup, in the click area of the button (it's a big button). Then, I noticed that I could press a random spot on the screen, drag my finger on the button and let go and nothing would happen.
It's at this moment I knew I had found the bug. The button was set to emit an event on mousedown while the inputs behind it were set to emit an event on mouseup (like it should be everywhere). So the popup closed when you placed your finger on the screen and the input was selected immediately after when you removed your finger (which was usually faster than the page code which was not yet optimized)
After that, it was just an easy fix to change the listener and I had a free beer.1 -
A few months ago I was working on a (totally underpaid project) where my friend and I had to basically rewrite the entire program our client was using.
So we started planning and wrote all sorts of documentation to show the client our ideas for the new flow of the program, the new structure of the GUI and a few more details of what would the inner workings of the new app. He seemed to like all those ideas and gave us the green light to go through with the project and start coding.
We spent a couple of months coding, redoing the front end from scratch (with a different framework even, so I couldn't reuse any code from the old version) and completely redesigning the back end so it would be better, faster, more scalable etc etc etc. During this process, we obviously showed the progress of the app to our client, explaining everything we had been doing, and he seemed to like every new version we showed him.
When we were in one of the last stages in development (basically sending versions of the app to the client for evaluation), the guy suddenly changed his mind. After agreeing on everything we had been showing him over the last months, he sent an email saying:
"...the new system makes the app too complicated. I want this program to be as simple to use as possible; so we should revert the "Policy" system to essentially what it was in the last major version. The only change I want to make is [...] and everything else is essentially the same as the last Policy system."
So basically he wanted us to FUCKING UNDO EVERYTHING WE HAD DONE AND REVERT THE FUCKING PROGRAM TO THE FUCKING VERSION HE HAD BEFORE HIRING US!!!! WHAT THE FUCK????
YOU WANTED US TO CHANGE YOUR APP AND THEN YOU SUDDENLY CHANGE YOUR MIND AFTER 3 FUCKING MONTHS WHEN THE PROCESS IS DONE???
GO FIND A SWORDFISH TO FUCK YOU IN THE ASS, IM NOT WORKING FOR YOU ANYMORE
God, it feels good to let that out.4 -
So… I released v2.0.0 of devRant UWP a few weeks ago.
Then I got a lot of reports of problems on Windows 10 Mobile and older (than 1809) versions of Windows 10 on Desktop.
I decided to resubmit v2.0.0-beta16 to the store, and try to find the issue in the update… I didn't find it.
The code seems the same as the working version (at least the part I try to test is 100% equal).
So it seems I fucked up the vs project.
This means that to find the issue I can spend weeks to search it over and over inside the latest project (using shitty emulators of older Windows 10 builds to debug it), or I could just restore it to the old v2.0.0-beta16 (released in august) and implement again every single new feature and fix (something like 5 new features, dozens of improvements, changes and bug fixes).
In any case, this will require a lot of time (which I don't have at this moment).
I'm really sorry for this inconvenience, I know some of you use my client daily (~3.000 users I guess), I'm really glad someone likes it, and thanks a lot for the awesome reviews and feedback, but stable v2 (v2.1.0 at this point) will be available not earlier than in February.
Probably some of you have already download v2.0.0 while it was available in the store, and maybe it works on your device (please let me know in the comments below if you did, how is it going, and also if you like the new features and improvements).
After this epic fail, and more than 1 year (way too much) of v2 public beta, I want to throw the current project in the trash, and start it from scratch.
Which means I will start to work on v3 as soon as you will see v2.1.0 in the store, making it faster, lighter and with better support for the latest Windows 10 (Fluent Design and not) features, dropping the support for the very old UWP API.
Thanks for your attention.
Have a good day (or night)!5 -
Fuck you you stupid fucking cock sucking power company.
I was fucking in the middle of optimising a class and the power goes out.
FUCK FUCK FUCK!!!
Why didn’t I press save 😂
Now to go find me a UPS for the rare times this occurs, before my phone dies.12 -
I hate that trend of making things more lax in terms of implementation quality while writing it off with a simple but stupid "oh computers are faster now, users have the RAM, yadda yadda". Yeah but back in a day things were actually running pretty damn fast in comparison while doing it on hardware that is totally potato in comparison to what's used now. This trend eats away ANY gains we get in terms of performance with upgrades. It deprecated the whole notion of netbooks (and I kinda liked them for casual stuff), since now every goddamn one-page blog costs you from several megabytes and up to tens of megabytes of JS alone and lots of unnecessary computations. Like dude, you've brought in a whole Angular to render some text and three buttons, and now your crappy blog is chewing on 500 MB of my RAM for whatever reason.
Also, Electron apps. Hate them. Whoever invented the concept, deserves their own warm spot in Hell. You're doing the same you would've done more efficiently in Qt or whatever there is. Qt actually takes care of a lot of stuff for you, so it doesn't look like you'll be slowed down by choosing it over Electron. Like yeah, web version will share some code with your desktop solution but you're the whole reason I'm considering your competitor's lack of Electron a huge advantage over you even if they lack in features.
Same can be said pretty much about everything that tries to be more than it should, really. IDEs, for example, are cancerous. You can do 90%+ of what you intended to do in IDE using plain Vim with *zero* plugins, and it will also result in less strain on your hands.
People have just unlearned the concept of conscious consumption, it seems.28 -
When I learnt programming, sugar was still made out of salt and hence not used in coffee.
Also, we didn't have source level debuggers, only the "print" method. However, compiling was also slow. It was faster and more convenient to go through the program and execute the statements in one's head. This helped understanding what code is doing just by reading it. It also kept people from trial and error programming, something that some people fall for when they resort to single step debugging in order to understand what their own code is even doing.
Compiling was slow because computers in general were slow, like single digit MHz. That enforced programming efficient code. It's also why we learnt about big Oh notation already at school. Starting with manual resource management helped to get a feeling for what's going on under the hood.20 -
Tl;dr
Longest Rant I've written so far.
How to manage a school (by out school director):
Did this student do something spezial to emphasize the school?
-No: Ignore him
-Yes: Did the student achieve this with the help of this schools staff?
-No: Take all the credit
-Yes: Hahaha, just a joke, nobody receives help from the school. Goto -No
Q: Should this class get the 5 day trip, they've been waiting for the whole year?
Director: No.
Q: But they don't even participate in other trips just to go there.
D: No
(Good thing she did not have the last word there)
Does the school director need this one week trip to india, just to talk once about stuff, you can talk about via email, to a sponsor?
D: "Of course I deserve it"
D: "We need faster internet in this school"
Network admins: "But it won't be of any use, if the network can't handle it. We'll need better pcs (and network conponents) on top of that"
D: "No, bot enough money available for that one." *browses email with IPad paid by school money*
Teacher: "I want to realize project xy with the students. We'll need around 1200€ (for 20 people)."
D: "Can place xy at our school to as advertise?"
T: "No, but it's be a valuable le-"
D: "600 at most."
(Again denied by people who aren't fcking assholes. We got 1500€, so 300€ per group)
D: So what makes you think you can teach informatics in this school"
Applicant: "Well, I'm friends with one of your teacher here. We went to university together, where I learn't nothing about informatics and I don't even understand the principles of this subject"
D: "Close enough. Hired, you can teach them all the theory stuffy. You don't have to prepare that yourself another teacher has done so. Just read it from his documents."
*In class with the mentioned teacher talking about Threads*
*Le wild code appears*
while (doStuff())
System.out.println ("Thread working...");
System.out.println ("Thread terminated");
T: "... and most importantly, when you have done all the work be sure to terminate the thread with 'System.out.println ("Thread terminated");'"
Should this teacher be allowed to participate in this seminar about burnouts?
D: "No, I can't afford paying the supplenze."
Staff: "We need to talk with the director about this."
S: "Not in her office. The cafeteria maybe"
*Not in the cafeteria either*
S: "Seems like she didn't come to achool today. Let's try tomorrow"
(^ Stuff that happens almost daily. Screw semicolons. I see her only once a month at most)
*Student send 5000 emails by accident* (Shit happens 😂😅😂😅)
D: "You gonna work here for a full afternoon"
*Student arrives for his punishment*
Staff: "Good that you're here. Do this real quick."
*10 min. Later*
Student: "Done"
Staff: "Well, we have no more work to give you, so you might as well leave"
DONE!!! Good job coming so far.
Our school is supposed to be the best, but internally it's one big meme.4 -
Long rant...
*Designer Posted image of newly designed layout for our app on trello.
Dev 1 (me, being the junior, on ios) : so... What's the size for x, Y, z, a, B, C?
She: it's 9 for the small text, 10 for sub title, 12 for main title.
*shows her the design on app
Dev 1: seems too small
She: just make it to look not small.
Dafug?
*finishes the app layout for that screen.
*working on next screen
Dev 1: your new design is for the screen of 1920x1080. But our supported screen size starts from 320 width. So there'll be text overlapping each other and ui might screw up.
She: uh.. Just... Put those that will overlap to the next line.
*shrugs
Dev 1: ok
=======
2 days later
Dev 2 (senior, working on Android)
Dev 2: so... What's the colour for x, Y, z
*Dev 1 laughs on the inside because of the struggles we have with her.
Dev 1 to Dev 2: is it common for her not to follow the design guidelines?
Dev 2: yeah man.. We just have to adapt her design into our app guidelines.
*sigh
Dev 2: there's a new icon here on this screen, so you wanna change the icon? Can I have the icon file?
She: oh.. No.. Use back the old one, because I just copy and paste.
Dev 1: so... This progress bar of yours, doesn't show its background colour, because you filled it already. So what's the background colour if the bar isn't filled?
She : hmm.... Oh.. Well.. Maybe try x.. ? *doesn't look nice* how about Y? *doesn't look nice* how about...
Me : why not you try in your computer first instead of me changing it here by code, it's much faster this way.
*seriously, wth?
Dev 1 and 2: there's additional text in your new design, what is it for?
She : oh.. No no. I copied extra due to copy and paste. Just ignore it.
Dev 1 and 2: what's the spacing gap between x and Y? And how about the size of the box?
She : oh.. I just estimate it, and for the box, not sure either, you can follow old design, because I'm just putting a box there for illustration purpose.
Mother fickle, what fuck man.
Dev 1 and 2: *flips table.
*we didn't, but.. It's freaking annoying.7 -
I've optimised so many things in my time I can't remember most of them.
Most recently, something had to be the equivalent off `"literal" LIKE column` with a million rows to compare. It would take around a second average each literal to lookup for a service that needs to be high load and low latency. This isn't an easy case to optimise, many people would consider it impossible.
It took my a couple of hours to reverse engineer the data and implement a few hundred line implementation that would look it up in 1ms average with the worst possible case being very rare and not too distant from this.
In another case there was a lookup of arbitrary time spans that most people would not bother to cache because the input parameters are too short lived and variable to make a difference. I replaced the 50000+ line application acting as a middle man between the application and database with 500 lines of code that did the look up faster and was able to implement a reasonable caching strategy. This dropped resource consumption by a minimum of factor of ten at least. Misses were cheaper and it was able to cache most cases. It also involved modifying the client library in C to stop it unnecessarily wrapping primitives in objects to the high level language which was causing it to consume excessive amounts of memory when processing huge data streams.
Another system would download a huge data set for every point of sale constantly, then parse and apply it. It had to reflect changes quickly but would download the whole dataset each time containing hundreds of thousands of rows. I whipped up a system so that a single server (barring redundancy) would download it in a loop, parse it using C which was much faster than the traditional interpreted language, then use a custom data differential format, TCP data streaming protocol, binary serialisation and LZMA compression to pipe it down to points of sale. This protocol also used versioning for catchup and differential combination for additional reduction in size. It went from being 30 seconds to a few minutes behind to using able to keep up to with in a second of changes. It was also using so much bandwidth that it would reach the limit on ADSL connections then get throttled. I looked at the traffic stats after and it dropped from dozens of terabytes a month to around a gigabyte or so a month for several hundred machines. The drop in the graphs you'd think all the machines had been turned off as that's what it looked like. It could now happily run over GPRS or 56K.
I was working on a project with a lot of data and noticed these huge tables and horrible queries. The tables were all the results of queries. Someone wrote terrible SQL then to optimise it ran it in the background with all possible variable values then store the results of joins and aggregates into new tables. On top of those tables they wrote more SQL. I wrote some new queries and query generation that wiped out thousands of lines of code immediately and operated on the original tables taking things down from 30GB and rapidly climbing to a couple GB.
Another time a piece of mathematics had to generate all possible permutations and the existing solution was factorial. I worked out how to optimise it to run n*n which believe it or not made the world of difference. Went from hardly handling anything to handling anything thrown at it. It was nice trying to get people to "freeze the system now".
I build my own frontend systems (admittedly rushed) that do what angular/react/vue aim for but with higher (maximum) performance including an in memory data base to back the UI that had layered event driven indexes and could handle referential integrity (overlay on the database only revealing items with valid integrity) or reordering and reposition events very rapidly using a custom AVL tree. You could layer indexes over it (data inheritance) that could be partial and dynamic.
So many times have I optimised things on automatic just cleaning up code normally. Hundreds, thousands of optimisations. It's what makes my clock tick.4 -
Biggest challenge I overcame as dev? One of many.
Avoiding a life sentence when the 'powers that be' targeted one of my libraries for the root cause of system performance issues and I didn't correct that accusation with a flame thrower.
What the accusation? What I named the library. Yep. The *name* was causing every single problem in the system.
Panorama (very, very expensive APM system at the time) identified my library in it's analysis, the calls to/from SQLServer was the bottleneck
We had one of Panorama's engineers on-site and he asked what (not the actual name) MyLibrary was and (I'll preface I did not know or involved in any of the so-called 'research') a crack team of developers+managers researched the system thoroughly and found MyLibrary was used in just about every project. I wrote the .Net 1.1 MyLibrary as a mini-ORM to simplify the execution of database code (stored procs, etc) and gracefully handle+log database exceptions (auto-logged details such as the target db, stored procedure name, parameter values, etc, everything you'd need to troubleshoot database errors). This was before Dapper and the other fancy tools used by kids these days.
By the time the news got to me, there was a team cobbled together who's only focus was to remove any/every trace of MyLibrary from the code base. Using Waterfall, they calculated it would take at least a year to remove+replace MyLibrary with the equivalent ADO.Net plumbing.
In a department wide meeting:
DeptMgr: "This day forward, no one is to use MyLibrary to access the database! It's slow, unprofessionally named, and the root cause of all the database issues."
Me: "What about MyLibrary is slow? It's excecuting standard the ADO.Net code. Only extra bit of code is the exception handling to capture the details when the exception is logged."
DeptMgr: "We've spent the last 6 weeks with the Panorama engineer and he's identified MyLibrary as the cause. Company has spent over $100,000 on this software and we have to make fact based decisions. Look at this slide ... "
<DeptMgr shows a histogram of the stacktrace, showing MyLibrary as the slowest>
Me: "You do realize that the execution time is the database call itself, not the code. In that example, the invoice call, it's the stored procedure that taking 5 seconds, not MyLibrary."
<at this point, DeptMgr is getting red-face mad>
AreaMgr: "Yes...yes...but if we stopped using MyLibrary, removing the unnecessary layers, will make the code run faster."
<typical headknodd-ers knod their heads in agreement>
Dev01: "The loading of MyLibrary takes CPU cycles away from code that supports our customers. Every CPU cycle counts."
<headknod-ding continues>
Me: "I'm really confused. Maybe I'm looking at the data wrong. On the slide where you highlighted all the bottlenecks, the histogram shows the latency is the database, I mean...it's right there, in red. Am I looking at it wrong?"
<this was meeting with 20+ other devs, mgrs, a VP, the Panorama engineer>
DeptMgr: "Yes you are! I know MyLibrary is your baby. You need to check your ego at the door and face the facts. Your MyLibrary is a failed experiment and needs to be exterminated from this system!"
Fast forward 9 months, maybe 50% of the projects updated, come across the documentation left from the Panorama. Even after the removal of MyLibrary, there was zero increases in performance. The engineer recommended DBAs start optimizing their indexes and other N+1 problems discovered. I decide to ask the developer who lead the re-write.
Me: "I see that removing MyLibrary did nothing to improve performance."
Dev: "Yes, DeptMgr was pissed. He was ready to throw the Panorama engineer out a window when he said the problems were in the database all along. Didn't you say that?"
Me: "Um, so is this re-write project dead?"
Dev: "No. Removing MyLibrary introduced all kinds of bugs. All the boilerplate ADO.Net code caused a lot of unhandled exceptions, then we had to go back and write exception handling code."
Me: "What a failure. What dipshit would think writing more code leads to less bugs?"
Dev: "I know, I know. We're so far behind schedule. We had to come up with something. I ended up writing a library to make replacing MyLibrary easier. I called it KnightRider. Like the TV show. Everyone is excited to speed up their code with KnightRider. Same method names, same exception handling. All we have to do is replace MyLibrary with KnightRider and we're done."
Me: "Won't the bottlenecks then point to KnightRider?"
Dev: "Meh, not my problem. Panorama meets primarily with the DBAs and the networking team now. I doubt we ever use Panorama to look at our C# code."
Needless to say, I was (still) pissed that they had used MyLibrary as dirty word and a scapegoat for months when they *knew* where the problems were. Pissed enough for a flamethrower? Maybe.6 -
As a consultant, you get tasked with a variety of stuff. Last few weeks been struggling to maintain an old C++ application that was written by a complete tool of an a$$hole with zero knowledge on how to write maintainable and production quality code. It would hardly run without a crash. First it was a challenge I had to accept, but as I stabilized the code and just fell over even more traps, I had to admit defeat and review my approach.
Rewrite is something I would choose last, but this one ticked all the marks worthy of a rewrite. So, the customer is a very friendly researcher and gladly spent 15 hours with me explaining all the math and concepts - just a delight for a programmer to have such a customer. Two days in, with a DDD approach - a functional, more precise, faster and stable application.
Sometimes there is no rant to share, it's rare to have that perfect communication with a customer that is so dedicated that he spends so much time teaching you his speciality and actually understand your approach. DDD was really a lifesaver here, by using it's key concepts and ubiquitous language. The program is essentially 8000 lines of math, but wrapping it up with value objects and strong domain models made me understand his domain and him mine. It also allowed me to parallelize the computations, giving me a huge performance boost. Textbook approach, there will not be many like this!4 -
Me: *opens FB in mobile web browser*
FB: You there! Go ans get our great Facebook Lite app! It is faster and...
Me: Nope! *clicks X to dismiss*
FB: Nope! *a wild code appeared*10 -
1. Hit everything you do. You will learn more faster. Don't accept things at face value, care about why things work.
2. Study and experiment constantly. Be aware of your surroundings and what is going on. If you're not ready with a solution when a power vacuum appears, you will always be a grunt. Or worse, eventually a manager who everyone hates because you constantly tell the people who report to you how "back in your day," your code was amazing, there were no bugs and your shit doesn't stink.
3. Be honest with yourself: If you just want to keep your nose to the grindstone and make manager so you don't have to code anymore:
Quit. Stop now. Do not pass go, do not become a cancer on the industry.
Go get a job as a PM, you'll have a better career and you won't be the weak link holding everyone else back.
Tl;dr When the shit goes down, you better be ready.1 -
First day on my first job ever, the boss asks me what I want to do. I indicated that I had some experience with php and the yii framework (which was at some point very cool xD), so I wanted to start with something like that. And so it goes: after two days of watching laracasts (which is an awesome platform by the way! :O) I got assigned to a project.
Now the company I work at uses some kind of self built system that tracks how many hours are spent on which project, and compares that to how many hours was estimated implementing a feature would take. That's cool, but then I saw that for the project I was working on the time estimated was 5 work days. This was the estimate for both designing the interfaces and implementing both front and backend. I knew in advance that this was probably way to little time for me, but didn't want to come over as the new kid who can't do shit x)
Anyway, I started on the project and was having fun, but the biggest time consuming aspect of the project was not necessarily that I didn't have enough experience: it was that the developer who started this project and made most of the design choices had written some very messy code, without tests or apparently any refactoring. Also, everything was extremly inconsistent and not according to all the best practices I just watched in my laracasts spree.
So fastforward a little: we're way over the estimated hours. Yay. Now suddenly the boss comes by with an almost angry face that the client is becoming angry and we need to finish soon. He makes it entirely our (me and the front end guy) problem and I just decide to say nothing and try to work faster.
Now I'm stuck writing fugly code on top of more fugly code and when I mentioned to my front end guy that I was almost finished with feature but I only needed to finish up the tests, he said something like "oh just don't write tests, that'll take too long"... Is that really the mindset of this company?! No wonder the project I work on was in a very bad state.
Thanks to devrant I see now that I just need to say something if I know that I won't be able to complete something in a certain amount of time and that other people are just like me (thank god). :) I think I'll need to post more rants to vent my frustrations x)5 -
Wasting about an hour trying to leave detailed comments and suggestions for a fellow student on an university project's code.
Said person just respond on the team group with "If anyone does not like something, he/she can go ahead to change it, so we would move on faster"
THEN WHY THE FUCK ARE WE STILL DOING CODE REVIEWS???6 -
Not a job, but an internship. It was a startup and the owner was very keenly involved with the development, to the extent that he took daily reports of what was achieved through the day, what was done, what bugs were fixed, what functionality added. Everything we did was supposed to be showed to him to justify that he wasn't wasting the (sub-par) compensation he was offering. I hated the feeling of someone breathing down my neck, judging me by the amount of code I wrote that day (I was team lead). It was all well and fine till the frontend was under development, but then we moved to backend developement. And the thing with backend is, you can't see shit. So, there really wasn't anything to point-and-show every day, except for long PHP scripts that didn't make sense to him. It came to the point that he once said "the work pace had dropped significantly and we weren't moving fast enough". This was when we were actually 5 days ahead of schedule! I literally wanted to stand up and say to him that if he wanted to get it done faster, he should look for someone else. The only thing that held me back was my University's grading system that made it compulsory for students to complete one internship for credits. Glad to be out of that craphole...3
-
Many of you who have a Windows computer may be familiar with robocopy, xcopy, or move.
These functions? Programs? Whatever they may be, were interesting to me because they were the first things that got me really into batch scripting in the first place.
What was really interesting to me was how I could run multiples of these scripts at a time.
<storytime>
It was warm Spring day in the year of 2007, and my Science teacher at the time needed a way to get files from the school computer to the hard-drive faster. The amount of time that the computer was suggesting was 2 hours. Far too long for her. I told her I’d build her something that could work faster than that. And so started the program would take up more of my time than the AI I had created back in 2009.
</storytime>
This program would scan the entirety of the computer's file system, and create an xcopy batch file for each of these directories. After parsing these files, it would then run all the batch files at once. Multithreading as it were? Looking back on it, the throughput probably wasn't any better than the default copying program windows already had, but the amount of time that it took was less. Instead of 2 hours to finish the task it took 45 minutes. My thought for justifying this program was that; instead of giving one man to do paperwork split the paperwork among many men. So, while a large file is being copied, many smaller files could be copied during that time.
After that day I really couldn't keep my hands off this program. As my knowledge of programming increased, so did my likelihood of editing a piece of the code in this program.
The surmountable amount of updates that this program has gone through is amazing. At version 6.25 it now sits as a standalone batch file. It used to consist of 6 files and however many xcopy batch files that it created for the file migration, now it's just 1 file and dirt simple to run, (well front-end, anyways, the back-end is a masterpiece of weirdness, honestly) it automates adding all the necessary directories and files. Oh, and the name is Latin for Imitate, figured it's a reasonable name for a copying program.
I was 14, so my creativity lacked in the naming department >_<1 -
Doing occasional first & second level support besides my actual job of coding can be fucking annoying and time consuming.
Just let me code in peace and listen to doom metal!
"Blabla our 17 years old plotter does not respond blabla fix it please"
"My computer is so slow, make it faster"
Go die in your filthy office chairs by being pierced through the stinking butthole you ignorant endoplasmatische retikula!1 -
I get really defiant when i repeatedly get micromanaged with bullshit instructions, such as asking me to have my just started c++ library poc which also involves a lot of learning and will earliest be usable in a few months, "ready for our customer devs" in 2 weeks from now.
just no, you fucking retard.
also, the lib alone wouldn't make any sense, since the code parts working with it don't yet exist at all.
and then getting instructed to ask customers if they can provide you with c++ code that solves the task for them in their own software, which of course will somehow magically fit in my existing codebase. even if it existed (which it fortunately doesn't because they do everything in C#), i don't think i'm going to be faster trying to somehow solder in their code into my library, of which i'm still brainstorming about the general architecture.
if you have so fucking unrealistic expectations, maybe stop sniffing glue all day and don't make this my fucking problem.3 -
I rewrote my static website generation from jekyll to custom python code over single night.
Literally all jekyll plugins I use including seo, rss, syntax highlighting inside markdown content, sitemap, social plugins, css sass, all of it.
Now it’s around 400 lines of python code that I understand completely. I didn’t touch any existing templates and after comparing output I got even better results now and it’s working faster.
I skipped drafts as I don’t need them now.
Why ? Cause now I can make better generator for my side projects that can include some partial website generation, better modification and date handling, tree structure, etc.
What I will do now is that I will parse bunch of content to create markdown files that will be sucked by this generator to create static web pages that will flood internet lol.
Still I didn’t believe it was possible to rewrite all of it so quickly. I sit yesterday around 4pm and finished around 6am.
I started thinking that maybe I am crazy and no one can help me.9 -
I miss the good times when the web was lightweight and efficient.
I miss the times when essential website content was immediately delivered as HTML through the first HTTP request.
I miss the times when I could open a twitter URL and have the tweet text appear on screen in two seconds rather than a useless splash screen followed by some loading spinners.
I miss the times when I could open a YouTube watch page and see the title and description on screen in two seconds rather than in ten.
I miss the times when YouTube comments were readily loaded rather than only starting to load when I scroll down.
JavaScript was lightweight and used for its intended purpose, to enhance the experience by loading content at the page bottom and by allowing interaction such as posting comments without having to reload the entire page, for example.
Now pretty much all popular websites are bloated with heavy JavaScript. Your browser needs to walk through millions of bytes of JavaScript code just to show a tweet worth 200 bytes of text.
The watch page of YouTube (known as "polymer", used since 2017) loads more than eight megabytes of JavaScript last time I checked. In 2012, it was one to two hundred kilobytes of HTML and at most a few hundred kilobytes of JavaScript, mostly for the HTML5 player.
And if one little error dares to occur on a JavaScript-based page, you get a blank page of nothingness.
Sure, computers are more powerful than they used to be. But that does not mean we should deliberately make our new software and website slower and more bloated.
"Wirth's law is an adage on computer performance which states that software is getting slower more rapidly than hardware is becoming faster."
Source: https://en.wikipedia.org/wiki/...
A presentation by Jake Archibald from 2015, but more valid than ever: https://youtube.com/watch/...34 -
Yepp.. The older you get, the faster the time flies by. Remember how long days used to be when you were 10? How much you used to do then? And now? You barely skim through your emails and it's already lunch time.. And soon after that it's already time to go home, go to sleep. And the next day is the same. Round robin, round robin... And when you think that the pooft-you're-gone moment is approaching faster and faster every year, you wonder what are you leaving behind, to remember you by.. A few dev projects that will drown to oblivion a few years after you're out, a few modules in other projects that will live longer but your code lines will soon be overwritten and forgotten in git's history, where noone ever scrolls to. Your own projects you have never released. Your fam who will remember you until their grandchildren - after that older generations are forgotten...
What is it that will keep people saying your name after you're gone? What significant have you given to the life?19 -
I'm convinced that playing the piano has allowed me to type faster and commit keyboard shortcuts to muscle memory faster too. While coding isn't about typing quickly, there's a whole bunch of times when I've had an idea, and had to get that down into code as quickly as possible before I forget it - and that's when I really find fast keyboard work comes into its own.5
-
Making python 2x faster by replacing enums with literal values.
Pros, it's faster, cons, it's unreadable.
God I miss compiled languages. At least optimizing them requires intelligent problem solving.
It's a text parser state machine transition so it's a code hot spot, so this kind of optimization is worthwhile. But it's kinda annoying.
Next is get rid of any semblance of readability and replace the match with an array index...31 -
PM: You can cut corners it it's necessary.
Me: Thanks for giving me permission to move faster.
*But as you know, I wouldn't be in this position if you hadn't made us agree to such an unrealistic deadline.*
..
...
*after completion*
.
.
PM: There are bugs in the code.
ME: There are bugs, because you asked me to cut corners. *fu#k you* *wtf moment*4 -
Boss is also a programmer which is nice. boss is also incredibly impatient. so when he gives me a project to do, when I don't have it done the day of, he goes and does it over the weekend. but he doesn't tell until a few days later when I finish the following Tuesday. he chucked my git branch and just pushed his stuff to master. then he belittled me because there was a feature missing in his code and I hadn't done it yet. I don't know how to deal with this. on the one hand, I could try and work faster. but on the other, I am trying to add features to software he wrote in c-style c++, didn't comment, and hasn't been updated to modern standards since 1998. even the copyright files are 1997 to 2001. just very discouraged as its my first job in the field. it wouldn't have been so frustrating if he had just told me he'd worked on it himself instead of letting me finish it and then throwing it in the trash.
end rant8 -
Using an array of function pointers to replace large switch statements... holy shit.. I feel like Thanos getting the time stone.
Just when you think you can’t get your code to run any faster, nor did I think I could get the code any smaller... BOOM.. C never ceases to impress.
Next I’ll be turning this into “object” oriented ... but since it’s C ... it will just be Struct oriented .. SOP ..18 -
Got fed up with having to use the mouse/trackpad while editing code or using the terminal, so I decided to (finally) learn proper vim keybindings and tmux.
Boooooy oh boy, this certainly changes things.
I think I'm in love with tmux. Damn that piece of software is so sexy. Disabled the mouse, propped up my dotfiles and installed tmux + my conf on all machines I use. It's so useful, so fast and so pretty...
Spent some time with vimtutor too. Finally getting faster with the keybindings. Installed neovim, got some plug-ins (nerdtree, fzf etc), disabled the mouse and arrow keys, and made it pretty. It's actually pretty nice, but I'm not at the "buff gorilla who took speed and pressed 24 keys in a microsecond" typing level yet. One day though.
Also I'm using the Nord color scheme on everything. Overall pretty satisfied with the end result. Still not as productive as I was with VS Code, but I think I'll eventually surpass my previous productivity levels.
If anyone has any tips for vim/nvim or tmux, feel free to share!10 -
Oh man where to start:
Not wanting to use LINQ because he did not wanted to "download external dependencies"
Not wanting to use prepared statements on their php sql code, and refusing to use pdo because they will "always use mysql"(moved to postgreSQL shortly after I left)
For some reason including a php file that only had ?>......thats it....only ?>
Use c++ but refused to learn oop and use structs for everything, importing stdio.h and printf everything.....like really?
Maybe just nitpicking, but refusing to use the recyclerview pattern on am android app. The implementation was faster after I made the change.
Importing a library for promises instead of using the ones already in the language(JS)
Changing the style of aaaaall p tags instead of using classes as well as refusing to use divs in place of p tags...well...fuck
Not indent his ASP classic code
Use notepad on his asp classic code
Use ASP Classic in 2017, even for new projects6 -
I once had a class mate who argued that coding in C not only produced faster code than .NET C#, but that he could actually produce applications faster than me in C.
I challenged him to make a Web browser. While he was struggling to remember if it was #include <stdio.h> or #include <iostream>, I started typing WebBro... and let IntelliSense work it's magic.
Needless to say I won.
Sadly, he wouldn't admit his defeat but went on about how much faster his browser would run in the end...
He has yet to release a Web browser written completely in C.15 -
Today I am gonna start writing code in react to replace/improve an old silverlight project.
I need to show react is faster, easier and more efficient than angular.
Thumbs up if you like react and comment if you think I'm wrong 🙂9 -
Just rememberes a collegue i had for a short period, i was remote and he was on location randomly added, I was told he was a php developer.
What he did was delete ALL the whitespace in the php code and called it optimising, he told the director it’ll make the code run faster. You can imagine how fun that was...2 -
So I left this company I was working for for about 6 years and then eventually came back earlier this year. It was basically 2 backend devs, 2 frontend, and a designer, with me being one of the frontend devs, and the other operating as the owner/alpha of the group. And our coding styles couldn’t have been more different. I wrote code with purpose that could scale, while he wrote garbage that I affectionally labelled "brute force code"; meaning it eventually got the job done, but was always a complete nightmare to work with. Think the windiest piece of shit you’ve ever seen and then times it by 10. Edit the simplest thing at your peril. And if you think you fixed something, all you’ve ever really done is create another 10 problems. And because the code was such shit, it relied on certain things to be broken in order for other things to work. Anyway, you get the drift.
In the beginning we used jQuery and so we just continued to use it throughout the years. But then when I finally left I realized we were operating in a bit of a bubble, where we didn’t really care much to ever try anything else, and mostly because we were arrogant. But eventually my boss started to notice the trend of moving away from jQuery, so he converted everything to vanilla JavaScript. Thing is, he hadn’t learned ES6 yet or any of the other tools that came along with it. And so it was a mess, and I was quite shocked at how many lengths he’d gone to create the full conversion. Granted, it was faster. But overall, still a nightmare to work with, as the files were still thousands of lines long. And when I dug deeper, I realized that he’d started to pluck things out of the DOM manually on-demand. And so it dawned on me: he’d been looking at sites built with React and other dif-engines, and then instead of just using one, he decided to reinvent the wheel. And the funny thing is, he thought it was just a matter of always replacing the entire HTML for whatever was needed. And so he thought what he was doing was somehow clever. And why not? He’s a badass mathematician who created an empire with jQuery. And so he obviously didn’t need input from anyone, and especially not from the shitty devs over there at Facebook. Anyway, while I was gone I learned quite a bit of React, and so it was just comical to me when I came back and saw this. Because it would have been a million times more efficient had he just used the proper tool. In short, he’d re-written the entire codebase for two full years and then ended up with another round of brute-force garbage.
So that’s my story. The lesson is, when you work for someone who’s a dumbass piece of shit, sometimes he’ll be so stupid the only recourse is uncontrollable laughter. I became a digital nomad somewhere in between and fucked off to Asia where I barely worked for 2 years. And I’d definitely recommend the same for anyone else with an asshole boss where the work is unfulfilling. Because it doesn’t matter what your job is when you’re living like a millionaire in Asia working 15 hours a week.4 -
I hate time.
Yes, that dimension which unidirectionally rushes by and makes us miss deadlines.
Also yes, that object in most programming languages which chokes to death on formatting conversions, timezones, DST transitions and leap seconds.
But above all, I hate doing chronological things from the point of view of code, because it always involves scheduling and polling of some kind, through cron jobs and queues with workers.
When the web of actions dependent on predicted future and passed past events becomes complicated, the queries become heavy... and with slow queries, queues might lock or get delayed just a little bit...
So you start caching things in faster places, figure out ways to predict worker/thread priorities and improve scheduling algorithms.
But then you start worrying about cache warming and cascading, about hashing results and flushing data, about keeping all those truths in sync...
I had a nightmare last night.
I was a watchmaker, and I had to fix a giant ticking watch, forced to run like a mouse while poking at gears.
I fucking need a break. But time ticks on...2 -
Worst thing you've seen another dev do? Here is another.
Early into our eCommerce venture, we experienced the normal growing pains.
Part of the learning process was realizing in web development, you should only access data resources on an as-needed basis.
One business object on it's creation would populate db lookups, initialize business rule engines (calling the db), etc.
Initially, this design was fine, no one noticed anything until business started to grow and started to cause problems in other systems (classic scaling problems)
VP wanted a review of the code and recommendations before throwing hardware at the problem (which they already started to do).
Over a month, I started making some aggressive changes by streamlining SQL, moving initialization, and refactoring like a mad man.
Over all page loads were not really affected, but the back-end resources were almost back to pre-eCommerce levels.
The main web developer at the time was not amused and fought my changes as much as she could.
Couple months later the CEO was speaking to everyone about his experience at a trade show when another CEO was complementing him on the changes to our web site.
The site was must faster, pages loaded without any glitches, checkout actually worked the first time, etc.
CEO wanted to thank everyone involved etc..and so on.
About a week later the VP handed out 'Thank You' certificates for the entire web team (only 4 at the time, I was on another team). I was noticeably excluded (not that I cared about a stupid piece of paper, but they also got a pizza lunch...I was much more pissed about that). My boss went to find out what was going on.
MyBoss: "Well, turned out 'Sally' did make all the web site performance improvements."
Me: "Where have you been the past 3 months? 'Sally' is the one who fought all my improvements. All my improvements are still in the production code."
MyBoss: "I'm just the messenger. What would you like me to do? I can buy you a pizza if you want. The team already reviewed the code and they are the ones who gave her the credit."
Me: "That's crap. My comments are all over that code base. I put my initials, date, what I did, why, and what was improved. I put the actual performance improvement numbers in the code!"
MyBoss: "Yea? Weird. That is what 'Tom' said why 'Sally' was put in for a promotion. For her due diligence for documenting the improvements."
Me:"What!? No. Look...lets look at the code"
Open up the file...there it was...*her* initials...the date, what changed, performance improvement numbers, etc.
WTF!
I opened version control and saw that she made one change, the day *after* the CEO thanked everyone and replaced my initials with hers.
She knew the other devs would only look at the current code to see who made the improvements (not bother to look at the code-differences)
MyBoss: "Wow...that's dirty. Best to move on and forget about it. Let them have their little party. Let us grown ups keeping doing the important things."8 -
Hey everyone. I decided to rewrite python's abs() function, as it's really slow. Here is my new and improved version. It's up to 500% faster!!!
def abs(int=None):
if not int is None:
try:
lnt = math.sqrt(int);
lnt = math.pow(lnt, 2);
return lnt;
except Exception as E:
lnt = int/-1;
return lnt;
else:
raise ValueError("oopsie whoopsie! uwu we made a fucky wucky!!1 a wittle fucko boingo! the code monkies at our headquarters are working VEWY HAWD to fix dis!!");
Edit: devrant fucked up the indention.
Here is a hastebin instead:
https://hastebin.com/iyajuyoxuq.pl7 -
Two big moments today:
1. Holy hell, how did I ever get on without a proper debugger? Was debugging some old code by eye (following along and keeping track mentally, of what the variables should be and what each step did). That didn't work because the code isn't intuitive. Tried the print() method, old reliable as it were. Kinda worked but didn't give me enough fine-grain control.
Bit the bullet and installed Wing IDE for python. And bam, it hit me. How did I ever live without step-through, and breakpoints before now?
2. Remember that non-sieve prime generator I wrote a while back? (well maybe some of you do). The one that generated quasi lucas carmichael (QLC) numbers? Well thats what I managed to debug. I figured out why it wasn't working. Last time I released it, I included two core methods, genprimes() and nextPrime(). The first generates a list of primes accurately, up to some n, and only needs a small handful of QLC numbers filtered out after the fact (because the set of primes generated and the set of QLC numbers overlap. Well I think they call it an embedding, as in QLC is included in the series generated by genprimes, but not the converse, but I digress).
nextPrime() was supposed to take any arbitrary n above zero, and accurately return the nearest prime number above the argument. But for some reason when it started, it would return 2,3,5,6...but genprimes() would work fine for some reason.
So genprimes loops over an index, i, and tests it for primality. It begins by entering the loop, and doing "result = gffi(i)".
This calls into something a function that runs four tests on the argument passed to it. I won't go into detail here about what those are because I don't even remember how I came up with them (I'll make a separate post when the code is fully fixed).
If the number fails any of these tests then gffi would just return the value of i that was passed to it, unaltered. Otherwise, if it did pass all of them, it would return i+1.
And once back in genPrimes() we would check if the variable 'result' was greater than the loop index. And if it was, then it was either prime (comparatively plentiful) or a QLC number (comparatively rare)--these two types and no others.
nextPrime() was only taking n, and didn't have this index to compare to, so the prior steps in genprimes were acting as a filter that nextPrime() didn't have, while internally gffi() was returning not only primes, and QLCs, but also plenty of composite numbers.
Now *why* that last step in genPrimes() was filtering out all the composites, idk.
But now that I understand whats going on I can fix it and hypothetically it should be possible to enter a positive n of any size, and without additional primality checks (such as is done with sieves, where you have to check off multiples of n), get the nearest prime numbers. Of course I'm not familiar enough with prime number generation to know if thats an achievement or worthwhile mentioning, so if anyone *is* familiar, and how something like that holds up compared to other linear generators (O(n)?), I'd be interested to hear about it.
I also am working on filtering out the intersection of the sets (QLC numbers), which I'm pretty sure I figured out how to incorporate into the prime generator itself.
I also think it may be possible to generator primes even faster, using the carmichael numbers or related set--or even derive a function that maps one set of upper-and-lower bounds around a semiprime, and map those same bounds to carmichael numbers that act as the upper and lower bound numbers on the factors of a semiprime.
Meanwhile I'm also looking into testing the prime generator on a larger set of numbers (to make sure it doesn't fail at large values of n) and so I'm looking for more computing power if anyone has it on hand, or is willing to test it at sufficiently large bit lengths (512, 1024, etc).
Lastly, the earlier work I posted (linked below), I realized could be applied with ECM to greatly reduce the smallest factor of a large number.
If ECM, being one of the best methods available, only handles 50-60 digit numbers, & your factors are 70+ digits, then being able to transform your semiprime product into another product tree thats non-semiprime, with factors that ARE in range of ECM, and which *does* contain either of the original factors, means products that *were not* formally factorable by ECM, *could* be now.
That wouldn't have been possible though withput enormous help from many others such as hitko who took the time to explain the solution was a form of modular exponentiation, Fast-Nop who contributed on other threads, Voxera who did as well, and support from Scor in particular, and many others.
Thank you all. And more to come.
Links mentioned (because DR wouldn't accept them as they were):
https://pastebin.com/MWechZj912 -
When I had to postpone the release of v2 of devRant UWP for 3 months because I changed a few minutes before the final build a "loaded" event to a "loading" event.
Something that for some stupid reason I thought will make the startup faster (maybe by 2ms) has caused crashes on mobile and some Windows 10 versions.
Of course I didn't spend 3 months to find this bug, but at least a few days in December and then I didn't have enough free time so I had to stop until mid February when I finally fixed it.
To find the reason I reverted the code to the previous update and started to add every feature one by one.
So much time wasted for a fucking "-ing". -
that feeling when your (thrice) refactored code executes literally 1000 times faster.
loading excel ranges into vba arrays and process these is much faster than comparing the ranges themselves. also much more readable. please don't throw rocks at me for don't knowing this in advance.6 -
Buckle up, it's a long one.
Let me tell you why "Tree Shaking" is stupidity incarnate and why Rich Harris needs to stop talking about things he doesn't understand.
For reference, this is a direct response to the 2015 article here: https://medium.com/@Rich_Harris/...
"Tree shaking", as Rich puts it, is NOT dead code removal apparently, but instead only picking the parts that are actually used.
However, Rich has never heard of a C compiler, apparently. In C (or any systems language with basic optimizations), public (visible) members exposed to library consumers must have that code available to them, obviously. However, all of the other cruft that you don't actually use is removed - hence, dead code removal.
How does the compiler do that? Well, it does what Rich calls "tree shaking" by evaluating all of the pieces of code that are used by any codepaths used by any of the exported symbols, not just the "main module" (which doesn't exist in systems libraries).
It's the SAME FUCKING THING, he's just not researched enough to fully fucking understand that. But sure, tell me how the javascript community apparently invented something ELSE that you REALLY just repackaged and made more bloated/downright wrong (React Hooks, webpack, WebAssembly, etc.)
Speaking of Javascript, "tree shaking" is impossible to do with any degree of confidence, unlike statically typed/well defined languages. This is because you can create artificial references to values at runtime using string functions - which means, with the right input, almost anything can be run depending on the input.
How do you figure out what can and can't be? You can't! Since there is a runtime-based codepath and decision tree, you run into properties of Turing's halting problem, which cannot be solved completely.
With stricter languages such as C (which is where "dead code removal" is used quite aggressively), you can make very strong assertions at compile time about the usage of code. This is simply how C is still thousands of times faster than Javascript.
So no, Rich Harris, dead code removal is not "silly". Your entire premise about "live code inclusion" is technical jargon and buzzwordy drivel. Empty words at best.
This sort of shit is annoying and only feeds into this cycle of the web community not being Special enough and having to reinvent every single fucking facet of operating systems in your shitty bloated spyware-like browser and brand it with flashy Matrix-esque imagery and prose.
Fuck all of it.20 -
I loved what Flash used to be. Most people thought it was proprietary stuff. The program was. It's language was not. And damn, did we have fun together! We rendered vector graphics from code and pushed perlin noise into bitmaps while the HTML guys were still struggling with rounded corners. Oh, those bezier curves we dreamed up out of thin lines of code!
Other people just couldn't see how beautiful you were. They hated you because you were popular, and ads were beginning to dominate the landscape. And lots of dildo's made ads by abusing your capabilities, straining you with their ugly code that didn't remove event listeners properly. I always did, because I loved you.
They made fun of you because you had to be compiled. Look what those cavemen are doing now, dear ActionScript 3.0. They are compiling Javascript and pushing it to production. They are all fools my dear, unworthy to read even a single line of your gracious typed syntax. We were faster then Java. More animated and fluid then CSS. We were even responsive if we needed to.
But... I have to move on. I don't know if you're still watching over me but I can't deny I've been trying to find some happiness. I think you would have wanted me to. C# is a sweet girl and I'm thankful for her, but I won't ever forget those short few years we had together. They were the absolute best.
Rest well my dear princess.8 -
Want to make someone's life a misery? Here's how.
Don't base your tech stack on any prior knowledge or what's relevant to the problem.
Instead design it around all the latest trends and badges you want to put on your resume because they're frequent key words on job postings.
Once your data goes in, you'll never get it out again. At best you'll be teased with little crumbs of data but never the whole.
I know, here's a genius idea, instead of putting data into a normal data base then using a cache, lets put it all into the cache and by the way it's a volatile cache.
Here's an idea. For something as simple as a single log lets make it use a queue that goes into a queue that goes into another queue that goes into another queue all of which are black boxes. No rhyme of reason, queues are all the rage.
Have you tried: Lets use a new fangled tangle, trust me it's safe, INSERT BIG NAME HERE uses it.
Finally it all gets flushed down into this subterranean cunt of a sewerage system and good luck getting it all out again. It's like hell except it's all shitty instead of all fiery.
All I want is to export one table, a simple log table with a few GB to CSV or heck whatever generic format it supports, that's it.
So I run the export table to file command and off it goes only less than a minute later for timeout commands to start piling up until it aborts. WTF. So then I set the most obvious timeout setting in the client, no change, then another timeout setting on the client, no change, then i try to put it in the client configuration file, no change, then I set the timeout on the export query, no change, then finally I bump the timeouts in the server config, no change, then I find someone has downloaded it from both tucows and apt, but they're using the tucows version so its real config is in /dev/database.xml (don't even ask). I increase that from seconds to a minute, it's still timing out after a minute.
In the end I have to make my own and this involves working out how to parse non-standard binary formatted data structures. It's the umpteenth time I have had to do this.
These aren't some no name solutions and it really terrifies me. All this is doing is taking some access logs, store them in one place then index by timestamp. These things are all meant to be blazing fast but grep is often faster. How the hell is such a trivial thing turned into a series of one nightmare after another? Things that should take a few minutes take days of screwing around. I don't have access logs any more because I can't access them anymore.
The terror of this isn't that it's so awful, it's that all the little kiddies doing all this jazz for the first time and using all these shit wipe buzzword driven approaches have no fucking clue it's not meant to be this difficult. I'm replacing entire tens of thousands to million line enterprise systems with a few hundred lines of code that's faster, more reliable and better in virtually every measurable way time and time again.
This is constant. It's not one offender, it's not one project, it's not one company, it's not one developer, it's the industry standard. It's all over open source software and all over dev shops. Everything is exponentially becoming more bloated and difficult than it needs to be. I'm seeing people pull up a hundred cloud instances for things that'll be happy at home with a few minutes to a week's optimisation efforts. Queries that are N*N and only take a few minutes to turn to LOG(N) but instead people renting out a fucking off huge ass SQL cluster instead that not only costs gobs of money but takes a ton of time maintaining and configuring which isn't going to be done right either.
I think most people are bullshitting when they say they have impostor syndrome but when the trend in technology is to make every fucking little trivial thing a thousand times more complex than it has to be I can see how they'd feel that way. There's so bloody much you need to do that you don't need to do these days that you either can't get anything done right or the smallest thing takes an age.
I have no idea why some people put up with some of these appliances. If you bought a dish washer that made washing dishes even harder than it was before you'd return it to the store.
Every time I see the terms enterprise, fast, big data, scalable, cloud or anything of the like I bang my head on the table. One of these days I'm going to lose my fucking tits.10 -
It's sometimes good I work remotely from the rest of my team.... So other can't see how pissed I'm while chatting with them...
Just did an afternoon basically hand holding someone... And well this is the 3rd day... And the original instructions I gave them was: here's the problem, here the code fix, now you need to change it for the other 10 APIs it affects (OS migration).
I have another problem I need to figure out....
Yes I could do it all myself and it would be faster but I don't want to be the only person who can do this stuff either...
But can you just try to use your brain and figure things out before asking how to ....
I don't know am I that much more experienced than everyone else so I just know how to figure things out quickly, know to the learn efficiently? Ask the right questions to Google?
How hard is it to just learn to Google your problems... 80% of the questions u ask me I either tell you to Google it or actually end up googling the answer myself...2 -
Ya'll know what... If humans weren't such annoying vulnerability-searching little shits then we wouldn't have had to implement any protection against them and think of all the performance that would be saved on that. Take branch prediction vulnerability mitigation in the Linux kernel for example, that's got to make a performance hit of least 10% on basically everything.
Alas, I do get why security is important and why we keep such vulnerability mitigation running despite the performance hit. I get why safe code is necessary but still... if these people weren't such annoying little bastards.
Yeah, I was just kind of set off by the above. So much would be faster and easier if only the programmers wouldn't have to plan for people exploiting their software. Software would be written much faster and humans would progress to stuff that actually matters like innovation.8 -
With over 10 years as a dev under my belt I never wanted to change company before my probation is even over. I never felt so drained, and pissed off for the entire duration of my working hours, every day for about 4 months straight. I was thinking it should get better, I listened to all the rubbish webinars about the company culture, how inclusive and diverse we are and how they value phycological safety and how everyone should feel safe to speak their mind. The people are fucking reviewing my approved and merged PRs and expecting me to address their comments. Like someone goes on holiday and when they’re back they want to spray wisdom around, and that seems to happen to everyone not just me. When we have technical discussions and I express my opinion I get given out to for speaking too much. Like what the actual fuck, your code is shit, everyone knows it and complains about it, but we should look at what we already have as an example. How the fuck you think you can improve your code if your not going to change your shit. Writing class diagrams for about two weeks at start of each project and nitpicking every fucking thing, only to abandon it after our first sprint as the fucking requirements have changed and what we agreed at the beginning as no longer relevant. No shit as if they don’t know requirements change ALL THE FUCKING TIME AND THIS IS EXPECTED. I was also asked to send a slack message every morning when I start working, when I get my lunch, when I am back from lunch and when I finish work. Have to fill in some stupid weekly update system with what tickets I’ve worked on during the week, like have you heard of Jira filetrs ? Stop asking me how I am getting on if I’m fucking closing all my tickets every sprint. I don’t ask you questions, if I finish all the work you asked me to on time, you can safely assume I am doing fine. Also your fucking back to back meetings are not helping me close my tickets any faster. Already got an offer from another company I am out of fucking here.
YOU CAN ALL STICK YOUR PR COMMENTS, ENDLESS MEETINGS AND WHAT NOT UP YOUR FUCKING ARSES. 🖕🏻🖕🏻🖕🏻🖕🏻🖕🏻🖕🏻4 -
Here is another rather big example of how C++ is WAY slower than assembler (picture)
Sure - std::copy is convenient
but asm is just way faster.
This code should be compatible with EVERY x86_64 CPU.
I even do duffs device without having the loop:
the loop happens in the rep opcode which allows for prefetching (meaning that it doesnt destroy the prefetch queue and can even allow for preprocessing).
BTW: for those who commented on my comment porn last time: I made sure to satisfy your cravings ;-)
To those who can't make sense of my command line:
C++ 1m24s
ASM 19s
To those who tell me to call clang with -o<something>:
1) clang removes the call to copy on o3 or o2
2) the result isnt better in o1 (well... one second but that might be due to so many other things, and even if... one second isn't that much)25 -
I was checking out this wk139 rants & thinking to myself how does one have a dev enemy.. o.O Well TIL that maaaaybe I have one too..
Not sure if ex coworker was a bit 'weird & unskillful' or wanted to intentionally harm us and thank god failed miserably..
I decided to finally cleanup his workspace today: he had a bad habit of having almost all files in solution checked out to himself, most of them containing no changes whatsoever... I reminded him on many occasions that this is bad practice & to only have checked out files he was currently working on. And never checkin files without changes.. Ofc didn't listen.. managed to checkin over 100 files one time, most of which had no changes & some even had alerts for debugging in them.. which ofc made it to the client server.. :/
On one or two occasions I already logged in and wanted to check if files have any real changes that I'd actually want to keep, but gave up after 40 or so files in a batch that were either same or full of sh..
Anyhow today I decided I will discard everything, as the codebase changed a lot since he left an I know I already fixed a lot of his tasks.. I logged in, did the undo pending changes and then proceed to open source control explorer.
While I was cleaning up his workspace, I figured I could test what will happen if I request changeset xy and shelveset yy, will it be ok, or do I have to modify something else & merge code.. Figured using his workspace that was already set up for testing would be easier, faster & less 'stressful' than creating another one on my computer, change IIS settings and all just, to test this merge..
Boy was I wrong.. upon opening source control explorer, I was greeted by a lot of little red Xes staring back at me... more than half the folders on TFS were marked for deletion.. o.O
Now I'm not sure if he wanted to fuck me up when he left or was just 'stupid' when it comes to TFS. O.O
So...maybe I do have a dev enemy after all.. or I don't.. Can't decide.. all I know for sure is tomorrow I'm creating another workspace to test this and I'm not touching his computer ever again.. O.O -
Two years and a lot of money my company has been building a peice of software for a client, I spent the day yesterday talking and watching the client, our software doesn't even come close to matching their requirements. It barely matches the brief my boss wrote and *never showed me*.
The following isn't necessarily a lesson I've learnt, but rather solidified it very much: FOLLOW THE SODDING BRIEF AND ACTUALLY LISTEN TO THE CLIENTS.
Also don't hire low paid devs just because they're cheap because they WILL produce shocking, unmaintiable and unchangeable code.
I honestly think starting this again will be much faster.2 -
Me and the unofficial CTO (3rd party's CTO) are interviewing an ios dev. (I'm an android dev, btw)
CTO: In your view, would you find developing an ios app would be faster or at the same speed as an android dev?
Me: *shock*
Canidate: I've never developed on Android before, but I'd think it would be the same speed. We both need to make screens, views, and type code.6 -
I think that two criterias are important:
- don't block my productivity
- author should have his userbase in mind
1) Some simple anti examples:
- Windows popping up a big fat blue screen screaming for updates. Like... Go suck some donkey balls you stupid shit that's totally irritating you arsehole.
- Graphical tools having no UI concept. E.g. Adobes PDF reader - which was minimalized in it's UI and it became just unbearable pain. When the concept is to castrate the user in it's abilities and call the concept intuitive, it's not a concept it's shit. Other examples are e.g. GEdit - which was severely massacred in Gnome 3 if I remember correctly (never touched Gnome ever again. I was really put off because their concept just alienated me)
- Having an UI concept but no consistency. Eg. looking at a lot of large web apps, especially Atlassian software.
Too many times I had e.g. a simple HTML form. In menu 1 you could use enter. In menu 2 Enter does not work. in another menu Enter works, but it doesn't submit the form it instead submits the whole page... Which can end in clusterfuck.
Yaaayyyy.
- Keyboard usage not possible at all.
It becomes a sad majority.... Pressing tab, not switching between form fields. Looking for keyboard shortcuts, not finding any. Yes, it's a graphical interface. But the charm of 16 bit interfaces (YES. I'm praising DOS interfaces) was that once you memorized the necessary keyboard strokes... You were faster than lightning. Ever seen e.g. a good pharmacist, receptionist or warehouse clerk... most of the software is completely based on short keyboard strokes, eg. for a receptionist at a doctor for the ICD code / pharmaceutical search et cetera.
- don't poop rainbows. I mean it.
I love colors. When they make sense. but when I use some software, e.g. netdata, I think an epilepsy warning would be fair. Too. Many. Neon. Colors. -.-
2) It should be obvious... But it's become a burden.
E.g. when asked for a release as there were some fixes... Don't point to the install from master script. Maybe you like it rolling release style - but don't enforce it please. It's hard to use SHA256 hash as a version number and shortening the hash might be a bad idea.
Don't start experiments. If it works - don't throw everything over board without good reasons. E.g. my previous example of GEdit: Turning a valuable text editor into a minimalistic unusable piece of crap and calling it a genius idea for the sake of simplicity... Nope. You murdered a successful product.
Gnome 3 felt like a complete experiment and judging from the last years of changes in the news it was an rather unsuccessful one... As they gave up quite a few of their ideas.
When doing design stuff or other big changes make it a community event or at least put a poll up on the github page. Even If it's an small user base, listen to them instead of just randomly fucking them over.
--
One of my favorite projects is a texteditor called Kate from KDE.
It has a ton of features, could even be seen as a small IDE. The reason I love it because one of the original authors still cares for his creation and ... It never failed me. I use Kate since over 20 years now I think... Oo
Another example is the git cli. It's simple and yet powerful. git add -i is e.g. a thing I really really really love. (memorize the keyboard shortcuts and you'll chunk up large commits faster than flash.
Curl. Yes. The (http) download tool. It's author still cares. It's another tool I use since 20 years. And it has given me a deep insight of how HTTP worked, new protocols and again. It never failed me. It is such a fucking versatile thing. TLS debugging / performance measurements / what the frigging fuck is going on here. Take curl. Find it out.
My worst enemies....
Git based clients. I just hate them. Mostly because they fill the niche of explaining things (good) but completely nuke the learning of git (very bad). You can do any git action without understanding what you do and even worse... They encourage bad workflows.
I've seen great devs completely fucking up git and crying because they had really no fucking clue what git actually does. The UI lead them on the worst and darkest path imaginable. :(
Atlassian products. On the one hand... They're not total shit. But the mass of bugs and the complete lack of interest of Atlassian towards their customers and the cloud movement.... Ouch. Just ouch.
I had to deal with a lot of completely borked up instances and could trace it back to a bug tracking entry / atlassian, 2 - 3 years old with the comment: vote for this, we'll work on a Bugfix. Go fuck yourself you pisswads.
Microsoft Office / Windows. Oh boy.
I could fill entire days of monologues.
It's bad, hmkay?
XEN.
This is not bad.
This is more like kill it before it lays eggs.
The deeper I got into XEN, the more I wanted to lay in a bathtub full of acid to scrub of the feelings of shame... How could anyone call this good?!?????4 -
Sometimes, rewriting a project can be faster, more time efficient and better to read than trying to fix the single inefficiencies in parts of the code.
-
One of our customers asked us (a while back) to create a nice interface for their label printer (preferably integrated in their web cms)
So we started developing and after two weeks (we were almost done) they canceled the request, payed for the worked ours and said that another company was willing to do it faster (even though we were almost done)
So that was about half a year ago, meanwhile I've migrated to Ubuntu
Today I heard we have to do it again because the other 'faster' company wasn't faster, and didn't live up to the expectations
I do not have the code anymore... My colleagues also do not have the code anymore... It was removed to keep our coded clean, not sure if it's on git (the guy who workers on the part that's has a repo doesn't always commits...)
I've worked on on a standard node js script (which I didn't create a repo for because the project was canceled)
... Amazing4 -
Some people are really getting high on this Agile shit. Probably because they learned some new bullshit bingo phrases - and it suits them: lots of vapory talk and expensive meetings and others will have to do the work anyway, while they can circlejerk on how to have shorter iterations to improve the time to market, increase the business value, inspect and adapt to faster deliver a minimal viable product - yeah, do the agile transformation, update to the digital age, you noobs. Throwing around some catchy phrases will let you compete with Google? Maybe need some blockchain or machine learning?
While you are clustering your post its, the coders who keep the ship afloat, sit in their legacy code base that's so bitrot they are mainly doing bugfix releases without a single feature for three fucking years. Consider this.5 -
When I was in college OOP was emerging. A lot of the professors were against teaching it as the core. Some younger professors were adamant about it, and also Java fanatics. So after the bell rang, they'd sometimes teach people that wanted to learn it. I stayed after and the professor said that object oriented programming treated things like reality.
My first thought to this was hold up, modeling reality is hard and complicated, why would you want to add that to your programming that's utter madness.
Then he started with a ball example and how some balls in reality are blue, and they can have a bounce action we can express with a method.
My first thought was that this seems a very niche example. It has very little to do with any problems I have yet solved and I felt thinking about it this way would complicate my programs rather than make them simpler.
I looked around the at remnants of my classmates and saw several sitting forward, their eyes lit up and I felt like I was in a cult meeting where the head is trying to make everyone enamored of their personality. Except he wasn't selling himself, he was selling an idea.
I patiently waited it out, wanting there to be something of value in the after the bell lesson. Something I could use to better my own programming ability. It never came.
This same professor would tell us all to read and buy gang of four it would change our lives. It was an expensive hard cover book with a ribbon attached for a bookmark. It was made to look important. I didn't have much money in college but I gave it a shot I bought the book. I remember wrinkling my nose often, reading at it. Feeling like I was still being sold something. But where was the proof. It was all an argument from authority and I didn't think the argument was very good.
I left college thinking the whole thing was silly and would surely go away with time. And then it grew, and grew. It started to be impossible to avoid it. So I'd just use it when I had to and that became more and more often.
I began to doubt myself. Perhaps I was wrong, surely all these people using and loving this paradigm could not be wrong. I took on a 3 year project to dive deep into OOP later in my career. I was already intimately aware of OOP having to have done so much of it. But I caught up on all the latest ideas and practiced them for a the first year. I thought if OOP is so good I should be able to be more productive in years 2 and 3.
It was the most miserable I had ever been as a programmer. Everything took forever to do. There was boilerplate code everywhere. You didn't so much solve problems as stuff abstract ideas that had nothing to do with the problem everywhere and THEN code the actual part of the code that does a task. Even though I was working with an interpreted language they had added a need to compile, for dependency injection. What's next taking the benefit of dynamic typing and forcing typing into it? Oh I see they managed to do that too. At this point why not just use C or C++. It's going to do everything you wanted if you add compiling and typing and do it way faster at run time.
I talked to the client extensively about everything. We both agreed the project was untenable. We moved everything over another 3 years. His business is doing better than ever before now by several metrics. And I can be productive again. My self doubt was over. OOP is a complicated mess that drags down the software industry, little better than snake oil and full of empty promises. Unfortunately it is all some people know.
Now there is a functional movement, a data oriented movement, and things are looking a little brighter. However, no one seems to care for procedural. Functional and procedural are not that different. Functional just tries to put more constraints on the developer. Data oriented is also a lot more sensible, and again pretty close to procedural a lot of the time. It's just odd to me this need to separate from procedural at all. Procedural was very honest. If you're a bad programmer you make bad code. If you're a good programmer you make good code. It seems a lot of this was meant to enforce bad programmers to make good code. I'll tell you what I think though. I think that has never worked. It's just hidden it away in some abstraction and made identifying it harder. Much like the code methodologies themselves do to the code.
Now I'm left with a choice, keep my own business going to work on what I love, shift gears and do what I hate for more money, or pivot careers entirely. I decided after all this to go into data science because what you all are doing to the software industry sickens me. And that's my story. It's one that makes a lot of people defensive or even passive aggressive, to those people I say, try more things. At least then you can be less defensive about your opinion.53 -
When I wrote my first algorithm that learns...
So in order to on board our customers onto our software we have to link the product on their data base to the products on ours. This seems easy enough but when you actually start looking at their data you find it's a fuck up of duplication's, bad naming conventions and only 10% or so have distinct identifiers like a suppler code,model no or barcode. After a week or 2 they find they can't do it and ask for our help and we take over. On average it took 2 of our staff 1-2 weeks to complete the task manually searching one record of theirs against our db at a time. This was a big problem since we only had enough resources to on board 2-4 customers a month meaning slow growth.
I realized when looking at different customers databases that although the data was badly captured - it was consistently badly captured similar to how crap file names will usually contain the letters 'asd' because its typed with the left hand.
I then wrote an algorithm that fuzzy matched against our data and the past matches of other customers data creating a ranking algorithm similar to google page search. After auto matching the majority of results the top 10 ranked search results for each product on their db is shown to a human 1 at a time and they either click the the correct result or select "no match" and repeat until it is done at which point the algo will include the captured data in ranking future results.
It now takes a single staff member 1-2 hours to fully on board a customer with 10-15k products and will continue to get faster and adapt to changes in language and naming conventions. Making it learn wasn't really my intention at the time and more a side effect of what I was trying to achieve. Completely blew my mind. -
In only I were 1.15 times faster or had better planning (why didn’t I use the Saturday Sunday at the end of the first week 🤦🏼♂️), things would’ve happened differently. I think I’m becoming stupid and my tolerance levels are going down too.
So this happened a while back ..
I was given a code base which didn’t have any changes in the last two years and I was asked to add a feature to this. This was my first task in this new group I was part of. I had two weeks to do this starting on a Monday.
Partway through implementation I realised that the code base is a pile of shit and I wasn’t doing myself or anyone else any favours by shitting on it.
It’s Wednesday. I’ve dealt with many other codebases before but the urge to rewrite this particular one was just unlike anything else. And so I started changing code and before I realised, I modified almost all the important files.
I got sick of this mixed up code and started a rewrite from scratch. It was Friday and I finally had just the basic mechanics of the whole thing working. Now I needed to add all the functionalities and also my new feature.
It should be noted that at no point did I tell any of the superiors I was doing this fearing what they might say and also fearing going back to adding shit to shit.
By the end of the second week, the rewrite was complete and I only had the new feature to add. The rewrite was significantly smaller, compartmentalised and well commented because I did the bloody commenting (where it was not obvious from the code). So on Friday, I was asked about the progress and I told them that it needed some more work and that I need a couple more days. And I got shit for it. I was told it was a mistake giving this task to me and that I am not competent enough. One of the superiors told the other superior about perhaps giving me something more suited to my level. To be fair to them, they were expecting the work in the two weeks to be for the new feature.
And in two days’ time, on Monday (I worked on Saturday and half of Sunday), I finished the whole thing and gave it to them. New feature was working. And I still did not tell them what I did. The tool worked fine so they had no idea what happened because this project had no version control and I pointed them to a new directory with the new code with a first commit.3 -
FUCK OPENSSL. I LOVE IT AND HATE IT SO FUCKING MUCH. WORK FASTER AND BE LESS CONFUSING SO I CAN BRAG ABOUT MY PRETTY ENCRYPTION CODE SOONER. FUCK20
-
Of course I can code with vi. I can also cook by burning wood. It might taste better, but it doesn't cook faster.12
-
TL;DR:
JuniorDev ignores every advice, writes bad code and complains about other people not working because he does not see their result because he looks at the wrong places.
Okay, so I am really fed up right now.
We have this Junior Dev, who is now with us for circa 8 months, so ca. a year less than me. Our first job for both of us.
He is mostly doing stuff nobody in the team cares about because he is doing his own projects.
But now there's a project where we need to work with him. He got a small part and did implement that. Then parts of the main project got changed and he included stuff which was not there anymore. It was like this for weeks until someone needed to tell him to fix it.
His code is a huge mess (confirmed by senior dev and all the other people working at the project).
Another colleague and me mostly did (mostly) pair programming the past 1-2 weeks because we were fixing and improving (adding functionality) libraries which we are going to use in the project. Furthermore we discussed the overall structure and each of us built some proof-of-concept applications to check if some techniques would work like we planned it.
So in short: We did a lot of preparation to have the project cleaner and faster done in the next few weeks/months and to have our code base updated for the future. Plus there were a few things about technical problems which we need to solve which was already done in that time.
Side note: All of this was done not in the repository of the main project but of side projects, test projects and libraries.
Now it seems that this idiot complained at another coworker (in our team but another project) that we were sitting there for 2 weeks, just talking and that we made no progress in the project as we did not really commit much to the repository.
Side note: My colleague and me are talking in another language when working together and nobody else joins, as we have the same mother tongue, but we switch to the team language as soon as somebody joins, so that other colleague did not even know what we were talking about the whole day.
So, we are nearly the same level experience wise (the other colleague I work with has just one year more professional experience than me) and his work is confirmed to be a mess, ugly and totally bad structured, also not documented. Whereas our code is, at least most of it, there is always space for improvement, clean, readable and re-useable (confirmed by senior and other team members as well).
And this idiot who could implement his (far smaller part) so fast because he does not care about structure or any style convention, pattern or anything complains about us not doing our work.
I just hope, that after this project, I don't have to work with him again soon.
He is also one of those people who think that they know everything because he studied computer science (as everybody in the team, by the way). So he listens to nothing anybody explains to him, not even the senior. You have to explain everything multiple times (which is fine in general) and at some points he just says that he understood, although you can clearly see that he didn't really understand but just wants to go on coding his stuff.
So you explain him stuff and also explain why something does not work or is not a good thing, he just says "yes, okay", changes something completely different and moves on like he used to.
How do you cope with something like this?6 -
People don't seem to know how to properly do print-debugging, so here's a simple guide:
1. A log of "aaaaaa" or "got here" isn't as helpful as you think when ALL OF THEM ARE THE FUCKING SAME. You put a descriptive label or copy verbatim the conditional statement. This saves time matching statements, allows one to watch multiple branches at once, and allows others to understand and help faster when dragged in to help.
2. When trying to see where code fucks up, before each line, paste said line into a proper print statement for your language. If there's, say, a function call or some shit, have it output something like "functionCall(varA=<varA contents>,varB=<varB contents);" Most normal lines should be like this too, but it's especially helpful for calls and comparisons.
If need be, add return values after if they're not shown in another print statement later.
This allows for a trail of execution AND the line that fucks up will be the last in the log, making finding it easier when dealing with hangs and such.
3. Putting something unique like "DEBUG: " or something in front of all statements ensures you can just search for them to ensure you're not rolling one out to production. It also separates debug output from normal output at a glance, making digging through logs faster.16 -
A (work-)project i spent a year on will finally be released soon. That's the perfect opportunity to vent out all the rage i built up during dealing with what is the javascript version of a zodiac letter.
Everything went wrong with the beginning. 3 people were assigned to rewrite an old flash-application. Me, A and B. B suggested a javascript framework, even though me and A never worked with more than jquery. In the end we chose react/redux with rest on the server, a classic.
After some time i got the hang of time, around that time B left and a new guy, C, was hired soon after that. He didn't know about react/redux either. The perfect start off to a burning pile of smelly code.
Today this burning pile turned into a wasteland of code quality, a house of cards with a storm approaching, a rocket with leaks ready to launch, you get the idea.
We got 2 dozen files with 200-500 loc, each in the same directory and each with the same 2 word prefix which makes finding the right one a nightmare on its on. We have an i18n-library used only for ~10 textfields, copy-pasted code you never know if it's used or not, fetch-calls with no error-handling, and many other code smells that turn this fire into a garbage fire. An eternal fire. 3 months ago i reduced the linter-warnings on this project to 1, now i can't keep count anymore.
We use the reactabular-module which gives us headaches because IT DOESN'T DO WHAT IT'S SUPPOSED TO DO AND WE CANT USE IT WELL EITHER. All because the client cant be bothered to have the table header scroll along with the body. We have methods which do two things because passing another callback somehow crashed in the browser. And the only thing about indentation is that it exists. Copy pasting from websites, other files and indentation wars give the files the unique look that make you wonder if some of the devs hides his whitespace code in the files.
All of this is the result of missing time, results over quality and the worst approach of all, used by A: if A wants an ui-component similar to an existing one, he copies the original and edits he copy until it does what he wants. A knows about classes, modules, components, etc. Still, he can't bring himself to spend his time on creating superclasses... his approach gives results much faster
Things got worse when A tried redux, luckily A prefers the components local state. WHICH IS ANOTHER PROBLEM. He doesn't understand redux and loads all of the data directly from the server and puts it into the local state. The point of redux is that you don't have to do this. But there are only 1 or 2 examples of how this practice hurt us yet, so i'm gonna have to let this slide. IF HE AT LEAST WOULD UPDATE THE DATA PROPERLY. Changes are just sent to the server and then all of the data is re-fetched. I programmed the rest-endpoints to return the updated objects for a very reason. But no, fuck me.
I've heard A decided (A is the teamleader) to use less redux on the next project and use a dedicated rest-endpoints for every little comoutation you COULD DO WITH REDUX INSTEAD. My will is broken and just don't want to work with this anymore.
There are still various subpages that cant f5 because the components cant handle an empty redux state in the beginning, but to be honest i don't care anymore. Lets hope the client will never find out, along with the "on error nothing happens"-bugs. The product should've been shipped last week, but thanks to mandatory bugfixes the release was postponed to next week. Then the next project starts...
Please give me some tips to keep up code quality over time, i cant take this once more.
I'm also aware that i could've done more, talking A and C about code style, prettifying the code, etc. Etc. But i was busy putting out my out fires, i couldn't kill much of the other fires which in the end became a burning building (a perfect metaphor for this software)4 -
I was out sick the day an urgent ETL job I was building would be due, so it got reassigned. When I return, I find most of my code commented out and replaced.
The first step was rewritten, with a comment that reads "Made changes to run faster." What used to be a single execution lasting 30 seconds was now a 4 step process taking 5 minutes, and yielding identical results.
Being a one-time execution (not a recurring job), I'm left wondering why they thought execution speed was even an issue, let alone what about their redesign they felt was an improvement...2 -
First task as Python delevoper intern - fix non-essential for business app, written by an intern last year. Apparently that intern didn't even know what an object is. In Python, where everything, including functions, is an object.
I have to fix it piece by piece. It would be faster to throw old code and start from scratch.
Yet I'm glad they gave me this task. I feel like I'm learning a lot working with this shitty code. And they assigned a great person to help me should I have any questions/problems.
I could not be happier.1 -
We just learned in university that you should use '1 << i' instead of 'Math.pow(2, i)' because it is faster when calculating 2^i...
Am I the only one who thinks that this would never get through a code review in a company? I mean it is harder to realize what is going on especially when you didn't went to university lately.7 -
When your non-programmer boss thinks after explaining a program design to you, his sitting by you and staring at your screen will help you code it faster...
-
I need some advice here... This will be a long one, please bear with me.
First, some background:
I'm a senior level developer working in a company that primarily doesn't produce software like most fast paced companies. Lots of legacy code, old processes, etc. It's very slow and bureaucratic to say the least, and much of the management and lead engineering talent subscribes to the very old school way of managing projects (commit up front, fixed budget, deliver or else...), but they let us use agile to run our team, so long as we meet our commitments (!!). We are also largely populated by people who aren't really software engineers but who do software work, so being one myself I'm actually a fish out of water... Our lead engineer is one of these people who doesn't understand software engineering and is very types when it comes to managing a project.
That being said, we have this project we've been working for a while and we've been churning on it for the better part of two years - with multiple changes in mediocre contribution to development along the way (mainly due to development talent being hard to secure from other projects). The application hasn't really been given the chance to have its core architecture developed to be really robust and elegant, in favor of "just making things work" in order to satisfy fake deliverables to give the customer.
This has led us to have to settle for a rickety architecture and sloppy technical debt that we can't take the time to properly fix because it doesn't (in the mind of the lead engineer - who isn't a software engineer mind you) deliver visible value. He's constantly changing his mind on what he wants to see working and functional, he zones out during sprint planning, tries to work stories not on the sprint backlog on the side, and doesn't let our product owner do her job. He's holding us to commitments we made in January and he's not listening when the team says we don't think we can deliver on what's left by the end of the year. He thinks it's reasonable to expect us to deliver and he's brushing us off.
We have a functional product now, but it's not very useful yet and still has some usability issues. It's still missing features, which we're being put under pressure to get implemented (even half-assed) by the end of the year.
TL;DR
Should I stand up for what I know is the right way to write software and push for something more stable sometime next year or settle for a "patch job" that we *might* deliver that will most definitely be buggy and be harder to maintain going forward? I feel like I'm fighting an uphill battle in trying to write good quality code in lieu of faster results and I just can't get behind settling for crap just because.9 -
Unpopular opinion: unit tests are often overrated.
Although a well written test suite is almost essential in some parts of the application (I.E. business logic) I cringe when I see hundreds or thousands of line which “mocks” everything to test a micro service which just does CRUD operations on a database, in cases like that unit tests are just a waste of time because almost every operation involves a mock which may not behave like the real database and often needs to be rewritten when the code undergoes a huge refactoring. In these case a integration test suite is faster to write and way more helpful.9 -
It took me way too long to understood what I wrote few weeks ago. After looking at the code for few minutes and looking at my db structure, I finally realized. I also instantly remembered that I wrote that "user is shown as ad" comment hoping I will not confuse myself in future. Apparently I failed.
Temporarily added next line of comment to help the future me.
Deep down I know that I should change function name itself to become clearer, more meaningful and easier to understand.
But writing that comment, making those screenshots, combining the 2 images in Pinta and writing this rant is faster than thinking the new name.3 -
After a lot of work I figured out how to build the graph component of my LLM. Figured out the basic architecture, how to connect it in, and how to train it. The design and how-to is 100%.
Ironically generating the embeddings is slower than I expect the training itself to take.
A few extensions of the design will also allow bootstrapped and transfer learning, and as a reach, unsupervised learning but I still need to work out the fine details on that.
Right now because of the design of the embeddings (different from standard transformers in a key aspect), they're slow. Like 10 tokens per minute on an i5 (python, no multithreading, no optimization at all, no training on gpu). I've came up with a modification that takes the token embeddings and turns them into hash keys, which should be significantly faster for a variety of reasons. Essentially I generate a tree of all weights, where the parent nodes are the mean of their immediate child nodes, split the tree on lesser-than-greater-than values, and then convert the node values to keys in a hashmap to make lookup very fast.
Weight comparison can be done either directly through tree traversal, or using normalized hamming distance between parent/child weight keys and the lookup weight.
That last bit is designed already and just needs implemented but it is completely doable.
The design itself is 100% attention free incidentally.
I'm outlining the step by step, only the essentials to train a word boundary detector, noun detector, verb detector, as I already considered prior. But now I'm actually able to implement it.
The hard part was figuring out the *graph* part of the model, not the NN part (if you could even call it an NN, which it doesn't fit the definition of, but I don't know what else to call it). Determining what the design would look like, the necessary graph token types, what function they should have, *how* they use the context, how thats calculated, how loss is to be calculated, and how to train it.
I'm happy to report all that is now settled.
I'm hoping to get more work done on it on my day off, but thats seven days away, 9-10 hour shifts, working fucking BurgerKing and all I want to do is program.
And all because no one takes me seriously due to not having a degree.
Fucking aye. What is life.
If I had a laptop and insurance and taxes weren't a thing, I'd go live in my car and code in a fucking mcdonalds or a park all day and not have to give a shit about any of these other externalities like earning minimum wage to pay 25% of it in rent a month and 20% in taxes and other government bullshit.4 -
Does anyone practise code reading and comprehension? If so, are you able to share your idea?
I try to find how to read code faster with retention and comprehension. It is much like speed reading, but I am reading code.
Here is my journey so far:
Stage 1:
When reading code, I literally each word in line as comment. I though it will help me to understand better. It did, but the retention was not strong enough.
Stage 2:
After reading each line, I will close my eyes for 1-2 seconds and do a reflection what I just read. Better understanding, but comprehension still not good.
Stage 3:
After reading each line, I use my own words to describe what it does and write down as comment. I found that I have better comprehension
Stage 4:
Constantly, remind myself to describe with my own words. this speeds up the reading and understanding.
To be honest, I am still trying.6 -
Now my client does not want to rely on Amazon S3 because of the One Outage that it ever had a couple what weeks ago I forgot already. So my dumbass blurts out well we could always just back up to some other image or file storing website. But now I'm expected to implement this right away when I really haven't thought about it at all I mean I would have to write some sort of failover and some sort of daily or syncing mechanism. I guess I should forget about any direct upload to S3 code that I have written. Really I guess I have to wrap all of the image and file handling stuff with my own solution. Which actually that will be very nice when it is done and I could use this on other projects but it's quite a lot of work for something that I don't feel we really need at this stage in development. Just because you're using stuff on production that has am enormous red TEST label in the way of the ui doesn't mean i can code bullet proof software any faster4
-
Coding faster is more important than code quality? GitHub shows a call to action: "Code 55% faster with GitHub Copilot". WTF?14
-
Is your code green?
I've been thinking a lot about this for the past year. There was recently an article on this on slashdot.
I like optimising things to a reasonable degree and avoid bloat. What are some signs of code that isn't green?
* Use of technology that says its fast without real expert review and measurement. Lots of tech out their claims to be fast but actually isn't or is doing so by saturation resources while being inefficient.
* It uses caching. Many might find that counter intuitive. In technology it is surprisingly common to see people scale or cache rather than directly fixing the thing that's watt expensive which is compounded when the cache has weak coverage.
* It uses scaling. Originally scaling was a last resort. The reason is simple, it introduces excessive complexity. Today it's common to see people scale things rather than make them efficient. You end up needing ten instances when a bit of skill could bring you down to one which could scale as well but likely wont need to.
* It uses a non-trivial framework. Frameworks are rarely fast. Most will fall in the range of ten to a thousand times slower in terms of CPU usage. Memory bloat may also force the need for more instances. Frameworks written on already slow high level languages may be especially bad.
* Lacks optimisations for obvious bottlenecks.
* It runs slowly.
* It lacks even basic resource usage measurement.
Unfortunately smells are not enough on their own but are a start. Real measurement and expert review is always the only way to get an idea of if your code is reasonably green.
I find it not uncommon to see things require tens to hundreds to thousands of resources than needed if not more.
In terms of cycles that can be the difference between needing a single core and a thousand cores.
This is common in the industry but it's not because people didn't write everything in assembly. It's usually leaning toward the extreme opposite.
Optimisations are often easy and don't require writing code in binary. In fact the resulting code is often simpler. Excess complexity and inefficient code tend to go hand in hand. Sometimes a code cleaning service is all you need to enhance your green.
I once rewrote a data parsing library that had to parse a hundred MB and was a performance hotspot into C from an interpreted language. I measured it and the results were good. It had been optimised as much as possible in the interpreted version but way still 50 times faster minimum in C.
I recently stumbled upon someone's attempt to do the same and I was able to optimise the interpreted version in five minutes to be twice as fast as the C++ version.
I see opportunity to optimise everywhere in software. A billion KG CO2 could be saved easy if a few green code shops popped up. It's also often a net win. Faster software, lower costs, lower management burden... I'm thinking of starting a consultancy.
The problem is after witnessing the likes of Greta Thunberg then if that's what the next generation has in store then as far as I'm concerned the world can fucking burn and her generation along with it.6 -
I literally dont use any other code editor other than intellij. Yes not even your fucking vscode. I code frontend in intellij! I code angular and nextjs in intellij!! Intellij literally has everything anything else has plus way more. Intellisense is also much better. Theres also been a major update yesterday and everything is so much faster and smarter. And theme is way better looking. I will dick ride intellij till death do us apart!!!!19
-
So I had been debugging this code for the past 2.5 days without much sleep and couldn't figure out why it wouldn't work.. Turns out I was passing the wrong variable to a method -_-
On the bright side, while debugging I was able to optimise the code and now it runs waaay faster 😎
Now, time to go into hibernation 😴1 -
Here's an excerpt from GitHub's mission statement -
"Code is about the people writing it. The tools we create help individuals and companies, public and private, to write better code, faster."
And yet, is there anyone else who goes - "What a load of crap! You came up with Atom and Teletype, but couldn't make your Search feature even a tad less annoying?!"
Only me?
.
.
I'll see myself out. -
We were a small startup with only 5-6 developers. I had to design the UI and develop most of the Android frontend, It was quite an easy and fun job for me because I don't get to see people rant about the design that needed to be implemented so, usually I design something that can be easily implemented.
We got 2 projects with a tight deadline and I took care of both project's design part and after completing the design I took the entire frontend of one project and rest of em started working with the other one. Usually we were a strong team and was able to deliver things real quick because we were expert in our intrested fields, I had a fast start in my project where the other project lagged a lot because of the desifn which was hard to implement by them, and the frontend was bo where near to get completed by the deadline and I couldn't help them out because it was all messed up shit handling both projects together.
Finally we were in a situation where none of our project are ready and the deadline was about to hit within a week, so we halted the other project and asked them to join me to complete the project am Working on, I had built most of the Android part and these fellows had a hard time figuring out stuff I made up (yeah, documentation was shit while you go agile), and finally things messed up and I had to work 2 continuous day and night without any sleep just to get the app ready 10 minutes before the official proto presentation.
The best part is I couldn't even get up from my chair and had a headache, fainted instantly when I took a few steps, but the product launch went good.
We fucked uo the code and both the projects just because we weren't available for each other considering the size of the team. Anyway we completed the project but It was a huge failure for us being first time to manage a startup.
Learned a lot of lessons,
Always make a team with people who are good at each of the aspect of development and never divide it to get shit done faster. -
I’m fucking lost.
So, situation. I have a SQL table with about 3M rows (not a lot).
I have indexes. Indexes are used. BUT when I add where clause (On indexed column), it’s super slow. Around 10 seconds.
If I do select * (ALL 3M rows) and THEN I filter then on webserver side, it takes 0.5 seconds.
HOW my manual filtering is faster than DB filtering with indexes? I even tried bubble sort. Bubble sort is faster than SQL ‘where’. HOW ?!
I do not understand….
And if I add group by….. WELL, 25 seconds SQL time. 2 Seconds if I do select all and group by in code manually.
Does not make ANY sense to me.
What am I missing ?21 -
Writing x86 assembly code in VS Code feels so weird. I mean, I'm using something that's built using crazily high level languages (JS, HTML, CSS), on top of a mammoth runtime environment (Node, V8), which is itself sitting on a modern and sophisticated operating system (Antergos), and I'm writing code that shifts bits and bytes around in memory in order to get one part of my C program to run just a little faster. Wow.1
-
So true ...
"Many developers on a schedule aren't making efforts to write clean and efficient code, relying on idiot-proof languages (and consequently more RAM and faster processors) to make up for their malaise."2 -
I technically joined just after this guy left(fired) but the stories are to good to tell!
The guy was clearly off but It wasn't his fault he had to of had aspergers
He would demand! To write with two pens in one hand he said it was faster and the only way he could write neatly... (Nope)
I don't think it was to weird but he would put on music and play death metal stuff full volume, because he couldn't hear anyone the team used to make paper planes and fire them at him when they wanted his attention.
Another thing he was into furry ... Stuff but was super open about it had. Wolf's and shit like that on his desk and always had a wolf shirt.
But he was fired, he wasn't great at his job.
I came in to help sort out the mess it was the government's setup for servers and nurses and doctors computers for the NHS over in england.
He effectively skull fucked the entire system.
He magically (I to do day can not understand how) did forced updates and installed to a newer version of Windows servers the problem being the programs wouldn't work on newer windows at the time.
Most were on XP at the time and they used windows servers back then.
Luckily not nation wide just in my local area but still thousands of computers affected.
The issue became this ... You see they had this program on their computers that let them get patient documents and update etc
He removed code or added code that made it update all the laptops and desktops to a new service pack which they didn't want... Then he upgraded the servers to a new windows version I don't remember the specifics
But the updates and new version of Windows made it so the laptops etc couldn't communicate with the servers.
... The next day he got fired and I was brought in for a few weeks to help sort out the mess.
But apparently he was a super interesting guy but with way to many quirks.
It costs the tax payers a fortune! Literally a few million to sort his mistake out people were working round the clock for two weeks straight.3 -
As a .NET dev I get questioned about using VS Code in favor of full-blown VS. My arguments are that it is faster, lightweight and overall more user-friendly.
I use it exclusively, for all types of files and projects (JSON, SQL, Angular projects, .NET Core, ...)
Do you guys like using VS Code as well? What do you use it for?
Also, if you ever want to annoy a colleague, try associating all file extensions with Visual Studio and watch him go bonkers.7 -
You wrote a little simple and clean mvc framework to work faster on some new projects. It can "compile" tags as {% var %} or {% array.key %} in the html code with support of {% for arrayOfHash in hash %} foreach construct and nice features, it can call api's callback in a smart way as ghost methods of a class, he can make routes with the route provider. You tested it and made a little example, after you went in the bathroom you read the index code and you started staring at the beauty and elegance of it. You go to bed happy and sleep. The day after you wake up and realize that it's unuseful because there's a lot of mvc framework that surely are better and ready to use, so you lost useful time. Have you ever feel this way? MVC: Me Versus Creativity.5
-
Seriously, at what point did the good, kind, selfless souls who write tutorials and guides online turn into fucking food bloggers?
I've been an engineer about 15 years, so I still have to google most of the code I write as I write it, and this week I've been learning a new framework.
Ten years ago it'd be "here's how to..." then the thing you want to do.
Now it's "For the longest time, I didn't want to use Gradle..." followed by a summary of the last week in their life.
I really don't care about your Journey with Rust, I want to know how to define an optional parameter. I don't give a rat's fucking dick how much faster this is than that, my hands are tied by whoever started this mess - just tell me how to make it work.
I guess there's something to be said for remembering things between sessions.4 -
Ok here goes me trying to explain some logic here, I apologise in advance!
I've been using an axis based movement system for my games for a while now but always had the issue of characters moving faster diagonally because the movement shape would form a square; meaning things would move at twice the speed.
Only now thought 'hang on, direction's act as circles when given a radius..'
Suddenly everything works perfectly fine and all it took was 3 lines of code... Well done Alex you tool.18 -
I was telling someone who never indents any of his code to indent it properly.. He was like "Why should I do that? Will it make my code run faster?"4
-
So I had this client who wanted me to develop a brand new website for his company. When I asked him about the money he'd pay me, he said he'll pay me whatever it takes.
So I started coding JavaScript day-in-day-out, trying to show him different designs. He saw them and was pretty impressed by the progress. Then he fucking asked me to code sitting in his office so that it gets finished faster. I even do that!!
After 3 months of grinding, I asked him for my payment. That fucker stopped returning my calls and emails. He didn't even use my website. Then a month later I found that that fucker had called in a cheaper web developer and got his website designed JUST LIKE MINE!!!
I fucking hate freelancing!!2 -
A post today made me think about this interview I had about a year ago... I shall tell you all about it.
Went to a hiring event for this company everyone was cool but this one guy (who would have been my boss) was a total arrogant, douchey, know it all.
So anyways cue interviewing with him a week later. He says if I give you task A, B, C and they need to be done by the end of the week in which order do you do them. (Note: he literally said abc not actual tasks)
Me: I don't really know how to answer that question without more information.
Him: Well I like to see how people answer it... So think about it for a second.
Me: Ok I guess if doing one task would help me do the next task faster I would do it in that order. Like I can use code or concepts from C to do B faster.
Him: What if A would take 2 days and B and C would take 1 day.
Me: I don't see how that would influence the order I do them in.
Him: Would you complete one task after another or switch between them or do see simultaneously.
Me: It would depend on my previous answer and what would be the fastest way to get them done but without more info I literally cannot give you an answer of like I would do B, C, A.
Him: Would you do the longest task first or the shorter tasks.
Me: I don't know I guess it depends on if it would help you or somebody else move forward with something if I got a particular task or the shorter tasks done first.
So cue more of this kind of back and forth about arbitrary details about undefined theoretical tasks for like 10 minutes.
Suffice is to say I didn't get the job and I'm glad.7 -
Apart from linux, it has to be vue.js, quasar and express.js
Vue.js had made my development extremely easy, faster and managable
Quasar brought great Styling and various other powerful features to vuejs. Thus helping save even more time
And express.js don't need any explanation. Better code organization and easy to get started. -
Not really a rant (?)
I started my first programming job in January this year. I went there staight after Highschool, so i had no real experience, knew only the basics of software development and my written code was quite a mess. So one of my first real tasks (after 2 months) was to write a business logic for batch handling (for a warehouse management system). I invested quite some time to develop a suitable architecture, talked with some other developers and wanted to cover the whole thing with unit tests (which really nobody at the company uses). So I spent about 3 weeks to write the whole thing, test it and improve it many times. It worked perfectly and I got pretty good feedback from the code-review.
1 month ago - the code worked perfectly and was multiple times testet (also by the client) - the client came with some totally new requirements for the batch handling. I tried to impelemt them, but soon found out, that the architecture doesn't supported them, it was not build for the required handling and would soon become a totally mess, if i tried to make it work.
So I was pretty mad, because I had to change the whole fucking thing, but I also wanted to make it better. I hab gained some experience and decided (with some help of a senior dev) to make a completely new try with a different architecture, that can be easily expanded, if needed. I build my concept, wrote and tested the whole new code in 3 days. Fucking 3 days compared to the initial 3 weeks, and it worked, better and even faster.
I was quite pissed to delete the old code, and especially that i had wasted 3 weeks for it and had to struggle with many different things. But I lerarned so much from it and also in the months between, that I was also really glad that I had the opportiunity to write it again.
This whole thing made me now realize that this is, what I really like to do and what I'm good in. I really enjoy learning new things and for me, programming is the best and easiest way to do it. Despite alle the cons and annoying side effects of it, I really found my dream job here.1 -
Sooooo ok ok. Started my graduate program in August and thus far I have been having to handle it with working as a manager, missing 2 staff member positions at work, as well as dealing with other personal items in my life. It has been exhausting beyond belief and I would not really recommend it for people working full time always on call jobs with a family, like at a..
But one thing that keeps my hopes up is the amount of great knowledge that the professors pass to us through their lectures. Sometimes I would get upset at how highly theoretical the items are, I was expecting to see tons of code in one of the major languages used in A.I(my graduate program has a focus in AI, that is my concentration) and was really disappointed at not seeing more code really. But getting the high level overview of the concepts has been really helpful in forcing me to do extra research in order to reconnect with some of the items that I had never thought of before.
If you follow, for example, different articles or online tutorials representing doing something simple like generating a simple neural network, it sometimes escapes our mind how some of the internal concepts of the activity in question are generated, how and why and the mathematical notions that led researchers reach the conclusions they did. As developers, we are sometimes used to just not caring about how sometimes a thing would work, just as long as it works "we will get back to this later" is a common thing in most tutorials, such as when I started with Java "don't worry about what public static main means, just write it up for now, oh and don't worry about what System.out.println() is, just know that its used to output something into bla bla bla" <---- shit like that is too common and it does not escape ML tutorials.
Its hard man, to focus on understanding the inner details of such a massive field all the time, but truly worth it. And if you do find yourself considering the need for higher education or not, well its more of a personal choice really. There are some very talented people that learn a lot on their own, but having the proper guidance of a body of highly trained industry professionals is always nice, my professors take the time to deal with the students on such a personal level that concepts get acquired faster, everyone in class is an engineer with years of experience, thus having people talk to us at that level is much appreciated and accelerates the process of being educated.
Basically what I am trying to say is that being exposed to different methodologies and theoretical concepts helps a lot for building intuition, specially when you literally have no other option but to git gud. And school is what you make of it, but certainly never a waste.2 -
1) Never be afraid to ask questions.
There are so many instances of situations where assumptions have been made that shouldn’t have been made, resulting in an oversight that could have been rectified earlier in a process and wasn’t.
Just because no one’s asking a question doesn’t mean you’re the only person who has it.
That being said, it’s really important to figure out how to ask questions. Provide enough context so that the audience for your question understands what you’re really asking. If you’re trying to troubleshoot a problem, list out the steps you’ve already tested and what those outcomes were.
2) When you’ve learned something, try to write about it. Try to break it down as though you were explaining it to a child. It’s through breaking down a concept into its most simple terms that you really know that you understand it.
3) Don’t feel like you have to code *all of the time*. Just because this is what you’re doing for a living doesn’t mean that you have to make it your life. Burnout is real, and it happens a lot faster if it’s all you do.
4) Find hobbies outside of tech!
5) Network. There are a number of great communities. I volunteer for and am a member of Virtual Coffee, and can vouch for that community being particularly friendly and approachable.
6) Don’t let a company pay you less than industry standard and convince you that they’re doing you the favor of employing you.
7) Negotiate salary. Always.
8) If you’re a career transitioner, don’t be afraid to talk about your previous work and how it gave you experience that you can use in programming. There’s a whole lot of jobs that require time management, multi-tasking, critical thinking, etc. Those skills are relevant no matter where you got them.
9) If it takes a while for you to get a gig, it’s not necessarily a reflection on you or your abilities.
10) Despite what some people would say, coding’s not for everyone. Don’t feel like you have to continue down a road just because you started walking down it. Life’s not a straight path. -
Holly shit, they will never understand....
If you come to dev, minding his buissness, writing some code, beeing focused, with headphones on, etc. You absolutely destroy his cache of things in mind, you stay next to him gazing at his screen and throwing away madly words that you need some data extracted from database NOW and you will stay standing next to him gazing when he quickly types few lines of ultra-wide screen of SQL querry with all the fucking joins and shit you wanted with exac aliases you understand and makes one typo but query executes and spits out some data. He didn't notice that something is wrong with it becouse he didn't memorize database's data, and he sends it to you.
Now you are coming back to him pissed and in general fighting mood becouse he did one fucking typo when you was actively pressurizing him to make fucking query faster while you absolutely destroyed his flow of work (in meaning he now needs to dive back into code, figure out why he was editing given file and what was idea for further structure)
Now you are standing again next to him and absolutely pissing him off that he fucked up and made one fucking typpo that unfortnately database didn't say "nope" but it instead spit out wrong data.
If you can relate to "you" stated above, sincerly fuck you.
If you can relate to "he" stated above, I feel ya man, its fucking annoying, isn't it?1 -
So a little bit explanation to my last fuck rant
I was trying to make a cuda code faster, specifically eigen value decomposition for 12 by 12 matrices. For a week a made a fast and accurate version and a faster but less accurate version, both are faster than cuda. Then I was thinking about how to make the faster version more accurate.
Then we had this idea of using power iterations. And honestly I hoped it won’t work. But then, fuck me it worked, which means I had more work to do.
But hey, at least now I’m way faster than cuda on this18 -
This always gets me:
Developers complaining that their 4 year old / cheap ass computer is slow.
Get. A. New. One.
It's not that hard.
Here, let me do one for you:
https://computeruniverse.net/en/...
I just went to a site that delivers across Europe, and selected a cheap laptop with a decent CPU and SSD. Short on RAM, sure, and without a Windows License. But you can buy RAM for an additional 50$, and that brings you to a total of 550€, delivery included. And it will WORK. And it will be fast.
It's too expensive?
No, not exactly. Wherever you are in the world, if you can code decently, good enough to have the right to complain about development tools, you are eligible to at least 10$ per hour income as a freelancer across the globe. I've had such opportunities offered to me by many organizations, especially non-profit ones that need cheap employees. I actually was offered more but let's stick to 10$ per hour.
So that's 1600$ per month. Enough to buy 3 such laptops. Oh, taxes, I forgot. So you get 2 laptops. Wait! You need food and everything else. Well if you're in a country where that offer actually makes sense, then it's likely that you can live off of 400$ per month quite well. Maybe 800$ if you need to pay rent.
So that's roughly 1 month of work for a laptop that will make you not waste time on waiting for stuff.
Sweet! 1 Month! What does it get me?
Well assuming that you have no laptop, it gets you A JOB that pays you 1600$ per month.
But if you DO have a laptop, you can sell it for cheap, and benefit from the following:
1. Boot-up time from 30-60 seconds to 10 seconds.
2. Installing software - from 1 minute to 10 seconds.
3. Opening a browser - from 10 seconds to 1 second.
4. Opening an advanced text editor (Atom, VS.Code) - from 10 seconds to 1 second.
5. Searching for a file on your entire hard drive - from 1 hour to 2 minutes.
....
You get the point. Waiting is reduced by several times.
So how much do you really wait when coding?
Well are you compiling? Are you opening a new project and the IDE needs to re-index the files? Are you opening programs like a terminal emulator, browser and such? Are you using virtual machines for dev environments?
Well all of these processes become several times faster. Depending on how often you do it, you'll be saving yourself from 1 hour per day to upto 4 hours per day (my case, where a HDD would be just out of the question).
How much is that time worth? At least 10$ per day. If you're working for 20 days per month, 240 days per year, that's a total of 2400$. And for the life time of that crappy laptop of 2 years, that's 4800$ saved. And that's with hugely conservative numbers. Nobody pays 10$ per hour any more, except if you've just started in the industry. I know because I've been there.
Please, for all that's sacred to you, justify right here, right now, HOW THE FUCK can you not afford to get that 8GB of RAM, that cheap ass SSD for 100$, or even a brand new laptop (hey! it's even portable and has FHD graphics on it!) for 550$.
That's why every time I hear someone who is a professional developer complain that they don't have money for a decent machine, I have to ask: why the fuck are you wasting yours and everyone else's time?!10 -
One of our projects migrated their file-repository to another one during a major release.
Instead of giving this task to an experienced programmer, they gave it to the head of the respective dev department due to the usual release panic.
Soo.... He wrote the migration tool. It was executed during the release. Everything seemed fine so far.
A few days later. Someone from the above project came to my team due to some "strange behaviour on the production database".
They reported that they couldn't download some of the user's documents due to unknown reasons.
After quickly analyzing the current state of the new file-repository, we concluded that the affected documents did not exist in the new repository.
Then we took a look at the so called migration tool...
Well.. After nearly 30 min. we knew the root cause for that.
They only migrated the first 4 levels of the folder structure. Due to the assumption that "we don't use deeper nesting". (Facepalm)
As the head of their department wrote it, no one seems to questioned it either. Nor did they made a code review and ended up with a tool with hard coded urls to the production db, no version control, no build tool, no ci, nothing. Breaking nearly every possible company standard.
However.. That's not it. When analyzing their migration tool we noticed another even more dangerous thing.
They mixed up the id generation of the migrated documents resulting in a random assignment between customers and documents. Which is quite bad as this contains sensitive information. E.g. passports
They offered us quite a nice amount of money to fix this until EOB. We declinded as it was simply not possible in that time, but agreed to support them with the new tool.
After some time I heard that they migrated production again. And they fucked it up again. They never talked to us after we offered them support...
The third and final migration was written by us. Not only migrated it correctly. It was also way faster. By factor 20.
In the end we haven't gained anything from this rushed project as the penalties were piling up due to this fucked up migration.
After all this time I'm not sure who is to blame. In my opinion, partly all of them.
Head of department who can't and shouldn't code.
Seniors who didn't review the code and didn't ask for help.
Release mgmt who put way too much pressure on the devs. -
That time when I wowed all my colleagues with C++-code that executed over 2.5x faster than theirs, without changing one line of code.
I guess they didn't know what -O2 does (or that it exists, for that matter).7 -
Any other Screeps players here?
for the people running into a "Screeps is not defined":
Screeps is a MMO RTS where you code your "army" to do stuff in Javascript (a la NodeJS).
Code how your harvesters should behave, how your soldiers should behave, how your builders should behave etc. etc.
So far, it is quite a fun game, tho my (Intel Nehalem based) laptop has issues handling it (thanks to a awfully slow GPU...) so it's difficult to play for me at the moment (I'm on holiday, my home PC is a LOT faster).
It costs about 15 euro on steam, and if you're into this stuff, it's well worth it.
Just make sure you finish the tutorial first... I didn't and I regretted it when I bought the game (it's a huge pain in the buttocks to get started if you don't understand the API and such).
Currently just playing on my own localhosted private server to discover how the game works and such, but will be setting up a public server later down the road to play with others.
Tho it would be nice if Screeps would allow for "team-based" gameplay as well so it'll be slightly harder for early players to bully the newer ones.2 -
CTO/CEO (previous place) - we're not production engineers, so we're going to fork your code base and move way faster than all of you and then you can maintain it. Doesn't that sound inspiring?
25% of the company: ha... Here's our 2 week notice.2 -
Working on codebase of a 20+ year old system that the company I work for bought five years ago and in that time there’s been no refactoring, no security updates, no attempt to create automated testing (there is none), new features have just been built on the codebase with no regard for quality and it’s just spun into the horror cesspool that it is today.
I joined one year ago and I’m slowly refactoring the codebase and updating it to get it to a more modern codebase, cleaner code, faster load times and creating a ton of dev documentation so the devs in India can start getting into best practices and start producing quality code.4 -
The most interesting answers come from the interview question "what IDE do you use?"
"No, Notepad++ is not an IDE."
I once even had a script kiddy who didn't use an IDE because "I code faster in notepad than in an IDE"
sigh...13 -
Here comes lots of random pieces of advice...
Ain't no shortcuts.
Be prepared, becoming a good programmer (there are lots of shitty programmers, not so many good ones) takes lots of pain, frustration, and failure. It's going to suck for awhile. There will be false starts. At some point you will question whether you are cut out for it or not. Embrace the struggle -- if you aren't failing, you aren't learning.
Remember that in 2021 being a programmer is just as much (maybe even moreso) about picking up new things on the fly as it is about your crystalized knowledge. I don't want someone who has all the core features of some language memorized, I want someone who can learn new things quickly. Everything is open book all the time. I have to look up pretty basic stuff all the time, it's just that it takes me like twelve seconds to look it up and digest it.
Build, build, build, build, build. At least while you are learning, you should always be working on a project. Don't worry about how big the project is, small is fine.
Remember that programming is a tool, not the end goal in and of itself. Nobody gives a shit how good a carpenter is at using some specialized saw, they care about what the carpenter can build with that specialized saw.
Plan your build. This is a VERY important part of the process that newer devs/programmers like to skip. You are always free to change the plan, but you should have a plan going on. Don't store your plan in your head. If you plan exists only in your head you are doing it wrong. Write that shit down! If you create a solid development process, the cognitive overhead for any project goes way down.
Don't fall into the trap of comparing yourself to others, especially to the experts you are learning from. They are good because they have done the thing that you are struggling with at least a thousand times.
Don't fall into the trap of comparing yourself today to yourself yesterday. This will make it seem like you haven't learned anything and aren't on the move. Compare yourself to yourself last week, last month, last year.
Have experienced programmers review your code. Don't be afraid to ask, most of us really really enjoy this (if it makes you feel any better about the "inconvenience", it will take a mid-level waaaaay less time to review your code that it took for you to write it, and a senior dev even less time than that). You will hate it, it will suck having someone seem like they are just ripping your code apart, but it will make you so much better so much faster than just relying on your own internal knowledge.
When you start to be able to put the pieces together, stay humble. I've seen countless devs with a year of experience start to get a big head and talk like they know shit. Don't keep your mouth closed, but as a newer dev if you are talking noise instead of asking questions there is no way I will think you are ready to have the Jr./Associate/Whatever removed from your title.
Don't ever. Ever. Ever. Criticize someone else's preferred tools. Tooling is so far down the list of what makes a good programmer. This is another thing newer devs have a tendency to do, thinking that their tool chain is the only way to do it. Definitely recommend to people alternatives to check out. A senior dev using Notepad++, a terminal window, and a compiler from 1977 is probably better than you are with the newest shiniest IDE.
Don't be a dick about terminology/vocabulary. Different words mean different things to different people in different organizations. If what you call GNU/Linux somebody else just calls Linux, let it go man! You understand what they mean, and if you don't it's your job to figure out what they mean, not tell them the right way to say it.
One analogy I like to make is that becoming a programmer is a lot like becoming a chef. You don't become a chef by following recipes (i.e. just following tutorials and walk-throughs). You become a chef by learning about different ingredients, learning about different cooking techniques, learning about different styles of cuisine, and (this is the important part), learning how to put together ingredients, techniques, and cuisines in ways that no one has ever showed you about before. -
I'm a developer, member of the A-Team. Actually I'm the leader of the A-Team.
We are incredibly skilled. Our problem solving capabilities is amazing, almost 100 times more effective than the rest of people. We produce code 10 times faster and better than anybody else. We have THE knowledge.
We can save the company in case of emergency.
For that reason, it's of paramount importance to nurture and protect the A-Team.
- When there is a bug, A-Team will not correct it. Because, if A-Team is busy, and bad shit happens, the company could be destroyed and we couldn't help
- When there is some important features to develop with a deadline, A-Team will not participate: A-Team must stay alert and ready in case of emergency
- If huge catastrophe happens and long hours, night and weekend are needed to fix it, A-Team will not risk burning the A-Team because it's the only high skilled team we have. The company cannot afford to have an A-Team member exhausted, underpaid, unhappy leaving or sleepy. Therefore, the company will sacrifice other less important people.
A-Team is company biggest asset and must be protected in any kind of situations.
The company should also pay training for them in order to increase their skills and make them unreplaceable.
These are my conditions. I'm the leader of the A-Team. You can't afford to loose me.7 -
About 4-5 hours ago I wanted to make simple websocket to get input from textarea and parse it on server and somehow got myself into developing in asyncio -> aiohttp -> graphql-core -> graphql-ws -> aioredis
and svelte-> typescript
I still didn’t make the stuff I wanted but I’m very close on backend at least.
I have some frontend part somewhere in my old prototypes so it will be faster if I figure out svelte.
Still don’t understand what the fuck just happened.
Maybe it’s because I wanted try those frameworks for a long time.
All ‘simple’ examples I found have around 20-30 files for backend and same amount for frontend so more then 50 files to get this shit working.
They’re called oh irony “simple chat”.
Now I see why no one fucking understands this shit.
I’m trying to cut mine to 5 files.
I thought developers are lazy bastards who don’t like write code.
But now after this they’re all looking like adhd coders.
Looks like Monday won’t be my best day.9 -
¡rant|rant
Nice to do some refactoring of the whole data access layer of our core logistics software, let me tell an story.
The project is around 80k lines of code, with a lot of integrations with an ERP system and an sql database.
The ERP system is old, shitty api for it also, only static methods through an wrapper to an c++ library
imagine an order table.
To access an order, you would first need to open the database by calling Api.Open(...file paths) (yes, it's an fucking flat file type database)
Now the database is open, now you would open the orders table with method Api.Table(int tableId) and in return you would get an integer value, the pointer.
Now for the actual order. first you need to search for it by setting the search parameter to the column ID of the order number while checking all calls for some BS error code
Api.SetInt(int pointer, int column, int query Value)
Then call the find method.
Api.Find(int pointer)
Then to top this shitcake of an api of: if it doesn't find your shit it will use the "close enough" method of search.
And now to read a singe string 😑
First you will look in the outdated and incorrect documentation given to you from the devil himself and look for the column ID to find the length of the column.
Then you create a string variable with ALL FUCKING SPACES.
Now you call the Api.GetStr(int pointer, int column, ref string emptyString, int length)
Now you have passed your poor string to the api's demon orgy by reference.
Then some more BS error code checking.
Now you have read an string value 😀
Now keep in mind to repeat these steps for all 300+ columns in the order table.
News from the creators: SQL server? yes, sql is good so everything will be better?
Now imagine the poor developers that got tasked to convert this shitcake to use a MS SQL server, that they did.
Now I can honestly say that I found the best SQL server benchmark tool. This sucker creams out just above ~105K sql statements per second on peak and ~15K per second for 1.5 second to read an order. 1.5 second to read less than 4 fucking kilobytes!
Right at that moment I released that our software would grind to an fucking halt before even thinking about starting it. And that me & myself and I would be tasked to fix it.
4 months later and two weeks until functional beta, here I am. We created our own api with the SQL server 😀
And the outcome of all this...
Fixes bugs older than a year, Forces rewriting part of code base. Forces removal of dirty fixes. allows proper unit and integration testing and even database testing with snapshot feature.
The whole ERP system could be replaced with ~10 lines of code (provided same relational structure) on the application while adding it to our own API library.
Best part is probably the performance improvements 😀. Up to 4500 times faster and 60 times less memory usage also with only managed memory.3 -
There has been a post today about the existence of too many js frameworks. Which reminds me of this awesome post https://hackernoon.com/how-it-feels...
At first I thought someone was corpseposting, as it is my understanding that the js ecosystem is calming down a bit. But then I noticed that post got almost 20 upvotes. So here's my thoughts:
(I'm not sure what I'm ranting about here, as it feels kinda broad after writing it. I think it's kinda valid anyhow.)
I'm ok with someone expressing frustration with js. But complaining about progress is definitely off to me.
How is too many frameworks a bad thing?
How does the variety and creation of more modern frameworks affect negatively developers?
Does it make it hard to understand each of these new frameworks?
Well, there's no need to. Just because it has a logo and some nice badges and says it will make you happy doesn't mean you should use it.
You just stick to the big boys in the ecosystem and you'll be fine for a while.
Does it make you feel compelled to migrate the stack of every project you did?
Well, don't. If you don't like being on the bleeding edge of js, then just stick to whatever you're using, as long as it's good code.
But if a lot of companies decided to migrate to react (among others frameworks), it's because they like the upsides: the code is faster to write, easier to test and more performant.
In general, I'm more understanding/empathic with beginner js programmers.
But I have for real heard experienced devs in real life complain about having to learn new frameworks, like they hate it.
"I just want to learn a single framework and just master it throughout my life" and I think they're lowering the bar.
There's people that for real expect occupying positions for life, make money, but never learn a new framework.
We hold other practitioners to high standards (like pilots or doctors), but for some reason, some programmers feel like they're ok with what they know for life.
As if they couldn't translate all they learned with one framework to another.
Meanwhile our lives are becoming more and more intertwined with technology and demand some pretty high standards. Standards that historically have not been met, according to thousands of people screaming to their devices screens.
Even though I think the "js can be frustrating" sentiment is valid, the statement 'too many js frameworks is bad' is not.
I think a statement like 'js frameworks can go obsolete very quickly' is more appropriate.
By saying too many js frameworks is a bad thing you're
1) Making a conspiracy theory as if js devs were working in tandem to make the ecosystem hard,
But people do whatever they want. Some create packages, others star/clone/use them.
2) Making a taboo out of a normal itch, creating.
"hey you're a libdev? just stop, ok? stop"
"Are you a creative person? Do you know a way to solve a problem in an easier way than some famous package? it doesn't matter, don't you dare creating a new package."
I'm not gonna say the js world is perfect. The js world is frantic, savage, evolves aggressively.
You could say that it (accidentally) gives the middle finger to end users, but you could also say that it just sets the bar higher.
I liked writing jquery code in the past, but at the same time I didn't like adding features/fixing bugs on it. It was painful.
So I'm fine with a better framework coming along after a few years and stealing their userbase, as it happens almost universally in the programming world, the difference with js is that the cycle is faster.
Even jquery's creator embraced React.
This post explains also
https://medium.com/@chrisdaviesgeek...13 -
Ex boss bought Embarcadero Delphi, Tokyo release and showed me how the environment looks like.
Its beautiful.
Say whatever you want. The dude would shred out large af projects and soultions from delphi faster than anything else I would have seen in other places.
The bad thing about it is that be was the only one that could do it because he was the only one that knew how to use it...the docs for it suck(imho) although reading code for Delphi was easy, tedious since it was literally a top bottom like a book sort of deal, but easy.
Kinda miss it to be honest. It was an interesting experience and people do look for delphi developers and pay them a lot, wonder if I would get another chance at it one day. We were designing some rather large systems with it and it was not web oriented(for web he used ASP :P my boi was unique eh?)
Oh well, well see -
i think ai assistants would be much more interesting / less annoying if it had a faster, snappier syntax to talk through. Like shorthand code but in the sense of talking and just getting one word responses.5
-
I know I’ll get mixed views for this one...
So I’ll state my claim. I agree with the philosophy of uncle bob, I also feel like he is the high level language - older version of myself personality wise.. (when I learned about uncle bob I was like this guy is just like me but not low level haha).
Anyway.. I don’t agree with everything because I think he thinks or atleast I get the vibe he thinks everything can be solved by OOP, and high level languages. This is probably where Bob and I disagree. Personally I don’t touch ruby, python and java and “those” with a 10 foot pole.
Does he make valid arguments, yes, is agile the solve all solution no.. but agile ideas do come natural and respond faster the feedback loop of product development is much smaller and the managers and clients and customers can “see things” sooner than purly waterfall.. I mean agile is the natural approach of disciplined engineers....waterfall is and was developed because the market was flooded with undisciplined engineers and continues to flood, agile is great for them but only if they are skilled in what they are doing and see the bigger picture of the forest thru the trees.. which is the entire point of waterfall, to see the forest.. the end goal... now I’m not saying agile you only see a branch of a single tree of the forest.. but too often young engineers, and beginners jump on agile because it’s “trendy” or “everyone’s doing it” or whatever the fuck reason. The point is they do it but only focus on the immediate use case, needs and deliverables due next week.
What’s wrong with that?? Well an undisciplined engineer doing agile (no I’m not talking damn scrum shit and all that marketing bullshit).. pure true agile.
They will write code for the need due next week, but they won’t realize that hmm I will have the need 3 months from now for some feature that needs to connect to this, so I better design this code with that future feature in mind...
The disciplined engineer would do that. That is why waterfall exists so ideally the big picture is painted before hand.
The undisciplined engineer will then be frustrated in the future when he has to act like the cool aid man thru the hard pre mature architectural boundaries he created and now needs links or connections that are now needed.
Does moving to agile fix that hell no.. because the undisciplined engineer is still undisciplined.
One could argue the project manager or scrum secretary... (yes scrum secretary I said that right).. is suppose to organize and create and order the features with the future in mind etc...
Bullshit ..soo basically your saying the scrum kid is suppose to be the disciplined engineer to have foresight into realizing future features and making requirements and task now that cover those things? No!
1 scrum bitch focuses too much on pleasing “stake holders” especially taken literally in start ups where the non technical idiots are too involved with the engineering team and the scrum bastard tries to ass kiss and get everything organized and tasks working so the non technical person can see pretty things work.
Scrum master is a gate keeper and is not needed and actually hinders the whole process of making a undisciplined engineer into a disciplined engineer, makes the undisciplined engineer into a “forever” code grunt... filling weekly orders of story points unable to see the forest until it’s over because the forest isn’t show to the grunt only the scrum keeper knows the big picture..... this is bad this is why waterfall is needed.
Waterfall has its own problems, But that’s another story for another day..
ANYWAY... soooo where were we ....
Ahh yess....
Clean code..
Is it a good book, yes.. does uncle bobs personality show thru the book .. yes lol.
If you know uncle bob you will understand what I just did with this post lol. I had to tangent ( at least mine was related to the topic) ...
I agree with the principles of the book, I don’t agree with the extreme view point. It’s like religion there’s the modest folks and then there are the extremists. Well he’s the preacher of the cult and he’s on the extreme side.. but that doesn’t mean he’s wrong.. many things he nails... he just hits the nail thru the wall just a bit.
OOP languages are not the solution... high level languages do not solve everything.. pininciples and concepts can be used across the board and prove valuable.. just don’t hold everything up like the 10 commandments of which you cannot deviate from.. that’s the difference here I think..
Good book, just don’t take it as the Bible as a beginner, actually infact DONT read this book as a beginner. Wait a bit learn then reflect by reading this.15 -
I decided to upgrade my intellij ultimate from 2019.3 to 2020.2 and I saw there is update button.
I clicked on it.
As I expected it didn’t work and it was 30 minutes waiting looking at progress bar going back and forth couple of times before I decided just to download latest version and drag and drop it to applications folder ( took me 5 minutes) - I use mac so it replaces all crap ( I think ).
I cleared the old cache that growed to 2 gigabytes leaving some configuration files.
Next as always crash on startup cause of incompatible plugins with long java stacktrace - at least I could click the close button or popup closed itself I can’t remember ( one version I remember this button couldn’t be clicked cause it was off the screen and you need to do some cheating to launch ide )
The font has changed and I see that it at least work a little faster - that is nice. Indexing is finally fixed after all those years - probably thanks to visual studio code intellisense pushing those lazy bastards to deal with this.
But the preloader on first logo disappears so I think they decided to remove it cause it’s so fast - no it loads the same time or maybe little longer when I launch it on my old macbook.
After that as always I looked at plugins to see if there’s something interesting, so to find ability to scroll over whole plugins I needed to click couple of times. I think they assume I remember all the nice plugins in their marketplace and I only type search.
Maybe I should be type of user who reads best 2020 plugins for your best ide crap articles filled with advertising or even waste more time to watch all of this great videos about ide ( are there any kind of this stuff ? )
After a few operations I unfortunately clicked apply instead of restart ide and it hanged up on uninstalling some plugin I’m no longer interested in for 5 minutes so I decided to use always working ‘kill -9’ from command line.
Launched again and this time success.
Fortunately indexing finished for this workspace and I can work.
I’m intellij ultimate subscriber for 7+ years and I see those craps are not changing from like forever.
What’s the point of automate something that you can’t regression test ?
I started thinking that now when most people are facebook wall scrolling zombies companies assume that when new software comes out everyone is installing it right away and if not they’re probably not our customers cause they’re dead.
What a surprise they have when I pay for another year I can only imagine ( to be fair probably they even don’t know who I am ).
Yeah for sure I am subscribed to newsletters and I have jetbrains as a start page cause I shit myself with money and have nothing better to do then be grupie ( is there corporate grupies already a big community? )
Well I am a guy who likes to spend some time when installing anything and especially software that is responsible for my main source of income and productivity speed up.
Anyway I decided to upgrade cause editing es7 and typescript got to be pain in the ass and I see it’s working fine now. I don’t know if I like the font but at least the editor it’s working the same or maybe faster then the original that is huge improvement as developers lose most of their time between keyboard and screen communication protocol.
I don’t write it to discourage intellij as it’s great independent ide that I love and support for such a long time but they should focus on code editor and developers efficiency not on things that doesn’t make sense.
Congratulations if you reached this point of this meaningless post.
Now I started thinking that maybe it’s working faster cause I removed 2 gigs of crap from it.
Well we’ll see.1 -
I'm writing a ML course that explains concepts by going through/getting the reader to write simple implementations of concepts. I've written a decision tree in 250 lines of code (including plotting it), that is 100 times faster than another (hilariously bad) attempt at a simple decision tree, and it's far more readable than anything else I've seen.
I'm having a good day.6 -
It was around for a while but I didn’t realize it was it for a long time. I was fixing computers for cash and spending in on booze while in primary school. Making websites for cash and for fun while in high school. Some guys wanted to buy my databases at the time and sending me emails that my websites rocks. I didn’t cared cause I party a lot and I didn’t need money.
Sex drugs and rock and roll was my life not a fucking computer.
Since I never had problems with math I passed exams and got myself to university and dropped out cause of those 3 funny things above. Turned out to pass exams after second year when math and physics disappeared you need to study more then 1 day before exam and party was more important for me.
I failed tremendously. My girlfriend left me I was out of money I got back to my hometown with my laptop and I somehow between depression, drugs, alcohol and killing myself reminded I was getting money from websites and I can try to follow that movie.
At that time I didn’t read single book in english in my life. I know some basic english so I decided to try to read some actionscript2 pdf. Why actionscript ? I liked those simple games. Those were fun and there was nothing better. I was reading first book at least 10 times with vocabulary that took about a month until I remembered whole book and second book was faster like 1 week third was 1 day and from then thing moved a little faster. I discovered flex just before adobe acquired macromedia and started writing in it. Started answering to some questions on forum and build some portfolio website with fancy 3d animations and stuff and finally applied for 2 jobs.
They both were amazed by my website and one of them sent me some task to do and I did it overnight and sent them back. They wanted to hire me and I need to respond to them.
Second job they invited me for talking and asking about math, if I’m ok with 3d and stuff and they offered me job closer to my home town so I picked them. The code was amazing, 3d equations, quaternions, complicated stuff bit very well written by some company that dropped project before launch and my first task was add some small feature.
I remember first day in elevator with my former boss who told me to not to get scary and take it slowly I was trying to do my task as fast as I can worried I will be fired if I don’t do it and nobody else will hire me and I won’t manage to recover from second failure. It was even more fighting with myself that I will fail again then with this task lol.
I’ve done the feature third day and when they said it’s cool and I can commit my changes it appeared to me that It might be this shit that will get me out of trouble.
I was never again wrong about programming and so wrong about trouble but that’s a different story... -
GODDAMN I HATE WIX!
I feel angry. I feel like smashing the developer's face who programmed this piece of shit editor. Everything I touch there just breaks and moves on its own. I fix the header, save, come back the next day and everything is shifted 5 pixels. WTF!?!
Plugins that they developed in-house aren't even compatible with their own systems. Custom code disappears suddenly. Editor doesn't allow two people to edit at the same time, resulting in lost work.
Seriously FUCK WIX.
Don't ever even consider touching this nightmare of an editor.
I could literally have hard-coded the entire site in React or Vue faster than building it in this editor, but my client wants the ability to edit things on their own later.
WIX: Not even once.4 -
In the 90s most people had touched grass, but few touched a computer.
In the 2090s most people will have touched a computer, but not grass.
But at least we'll have fully sentient dildos armed with laser guns to mildly stimulate our mandatory attached cyber-clits, or alternatively annihilate thought criminals.
In other news my prime generator has exhaustively been checked against, all primes from 5 to 1 million. I used miller-rabin with k=40 to confirm the results.
The set the generator creates is the join of the quasi-lucas carmichael numbers, the carmichael numbers, and the primes. So after I generated a number I just had to treat those numbers as 'pollutants' and filter them out, which was dead simple.
Whats left after filtering, is strictly the primes.
I also tested it randomly on 50-55 bit primes, and it always returned true, but that range hasn't been fully tested so far because it takes 9-12 seconds per number at that point.
I was expecting maybe a few failures by my generator. So what I did was I wrote a function, genMillerTest(), and all it does is take some number n, returns the next prime after it (using my functions nextPrime() and isPrime()), and then tests it against miller-rabin. If miller returns false, then I add the result to a list. And then I check *those* results by hand (because miller can occasionally return false positives, though I'm not familiar enough with the math to know how often).
Well, imagine my surprise when I had zero false positives.
Which means either my code is generating the same exact set as miller (under some very large value of n), or the chance of miller (at k=40 tests) returning a false positive is vanishingly small.
My next steps should be to parallelize the checking process, and set up my other desktop to run those tests continuously.
Concurrently I should work on figuring out why my slowest primality tests (theres six of them, though I think I can eliminate two) are so slow and if I can better estimate or derive a pattern that allows faster results by better initialization of the variables used by these tests.
I already wrote some cases to output which tests most frequently succeeded (if any of them pass, then the number isn't prime), and therefore could cut short the primality test of a number. I rewrote the function to put those tests in order from most likely to least likely.
I'm also thinking that there may be some clues for faster computation in other bases, or perhaps in binary, or inspecting the patterns of values in the natural logs of non-primes versus primes. Or even looking into the *execution* time of numbers that successfully pass as prime versus ones that don't. Theres a bevy of possible approaches.
The entire process for the first 1_000_000 numbers, ran 1621.28 seconds, or just shy of a tenth of a second per test but I'm sure thats biased toward the head of the list.
If theres any other approach or ideas I may be overlooking, I wouldn't know where to begin.16 -
At work we have to split a potentially large ID into 2 10-digit long parts that will be passed to an outside system that will later return them with some more data to us.
A colleague had implemented it using regular expression, it passed code review, everything was ok, until he noticed a potential problem. For some cases, because the outside system stores them as int and therefore will remove any leading zeros, there will be no way to reconstruct the number.
So we brainstorm and I propose ether a modified regex, or to just use math like part1 = id % 10^10 and part2 = floor(id % 10^10) and then we can reconstruct it simply by: part2 * 10000000000 + part1
Colleague: - Well, the regex will be faster, there won't be any calculations
Me: - :| I disagree but ok..
We do some more brainstorming and testing and find a case where the proposed new regex fails as well
So I bring up my previous proposal, I explain what exactly it does.
Colleague: - I don't like the math, it has calculations, which won't be needed before we reach the 11th digit
Have I missed some major development in computer hardware? When did they become bad/slow at doing math? :|8 -
For God's sake why can't you just keep consistency across your fucking files? I have to parse 3 different XML files from the same source where I have "ZipCode", "zipCode" and "Code" for the same thing.
Not to mention that the file that contains all the streets in the country have literally one street node for every motherfucking street. Not one city parent and multiple street children that would make sense and would be faster to parse, but clearly that wasn't your intention you retarded cunt.2 -
Let me share a million dollar worth of advice with y'all
RGB makes your code run faster and gets rid of errors. If it doesn't work, you're not using enough RGB.7 -
turned down software engineering job offers after college because I thought it be a good to take a temporary position as a controls engineer so I could pay off student loans faster.
realizing how big of mistake it was. working long hours on uninteresting tasks. I just want to code for a living. -
Tabs, or No Tabs? I did the same as this commentor 2 years ago. I can code so quick now because of this simple switch. Here's why:
(source, Laracasts.com)
Ben Smith
"I think the most beneficial tip was to do away with tabs. Although it took a while to get used to and on many occasions in the first few days I almost switched them back on, it has done wonders for my workflow.
I find it keeps my brain more engaged with the task at hand due to keeping the editor (and my mind) clutter free. Before when I had to refer to a class, I would have opened it in a new tab and then I might have left it open to make it easier to get to again. This would quickly result in a bar full of tabs and navigation around the editor would become slow and my brain would get bogged down keeping track of what was open and which tab it was in. With the removal of the tab bar I'm now able to keep only the key information in my mind and with the ability to quickly switch between recently opened files, I find I haven't lost any of the speed which I initially thought I might.
In fact this is something I have noticed in all areas of writing code, the more proficient I have become with an editor the better the code I have been writing. Any time spent actually writing your code is time in which your brain is disconnected from the problem you are trying to solve. The quicker you are able to implement your ideas in code, the smaller the disconnect becomes. For example, I have recently been learning how to do unit testing and to do so I have been rewriting an old project with tests included. The ability to so quickly refactor has meant that whereas before I might have taken 30 seconds shuffling code around, now I can spend maybe 5 seconds allowing my mind to focus much better on how best to refactor, not on the actual process of doing so."
jeff_way Mod
"Yeah - it takes a little while to get used to the idea of having no tabs. But, I wouldn't go back at this point. It's all about forcing yourself into a faster workflow. If you keep the tabs and the sidebar open, you won't use the keyboard."2 -
This was initially a reply to a rant about politics ruining the industry. Most of it is subjective, but this is how I see the situation.
It's not gonna ruin the industry. It's gonna corrupt it completely and fatally, and it will continue developing as a toxic sticky goo of selfishness and a mandatory lack of security until it chokes itself.
Because if something can get corrupted, it will get corrupted. The only way for us as a species to make IT into a worthy industry is to screw it up countless times over the course of a hundred years until it's as stable and reliable as it can possibly be and there are as many paradigms and individually reasonable standards as there can possibly be.
Look around, see the ridiculus amount of stupid javascript frameworks, most of which is just shitcode upon vulnerabilities upon untested dependencies. Does this look to you like an uncorrupted industry?
The entire tech is rotting from the hundreds of thousands of lines of proprietary firmware and drivers through the overgrown startup scene to fucking Node.js, and how technologies created just a few decades ago are unacceptable from a security standpoint. Check your drivers and firmware if you can, I bet you can't even see the build dates of most firmware you run. You can't even know if it was built after any vulnerability regarding that specific microcontroller or whatever.
Would something like this work in chemical engineering? Hell no! This is how fucking garage meth labs work, not factories or research labs. You don't fucking sell people things without mandatory independent testing. That's how a proper industry works. Not today's IT.
Of course it's gonna go down in flames. Greed had corrupted the industry, and there's nothing to be done about it now but working as much as we can, because the faster we move the sooner we'll get stuck and the sooner we can start over on a more reasonable foundation.
Or rely on layers of abstraction and expect our code to be compilable on anything the future holds for us.2 -
We are all about structures, clean code and many other things that make our life easier, right?
Well... It's not all white and black...
As talked many times, projects can be rushed... Client budgets can be low at the start and only then grow...
Let me take an example:
Client X needs a tool that helps his team perform jobs faster. They have a $500 budget. So... Testing, clean architecture and so on - are not really a viable option. Instead, you just make it work and perform that task as needed. So the code has minimal patterns, minimal code structure, a lot of repetitive parts and so on.
Now... Imagine that 3 months pass by without any notice and clients are ultra happy with the product. They want more things to be automated. They contact developers and ask for more things. This time they have a bigger budget but short timeframe.
So once again, you ignore all tests, structure and just make it work. No matter what. The client is happy again.
A year passes and the client realizes that their workflow changed. The app needs total refactoring. The previous developer has no time for adjustments at this point and hires a new company. They look at the code and rants spill out of their mouth along with suicidal thoughts.
So... What would you do? Would you rant about "messy project" or just fix it? Especially since people now have a bigger budget and timeframe to adapt to changes.
Would you be pissed on such a project?
Would you flame on previous devs?
Would you blame anyone for the mess?
Or would you simply get in and get the job done since the client has a "prototype" and needs a better version of it?
---
Personally, I've been in this situation A LOT. And I'm both, the old and new dev. I've built tons of crappy software to make things work for clients and after years - they come back for changes/new things. You just swallow the pill and do what is needed. Why? Well, because it's an internal system and not used by anyone outside their office. Even if it's used outside the office - prototyping is the key. They didn't know if the idea would work or be helpful in any way. Now they know and want it done correctly.6 -
So, today I've read a study that says that chocolate '' improves brain function ". Bullshit. What improves brain function is having a glass of scotch while programming. Damn, I even write code faster. The problem is the morning after when I re-read my programm. I really didn't thought I knew mandarin.3
-
I know this topic is tired and this isn't supposed to be a pure "REEEE SPACES BAD" kinda rant but I still don't understand why people would ever use spaces over tabs for indentation. I'm genuinely curious so please give me your arguments in favor of spaces because I just don't understand
So here's my position:
Tabs are objectively better than spaces in every single way
(I know that IDEs also do some of these for spaces, more on that later)
1. They are typed with one key press
2. They can be removed with one keypress
3. They allow for individually configurable width (some people prefer 2 and some 4 width)
4. They take up less memory (kinda irrelevant, but still)
5. You can properly navigate your code using the arrow keys which is much faster than using the mouse while typing
6. You don't have problems with accidentially having one too much or one too little
7. You don't have problems when copy pasting or moving code around (e.g. refactoring)
8. Code is much easier to select with the mouse, and
9. it's much easier clicking the right spot with the mouse where you want to continue typing, which is often at the start of a line
Apart from specific alignment, where spaces are fine (but which also almost never comes up), I just can't see a single thing where spaces are better at. So much so that most IDEs have to *pretend* that they're tabs when typing and removing them. It's so ironic yet people still defend it and big companies still use them.
I feel like I'm going mad 😨56 -
today i said i had holiday until the new year and wouldn't open a code editor until then
and here i am 5 hours later looking at advent of code challenges, trying to do them in rust
🤓🤡🤓🤡🤓🤡🤓🤡🤓🤡🤓🤡🤓🤡
also screw them for discouraging AI. if a tool can help me learn a new language faster i'm using it3 -
I started fully exploring different aspects of tech in a middle school technology class where the teacher gave me a good grade as long as I did something that could be useful or interesting. I learned how to design webpages by playing with inspect element, and then decided to make my own with Notepad. One of my friends showed me how to use Sublime Text, and I found that I loved programming. Other things I did in there included using two desktops with NIC's wired directly to each other with an old version of Synergy and a VNC server, and at one point, I built a server node out of old dell Optiplex desktops the school had piled in a storage room.
Last year in high school, I took a class on VB.net and made some money afterwards by freelance refreshing legacy spaghetti, and got burned pretty badly by a person offering $25,000 for a major POS to backend CMS integration rewrite. The person told me that I had finished second, and that another dev had gotten the reward, but that he liked my code. A few days later, I was notified through a *cough*very convoluted*cough* system of mine by a trigger that ran once during startup in a production environment and reported the version number as well as a few other bits, and I was able to see that *cough*someone*cough* had been using my code. I stopped programming for at least six months straight because I didn't want to go back.
This year in high school, I'm taking the engineering class I didn't get into last year, and I realized that Autodesk Inventor supports VBA. I got back into programming with a lot of copy-paste and click-once "installers" to get my modelling assignments done faster than my classmates. Last week, one of my friends asked me to help him fix his VB program, which I did, and now I'm hooked again.
I've always been an engineer at heart, but now I'm conflicted with going into I.T., mechanical or robotical engineering, or being a software developer.
A little long, but that's how I got to where I am now. (I still detest those who take advantage of defenseless programmers. There's a special place for them.)7 -
*Writes magnificent class for company that makes code safer and faster. Nothing proprietary but super useful.
Me: yo boss I just wrote some sick shit, can I use it my projects too.
Boss: No, all your codenz belong to me4 -
Why are you trying to multithreaded c++ file i/o? If you can't write c++ code that's faster than your hard drive, please just don't write c++.
Literally no complex calculations, just some insane string formatting.10 -
No Rant:
I guess I will start a religous discussion with it but I want your opinion on what tool I should learn.
Vim or Emacs (or stay with my IDE)?
For all of my programmer life I used IDEs... From Eclipse over CodeBlocks over VS to IntelliJ.
But now I realized that I want to be one of the cool kids. And using plain IntelliJ is uncool. No matter how much I love this tool.
So now I want to invest some time into learning. I never managed to do much in Vim since all code-completions sucked ass, feedback on syntax errors was bad and I never saw how I could be any faster with that shit compared to what IntelliJ does for me.
Will Emacs solve all those problems? Will Emacs make me code 1000 times faster and make having a mouse useless?
Or am I just too dumb for Vim? Can Vim itself do what my IDE does for me? Will it make me look as cool as I want to be?
Or should I stick to IntelliJ and just install Vim bindings?
What is your opinion on Vim vs Emacs vs any IDE?8 -
So when are all of you going to admit that React.js is useless? It's awful and miserable and doesn't do anything it promises to.
It's not faster to write code, it's not cleaner, it's not easier, it's just a ton of boilerplate and it can't even handle simple animations.
If Facebook didn't create it, everyone would think it's ridiculous and stupid.. Because it is.
Stop trying to be cool and just fucking deliver fucking business value.56 -
Him: i get this error when i insert into table, ForeignKey_contraint failed, what can i do?
Me: you have to obey the constraint, make sure it exists in the other table first
Him: ok i did that but i still get ForeignKey constraint error
Me: yeah that table has a couple foreign keys
Him: could you give me a very specific example how to insert into this table
Me: ........ here is a command to remove constraints on the table
Him: thanks, that fixed it!
I am helping a programmer who works with Costco integrate to software my company sells. I don't have source code, just an understanding of the database and what the software does. If he is getting paid more than me, then I should get a job there and ask for double, I could easily work 10 times faster than this buffoon. -
Why is there always one asshole!
New job just a month in, had a meeting where we could bring up improvements and put them on cards.
I brought up the idea of using slack so we could collaborate better or maybe a collab space. We all have our own offices or share with high walls.
The guy running the meeting has the same title as me said we never had that before, are you unhappy with yiur onboarding?
Slack or a messaging app is industry standard for even none tech companies. I was polite and said it was just a suggestion and it might make it easier to get help for the new people if there is a group chat.
Also brought up using a formatting standard so code reviews are spent commenting on spacing. I said we could you prettier to implement that and just pick a standard.
He said that was an issue because people were not paying attention before they pushed the code.
I am sorry I am new so I am rewriting and rewriting code all the time. I was to format on save and not spend time fucking formatting!
I could use a package before since it I formatted it would look like a bunch of fucking changes in git.
Why make things harder? Part of the meeting was how to get code done and PR’ed faster so it gets to the testers. Autoformatting shit would help.6 -
So PHP 7.2 according to its creator, is actually faster if you write bad code.
Well im not amused.5 -
I've tried to give it many chances, but I just don't think Python will ever be for me. Even "quick and dirty" scripts are faster for me in a statically-typed language with static syntax checking and sensible code completion.8
-
After learning a bit about alife I was able to write
another one. It took some false starts
to understand the problem, but afterward I was able to refactor the problem into a sort of alife that measured and carefully tweaked various variables in the simulator, as the algorithm
explored the paramater space. After a few hours of letting the thing run, it successfully returned a remainder of zero on 41.4% of semiprimes tested.
This is the bad boy right here:
tracks[14]
[15, 2731, 52, 144, 41.4]
As they say, "he ain't there yet, but he got the spirit."
A 'track' here is just a collection of critical values and a fitness score that was found given a few million runs. These variables are used as input to a factoring algorithm, attempting to factor
any number you give it. These parameters tune or configure the algorithm to try slightly different things. After some trial runs, the results are stored in the last entry in the list, and the whole process is repeated with slightly different numbers, ones that have been modified
and mutated so we can explore the space of possible parameters.
Naturally this is a bit of a hodgepodge, but the critical thing is that for each configuration of numbers representing a track (and its results), I chose the lowest fitness of three runs.
Meaning hypothetically theres room for improvement with a tweak of the core algorithm, or even modifications or mutations to the
track variables. I have no clue if this scales up to very large semiprime products, so that would be one of the next steps to test.
Fitness also doesn't account for return speed. Some of these may have a lower overall fitness, but might in fact have a lower basis
(the value of 'i' that needs to be found in order for the algorithm to return rem%a == 0) for correctly factoring a semiprime.
The key thing here is that because all the entries generated here are dependent on in an outer loop that specifies [i] must never be greater than a/4 (for whatever the lowest factor generated in this run is), we can potentially push down the value of i further with some modification.
The entire exercise took 2.1735 billion iterations (3-4 hours, wasn't paying attention) to find this particular configuration of variables for the current algorithm, but as before, I suspect I can probably push the fitness value (percentage of semiprimes covered) higher, either with a few
additional parameters, or a modification of the algorithm itself (with a necessary rerun to find another track of equivalent or greater fitness).
I'm starting to bump up to the limit of my resources, I keep hitting the ceiling in my RAD-style write->test->repeat development loop.
I'm primarily using the limited number of identities I know, my gut intuition, combine with looking at the numbers themselves, to deduce relationships as I improve these and other algorithms, instead of relying strictly on memorizing identities like most mathematicians do.
I'm thinking if I want to keep that rapid write->eval loop I'm gonna have to upgrade, or go to a server environment to keep things snappy.
I did find that "jiggling" the parameters after each trial helped to explore the parameter
space better, so I wrote some methods to do just that. But what I wouldn't mind doing
is taking this a bit of a step further, and writing some code to optimize the variables
of the jiggle method itself, by automating the observation of real-time track fitness,
and discarding those changes that lead to the system tending to find tracks with lower fitness.
I'd also like to break up the entire regime into a training vs test set, but for now
the results are pretty promising.
I knew if I kept researching I'd likely find extensions like this. Of course tested on
billions of semiprimes, instead of simply millions, or tested on very large semiprimes, the
effect might disappear, though the more i've tested, and the larger the numbers I've given it,
the more the effect has become prevalent.
Hitko suggested in the earlier thread, based on a simplification, that the original algorithm
was a tautology, but something told me for a change that I got one correct. Without that initial challenge I might have chalked this up to another false start instead of pushing through and making further breakthroughs.
I'd also like to thank all those who followed along, helped, or cheered on the madness:
In no particular order ,demolishun, scor, root, iiii, karlisk, netikras, fast-nop, hazarth, chonky-quiche, Midnight-shcode, nanobot, c0d4, jilano, kescherrant, electrineer, nomad,
vintprox, sariel, lensflare, jeeper.
The original write up for the ideas behind the concept can be found at:
https://devrant.com/rants/7650612/...
If I left your name out, you better speak up, theres only so many invitations to the orgy.
Firecode already says we're past max capacity!5 -
The story of how I knew I did the right thing leaving the start up I was an employee of.
It was a great place to work when I started, we had a plan and we were are working hard to make it. But pretty soon I realised that things weren't 100%. We kept altering the product and focusing on the wrong things. Our backlog grew faster than it was completed.
Pretty soon a launch planned in April was pushed back over and over again, until we finally released in November, and instead of being first on the market we were last.
We pivoted hard and I didn't believe in the new product so I quit.
The last week on the job I was finishing up some stuff and when our PO (who also was a programmer)was deploying the things I had done to production something went wrong. Now I had just integrated *his* new authorization service and I had a hunch it wasn't deployed. But he sent a message over slack with a bunch of code alterations that was the "problem". Along with some passive aggressive words about how I wasn't professional and didn't take ownership of the product.
I only added an error log that asked if the authorization service was deployed, and 10 minutes later he came up and said good job, no mention of what was fixed between now and then.
I have no regrets leaving that place. -
Today I want to put an age-old question to rest. What is art and what is not? What's the difference? In art world, there is actually a consensus that was reached in the second half of 20th century.
First, the audience has no merit to decide what's art and what's not, as art has inherent characteristics. So whether a piece is art or not is left for the artist to decide.
But the artist too cannot just call anything they make art. There is just one criterion — if only the art piece itself is enough to justify its making, and the artist sees it as the only award they need for making it, it's art. Otherwise, it's not.
"But wait, that's not entirely correct, this is incomplete", you say. Well, it's in fact complete, but because our society progressed way faster than our languages, we're having a hard time to describe novel complex things with words. Language can't keep up with rising complexity.
We use "horseless carriages" instead of "cars" when we describe anything complex enough. The good explanation of how language works and why do we act like this is outlined beautifully in Benjamin Bratton's "The New Normal". A small book of forty-something pages, but I never spent that much time on every page in my life. The best book investment for me after "The Code Complete".22 -
Oops! I did it again. Shredded the brain trying to debug my code. Now, my head is empty with a totally unrelated issue I need an answer to. What happens when one travels faster than light? Uuuurgh!2
-
Lets make a rant before going to bed
Who had the marvelous idea that a developer's proeficiency could be measured by years?
So at my new job Ive been waiting for credentialls, server access software installation, etc ( i know i know but thats for another rant ) and all that idle time has given me opportunity to crawl in the company's sharepoint page which has the career path for a software developer, since Im a student Im listed as trainee, but after that I have to wait 3 years + certifications to be considered as senior and then be able to hop to next hierarchy level Software Designer and then another three years to be able to become a software architect. So my point, as I was seeing this I thought "I dont wanna wait 6 years to become a software architect, Im going to be better faster in order to become needed and make them promote me faster"
The thing is Ive always wanted to become a softwsre architect and learning that I have to wait 7 years to be considered a proeficient architect just makes me mad.
Pd: One of the requirements for a senior developer is knowing Lines of code time stimationundefined pichardo for president lines of code school is bad trump rules dont do drugs architect loc career career transition1 -
I really like my position as the head of my department. But I am most definitely hitting walls(and in some way breaking them) concerning the way the CTO(my direct boss) deals with a lot of the things that his management team wants to do.
For example, the previous manager could only do so much in terms of directing a software team since she did not have a formal background in computer science or engineering, thus the developers that she had would tell her the different deals with many things and she would have to take their word for it. Nothing necessarily bad with this, but it just meant that a lot of things could have gone smoother had she the knowledge to fix said items. Whenever she would try to use resources(dev time or such) the CTO will resort to the all powerful manthra of "if it ain't broke don't fix it!".
but it was about more than fixing things that were breaking, our internal services and admin boards were built using all of the WRONG proper development practices, it feels as if they took the book of best practices.....and said fuck it and did whatever the fuck they wanted. It is the worst PHP/Java/JS code I have ever seen in my entire life and the reason why even though I do not concur with it I will always understand the dislike from other developers. Our services look like something that came out from the 90s, no style, no engineering concepts in place, no versioning no testing NADA zip(these are all web based services)
One in particular, it was an admin board used internally to let students evaluate their professors, the entire app is shit, and it was broken, for some UNGODLY reason, the original dev decided to use some weird external libraries he got from some blog somewhere and as such something that would take about 5 or 6 files is now a mess with over 200 php/js files all over the fucking place. The CTO insisted on fixing them, they were all broken, and I continuously told him that redesigning the application would be faster.
Mofo fought me on it, and in the end I did what I wanted and rebuilt the app.
It took me one afternoon. One fucking afternoon, over possibly 2 weeks of fixing it.
See, I am not one to just do whatever he pleases, but I am firm in my belief that if I know a better way I will do it and save precious time. The dude had to agree with me on this and promised to consider this shit on other items that will undoubtedly come up. He was lying out of his ass but oh well..........
W3 -
GraphQL fans, please read the whole rant until you jump in the comments.
I get it, when you have multiple data sources (that aren't always proper databases), your stuff is relevant.
But most of the people use GraphQL when they have a single database. In that case, native joins are always faster than GraphQL dataloader N + 1 BS you have. It takes less time and less code to go to the backend and write an endpoint for the frontend with a DB query than write several GraphQL ones on the frontend and then combine the data with imperative JS. It will work faster too.
So why the fuck should I use GraphQL at all?28 -
Why the fuck nobody talks about Multi-page apps?! We went from a Web where everything was Multi-page server-rendered, and now everything for Web developers is "Single-page apps".
What about websites who can't do that? Not everything can be a single-page app. Only my uncle's restaurant website, or something which is TRULY a full app. No half choices.
If your website is a multi-page app/portal which actually PRELOADS data, instead of doing 100 fetch to an API within a page that is full of loading bars, well, your life is a pain.
When you want a first contentful paint which isn't a white page, well, your life is a pain.
What are React, Vue, Ember, Angular (let's exclude Svelte and Marko) going to do about Multi-page apps and SSR?
React-router sucks to me. It's performance is weak and it's useful only when you have an SPA with multiple sections which can be treated as pages (e.g. A single SPA divided in tabs).
Server-side rendering is the worst pain ever made by humanity, in React (and prob Vue, I didn't try but I can bet). And even when made easier from libs like Svelte and Marko, I (personally) can't get it to be faster enough compared to a traditional website without a JS framework and with a templating engine.
Anyways, if there's anything that I learnt from React, is to stay away from Next.js. Perfect, beautiful, mess.
All JS frameworks just seem to bloat the code and make it worse and slower, even though they're REALLY helpful.
Why? Why everyone loves them if their downsides are so clear? Why 3 projects out of 3 I made (1 React SSR, 1 Vue, 1 Marko SSR) are and will stay painfully slow and bloated, full of shit, even if in 2020 we should have evolved with the famous three shaking, with the famous lazy loading, etc.?
I am just frustrated.
And let's not even talk about Webpack, Rollup, Lasso, those module bundlers shit which are harder to configure and understand than finding a needle in a haystack.
Lasso was the easiest to configure but I anyways can't understand it. Webpack seems it was made to handle SPAs, as any tool in this freaking world, and not even considering an easy way to integrate multiple bundles for multiple pages (I know it's pretty easy, but with component sharing between pages and big unique bundles Next.js handles it soooo bad it feels like hell).
Am I the only one?
Sorry for the long rant. I just needed to rant right now.17 -
Finished my regex validator. But now the edgy stuff kept coming. It seems that you can do a-d or 3-8. OK, makes sense (else it would be just copies of \w and \d), but anyone ever saw someone using it? I only knew a-z and 0-9.
Thing is, I wrote the perfect design now for the interpreter. Adding features is easy now and not so exciting.
Still, I have a big plan for it that makes it possible to validate nests like (()) or {{"}"}} or anything you see as start / close tag while keeping regex generic. I'm not learning it that signs between some chars ("') has special rules. That would be specialization.
Fun fact: my regex is six times slower than native C code (not c regex) validating the same. In half of test cases faster than c regex. I consider it a success.
Thanks for listening8 -
Can someone suggest tips to code faster?
In the last few days ive only written + commited 114 LoC which is not enough imho.14 -
I discovered a language I didn't know AND i like.
It's not under active development anymore, but I decide it has a nice syntax. It's made by the writer of craftinginterpreters. There are still people writing some extensions for it.
I decided to implement socket support in it.
That went very well and the result is just BEAUTIFUL. But now, i have a collection of socket functions that require a file descriptor (sock) for every function like write, read and close. We're not living in the 90's. I want to do sock.send(), sock.write() and sock.close(). So socket as an object.
I wrote a wrapper and it is freaking TWO times slower! Hows that even possible.
I've made wrapping to object optional now. Bit disappointing.
The language shows off with benchmarks on their page. Their fibers can even be faster than Elixr. Yeah, if you only use the fiber and nothing else from language. I benchmarked string concat for example against python: 1000 times slower or so.
The source code of wren is so freaking beautiful. Before Lua was my favorite language regarding source. The extensibility is so great that I prefer to work on this one instead of my own language. They kinda made exactly what I wanted. I can't beat that.
For if you're interested: https://wren.io/
The slot way of communicating between host language (C) and child language (wren) seems odd at beginning but i became fan of it.
Thanks for listening to my ted talk.
What's your opinion about wren (syntax)?25 -
Some people be like:
MAN: Are you at office?
SE: No, I'm on a airplane at 35000 feet;
MAN: While you are up there, you should write more code. After all you know that bugs won't survive at 35000 feet.
SE:(sighs and facepalms) hmm that a very good point....
MAN: plus you are closer to the cloud, so server code should run faster or with lower latency at least.
SE: (jumps off the plane)3 -
Swapped workplaces as the previous one wanted to get rid of me, the new one so far feels even worse.
Teammates are too busy to help, codebase makes spaghetti code look like a compliment (and it takes forever to compile) and my manager somehow believes I’m super man, supposed to finish everything faster than speed of light.
I’m miserable.2 -
!Rant
Just had a very productive night with @hahaha1234 and @jappe. Revisited a lot of code, made it simpler, faster, storage efficient and future proof. Our smart search engine is getting somewhere now. Tomorow we will be continue building ofcourse, but first: time to sleep! It is 3:45AM and after that, go running on the beach in Zandvoort.1 -
This is why we can never have enough software developers
It's true. No matter how many people learn to program, there will never be enough people who know how to program. They don't have to be very good at it either. It is now a required skill.
Minimum wage in first world countries is way above 5$ per hour. A Raspberry PI 3B costs 40$, or at most 1 day of work for the worst paid jobs. And it will run for years, and do routine tasks up to thousands of times faster than any employee. With that, the only excuse that people still do routine tasks, is the inaccessibility of coder time.
Solution: everybody should know how to write code, even at the simplest level.
Blue-collar jobs: they will be obsolete. Many of them already are. The rest are waiting for their turn.
Marketing people - marketing is online. They need to know how to set up proper tracking in JS, how to get atomic data in some form of SQL, how to script some automated adjustments via APIs for ad budgets, etc. Right now they're asking for developers to do that. If they learn to do that, they'll be an independent, valued asset. Employers WILL ask for this as a bonus.
Project Managers - to manage developers, they need to know what they do. They need to know code, they have to know their way around repositories.
QA staff - scripted tests are the best, most efficient tests.
Finance - dropping Excel in favor of R with Markdown, Jupyter Notebooks or whatever, is much more efficient. Customizing / integrating their ERP with external systems is also something they could do if they knew how to code.
Operations / Category Management - most of it would go obsolete with more companies adopting APIs as a way to exchange important information, rather than phone calls and e-mails.
Who would not be replaced or who wouldn't benefit from programming? Innovative artists.
A lot of it might not be now now, but the current generation will see it already in their career.
If we educate people today, without advanced computer skills and some coding, then we are educating future deadbeats.
With all this, all education should include CS. And not just as a mandatory field or something. Make it more accessible, more interesting, more superficial if needed. Go straight to use cases, show its effectiveness in the easiest way possible. Inquisitive minds will fill in the blanks, and everyone else will at least know how to automate a part of their work. -
*thinking to myself*
Would it be faster to try to guess/remember the correct syntax and type out this line of code, or search for it on Google, then copy and paste it?1 -
Build my own phone and support the Zerophone project by writing code.
Seriously what the fuck is going on with the development of major companies smartphones. Every year all there is are larger displays, better and more cameras, faster processors and some more 'AI' thrown into the mix.
What the heck am I supposed to do with a phone costing multiple hundreds of euros but locked down with an OS spying on you. The processing power available is hardly ever used because most people just use apps like Instagram, WhatsApp or other messaging services.
I get why larger screens are useful but at some point it gets ridiculous.
Better cameras are useful to some degree as well but there's a limit to it.
If you really want to get into photographing then please buy an actual camera.
Another aspect I'd of course like to talk about is privacy. It's hardly existent on IOS or Android smartphones with Google services. Of course one can install different ROMs like Lineage OS but if I already pay multiple hundreds for a device then I'd prefer it working for and not against me.
And dare you break a single part of your phone. You can't really repair it yourself anymore and one can't even change its battery. Most people either have it repaired or just buy a new one and throw it away. There is so much electronic waste, very difficult and expensive to dispose of, just buried in the ground somewhere.
Summing up: I don't really know where the development of smartphones is heading. A phone is a device you carry around with you almost everyday so I'd like it to be tailored to me and not spy on me.
I hope the Librem phone will be a success and other open source phone projects will gain more attention. I want a phone I can repair myself and tailor the software running on it to my needs. I'd like to write messages, listen to music, make calls, run a WiFi hot-spot on the phone and maybe play some tiny games on it once in a while.6 -
Customer: The quality of the software you’re delivering is going down
Me: That’s because we’re developers, support, and spend all day on meetings without mentioning that deadlines are defined by you, not the technical team
Project Manager: I have added more members to the team so you can deliver faster
Me: That’s just slowing us down because this inherited code is shit, there’s no documentation and we’re always in a rush, without time for a proper ramp up
Customer: *throws money to our faces* I’ll remove two weeks to this delivery so we can test it better
Me: …1 -
Finally.... Spent over an hour trying to optimize ~5 lines of code... Guess it was a review on how to use primes for hasig but....
Root cause was I just needed a slightly faster hashing function...
1 test failed from timeout of like maybe 1sec. Test shows passed, then in details shows Timeout...
https://hackerrank.com/challenges/... -
Communicated 50% more time than I actually estimate for a new feature because the management usually thinks it can be done faster than estimated.
Actually got that 150% approved so I have enough time to write some bad ass beautiful code with unit tests and documentation 😳
Seems like good things actually happen..1 -
Rant time. Oh boi.
So, a bit of context: I am a university student in Greece and I have a desktop PC with elementary OS on it. When the unis closed down because of Coronavirus, I moved back to my parents', without my PC, only a usb stick with elementary OS installed on it. That was before the lockdown. My parents have a desktop PC and my old laptop, both with Windows rn. I'm only able to work using Linux, so I've been just popping that elementary OS USB stick whenever I needed to work.
All cool and good. Until the usb got full. It was a 16GB one after all. No biggie, I bought a new 64GB one from a well known Greek tech shop along with a webcam my mother needed. It was a LEXAR one.
They fucking took a week to transfer it. As if the closest shop to me was in fucking Germany. For context, the drawing tablet I bought from China the other day only did 2 weeks to come. During this time I could barely use Linux because my USB stick had only some 600MB free.
Ok, wtv I said to myself. I am a patient person after all. I received the USB stick, along with the webcam, in good condition, in their packaging. Alright. I dd'ed everything from the 16GB stick to the 64GB one and then I extend the partition. Everything works flawlessly. And it's faster too.
Next day, I boot up from it again. It boots up good. Nice, time to do some work. I open my editor. And it fucking freezes. The editor is not some VSCode or Atom or any of that heavy shit, it's just elementary OS Code. A very lightweight Gtk3 app. Strangely though, the rest of my OS (the dock autohide, eg.) Seems totally responsive. I try to open another app. No luck. Not even switching TTYs work. Good shit. I force shutdown my PC. I try to boot again from that piece of shit. And guess what! NO BOOT BITCH. Like, fuck you. I boot from my previous 16GB one. Linux won't recognize it. No /dev/sdc like I used to have. Ok, lsusb. Nope, nothing. I disconnect it and reconnect it, and lsusb. An empty entry appears.I run it a couple of times, and the it disappears again. I switch to TTY 2. I get read errors and usb error -71.
And I want to fucking explode
I call back to support for the warranty coverage. I wait for a good 10 minutes and a nice lady picks up. I tell her the issue. She says that the support team will call me for the issue this day it the next day.
I hang up.
It feels like some fucking prank. YOU MOTHERFUCKING TOOK SO LONG TO DELIVER MY SHIT. Not to mention that the shitty courier service they are working with wouldn't deliver the goods to my home because it's slightly out of town. AND NOW YOU ARE DELAYING MY WARRANTY RETURN? HOW THE FLYING FUCK DID YOU BECOME A WELL KNOWN TECH SHOP WITH SUCH SHITTY SERVICE?
IF YOUR BRAINS WERE DYNAMITE YOU WOULDN'T HAVE ENOUGH TO BLOW YOUR NOSES.
YOUR THE SERVICE EQUIVALENT OF A PARTICIPATION AWARD.
Foreigners' view of Greeks suddenly doesn't seem so unreasonable. Yes, we are fucking lazy asses. And we also hate that. We hate each other for that very reason. May this country not live any longer.6 -
Before I went to school I was copying game code from book to atari computer cause it was faster than waiting for game to load from tape recorder ( especially when people are walking around on wood floor and you have constant read errors).
I probably wrote some magic spell that cursed me on my lifetime cause this shitty programming happened to chase me everywhere I go.
Damn you software you’re everywhere I go, why you’re haunting me all the time. It’s hard to find some quiet place without you watching.
So remember kids don’t write code you don’t understand cause it may fuck your life. -
Sometimes I write code so pristine, so sexy it blinds
but sometimes...
sometimes I can't let it go
gotta get back to it
make it flashier, prettier, faster, smaller...
And always, ALWAYS! I shit over it, full-blown dysentery. diarrhea so bleak, so dark and nasty it makes me question my sanity, my soul cracks, my mind numbs...
Today was one of these days, but it was the last. I shall never ever do that again.4 -
I can't take this Swift compile time anymore. It's up to 40 minutes now and all we can say is "optimize the code" and "get faster computers"6
-
This shit is long story of my computer experience over my lifetime.
When I was young I got my first PC with windows it was not so bad. It required safe shut down of it’s fat32 partition. From time to time I needed to reinstall it cause of slow down but I got used to it I was only a gamer.
Time passes and I got more curious about computers and about this linux. Everything worked there but installation of anything was complete madness and none of windows programs worked well, and I wanted to play games and be productive so I sticked with windows.
I bought hp laptop once with nvidia card, it was overheating and got broken. So I bought toshiba and all I told to the seller was I want ATI card. Took me 5 minutes to do it and I was faster then my friend buying pack of cigarettes because I was earning money using computer.
Then I grown up running my small one person programming businesses and I wanted to run and compile every fucking program on this world. I wanted linux shell commands. I wanted package manager, and I wanted my os to be simple because I wasn’t earning money by using my os but by programming. So after getting my paycheck I bought mac. I can run windows and linux on vm if I need it. I try not to steal someones work so I didn’t want to run hackintosh. I am using this mac for some time.
Also I use playstation for gaming. Because I only want to run and play game I am not excited about graphics but gameplay. I think I am pragmatic person.
I can tell you something about my mac.
When I close lid it go sleep when I open it wakes up instantly. I never need to wonder if I want to hibernate or shut down or sleep and drain battery. It is fucking simple.
When I want to run or open something it doesn’t want me to wait but it gives me my intellij or terminal or another browser or whatever I search for. Yeah search is something that works.
Despite it got 8 gigs of ram I can run whatever number of programs I want at the same speed. The speed is not very fast sometimes but it’s constant fast.
I have a keychain so my passwords are in one place I can slow down shared internet speed, I can put my wifi in monitor mode and I don’t need to install some 3rd party software.
And now I updated my mac to high sierra, cause it’s free and I want to play with ios compilation. Before I did it I didn’t even backup whole work. I just used time machine and regular backups. And guess what, it still works at the same speed and all I did was click to run update and cook something to eat.
When I got bored I close the lid, when got idea open lid and code shit, not waiting for fucking wakeup or fucking updates.
I wanted to rant apple products I use but they work, they got fucking updates all along at the same time. And all of updates are optional.
I cannot tell that about all apple products but about products I use.
I think I just got old and started to praise my limited time on this world. Not being excited about new crap. When I buy something I choose wisely. I bought iPhone. I can buy latest iPhone x but I bought iPhone 7 cause it’s from fucking metal. And I know that metal is harder then glass, why the fucking apple forgot about it? I don’t know.
I know that I am clumsy and drop stuff. Dropped my phone at least 100 times and nothing.
I am not a apple fan boy I won’t buy mac with this glowing shit above keyboard that would got me blind at night.
I buy something when I know that it can save my time on this world. I try to buy things that make me productive and don’t break after a year.
So now piece of advise, stop wasting your time, buy and update wisely, wait a week or a month or a year when more people buy shit and buy what’s not broken. And if something’s broken rant this shit so next customer can be smarter.
Cheers1 -
1. The power you have with it.
With that, I mean solving your own or someone else's issues.
Be it automation, parsing weird formats, or anything else, it can usually be achieved by coding something for the task.
2. The logic (when compared to humans).
Unlike humans, code does what it's told to do. Us humans, well, we often misinterpret things. Code, however, usually has a single meaning.
3. How things can be improved over time.
Finding a way do something faster and implementing it is really satisfying.4 -
Production goes down because there's a memory leak due to scale.
When you say it in one sentence, it sounds too easy. Being developers we know how it all goes. It starts with an alert ping, then one server instance goes down, then the next. First you start debugging from your code, then the application servers, then the web servers and by that time, you're already on the tips of your toes. Then you realize that the application and application servers have been gradually losing memory over a period of time. If the application is one that don't get re-deployed ever so often, the complexity grows faster. No anomaly / change detection monitor can detect a gradual decrease of memory over a period of months.2 -
Having a hard time thinking the alternates to if statements is a good idea. I was genuinely curious how this was done. The examples I am finding seem to just spread the logic everywhere across multiple objects. To me this makes the logic objectively less clear. I didn't understand the obsession with objects until I saw the examples that creates a fuckton of boiler plate objects. How someone can say this is preferred over a few if statements boggles my mind. I actually am trying to understand the functional mindset as well. It is not going well for me. I can sorta see some value in using a map. Technically a lookup could be faster. But again it spreads the code all around adding more boilerplate.
https://blog.bitsrc.io/reduce-if-el...
https://dev.to/phouchens/...
Is it because these are contrived examples? I initially searched to find ways of reducing ifs in a functional approach. I did find it in the second example. I was however hoping to find that by lazy eval or something. I see people making references to how one you "get it" functional logic is easier to understand and evaluate. I cannot tell if this is straight up gaslighting or my brain is just too fucking imperative.11 -
Her: What do you do in your spare time?
Me: Learn to code
Her: Can you install an antivirus on my laptop and make it go faster?
Now I just want to kill myself. Who else here has encountered this?2 -
If I just try another way to do the same thing my broken code tries to do, either the new version makes my mistake obvious or everything just works.
Is this debugging? It's just rewriting. It seems faster than debugging. -
Related to queueing theory...
Suburban traffic at a stop lights has developed a tendency to include invisible cars.
You can see where these invisible cars are by the gap between the front bumper of one car the back bumper of the next. Sometimes there is an invisible motorcycle, sometimes there is an invisible semi-tractor trailer. It is becoming an epidemic.
The dumbasses in traffic who do this are usually texting behind the wheel while stopped and they are not always Buffy the ding dong cheerleader nor Sally the Soccer Mom... Suits too... It seems to have gotten worse with pot becoming legal I just realized...
But to the point, you can tell these people would never be able to comprehend software engineering... they have no idea that for every invisible car in front of every dumbass driver like them, there is a real car way back that has to sit through two lights. (side effects of bugs and inefficient hash tables) Worse, these dumbasses do this in the left lane so it keeps a host of others from being able to get past their big fat ass into the turn lane.
Simple queueing theory escapes these people.
Computers will someday take their jobs.
Sometimes it motivates me to code faster... "There goes your job beotch! Get used to mac and cheese..."
But once in a while I am in a position to be able to be stopped at a light, and note that next to me is one of those "gapsters" and then pull my car (or motorcycle some days) into that invisible car's spot. The gapster gets so mad sometimes... >:-> so much satisfaction I almost feel guilty...
Queueing theory rules... LOL -
Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some action to prevent further damage and to show that you're on top of the situation.
We've seen clean, functional systems deteriorate pretty quickly once windows start breaking. There are other factors that can contribute to software rot, and we'll touch on some of them elsewhere, but neglect accelerates the rot faster than any other factor.
"The Pragmatic Programmer"2 -
think I've hit that stage of my life where things break faster than I can fix them
from my body, to my code, to even my hardware9 -
There is a particular power move when you take someone's shit code, refactor it to make it faster, safer and more readable and then request a review from them on your PR. "See how I dunked on you, bitch. This is what superiority is about." And at the same time you can be perfectly polite with "oh you know this part of the code well, I wouldn't want to break anything there" with the "bitch" just strongly implied.3
-
Spent 2 days installing different versions of nvidia-driver, nvidia-cuda-toolkit, cudnn.
Disassembled pc due to some ram memory problems and pc not starting after freeze.
Looks like sometimes plug out and plug in various components on your motherboard fix pc lol. Destroyed PC casing that collapsed due to me sitting on it.
All of this to just find out tensorflow error and all crashes are from graphics card overheating after keeping it for some time at 82 celsius.
Added time.sleep to python code and looks like it's working, keeping temperature below 65 celsius.
Still ~100 times faster than cpu training so I can live with that.3 -
I just wanted to transfer my domain from domain operator dns to other dns provider.
Now I lost control over my domain and it redirects to those fuckers website.
I thought fuck them, this is their last fuck up so decided to transfer domains from this piece of shit provider to any other.
It turned out you need to send request using post office or visit their office by yourself to get EEC (authinfo) code
Their office is 300km away but cause it’s fucking faster and more reliable then waiting a month for their mail with fucking numbers I will go and do it next week.
Let the fucking hell begin.
I hope those motherfuckers would food poison and shit themselves into their beds till end of their fucking life.
Fuck those fuckers.6 -
Mozilla you stinking kangaroo pouches!
When you set an object's CSS translation via JS like so:
obj.style.transform="translate(0px,0px)";
and then read it back, every browser including FF until 66 gives this, with additional space:
"translate(0px, 0px)"
However, bloody FF 67 returns "translate(0px)". Because it's always a good idea to just introduce external changes nilly-willy, right?
That screwed up my crappy string slicing because it relied on the presence of the comma. It was a quick and dirty solution, but with additional future proof if/else logic, it wouldn't even be quick anymore.
Besides, the whole string slicing looked like yo-yo code anyway so that I instead added shadow integer variables to the objects. That solution not only works, but is even faster.10 -
1) Had to fix severe bugs in a dynamic UI (configuration-driven forms) component.
Recognized undocumented Copy/Paste/Modify/FuckUp driven variations of the same component all over the project. Unsurprisingly, the implementations covered 99% of the antipattern catalog on wiki.c2.com and could compete with brainfuck in regard to human-readable code.
Escalated the issue, proposed a redesign using a new approach, got it approved.
Designed, Implemented, tested and verified the new shared and generic component. Integrated into the main product in the experimental branch. Presented to tech lead/management. Everyone was happy and my solution opened even more possibilities.
Now the WTF moment: the product with the updated dynamic UI solution never has been completely tested by a QA engineer despite my multiple requests and reminders.
It never got merged into baseline.
New initiatives to fix the dynamic UI issues have been made by other developers. Basically looking up my implementation. Removing parts they do not understand and wondering why the data validation does not work. And of course taking the credit.
2) back in 2013, boss wanted me to optimize batch processing performance in the product I developed. Profiling proved that the bottleneck ist not my code, but the "core" I had to use and which I must never ever touch. Reported back to him. He said he does not care and the processing has to get faster. And I must not touch the "core".
(FYI: the "core" was auto-generated from VB6 to VB.Net. Stored in SourceSafe. Unmaintainable, distributed about a bunch of 5000+ LoC files, eye-cancer inducing singlethreaded something, which had naive raw database queries causing the low performance.) -
!rant
Ever find something that's just faster than something else, but when you try to break it down and analyze it, you can't find out why?
PyPy.
I decided I'd test it with a typical discord bot-style workload (decoding a JSON theoretically from an API, checking if it contains stuff, format and then returning it). It was... 1.73x the speed of python.
(Though, granted, this code is more network dependent than anything else.)
Mean +- std dev: [kitsu-python] 62.4 us +- 2.7 us -> [kitsu-pypy] 36.1 us +- 9.2 us: 1.73x faster (-42%)
Me: Whoa, how?!
So, I proceed to write microbenches for every step. Except the JSON decoding, (1.7x faster was at least twice as slow (in one case, one hundred times slower) when tested individually.
The combination of them was faster. Huh.
By this point, I was all "sign me up!", but... asyncpg (the only sane PostgreSQL driver for python IMO, using prepared statements by default and such) has some of it's functionality written in C, for performance reasons. Not Cython, actual C that links to CPython. That means no PyPy support.
Okay then.1 -
What's your opinion on functional shortcuts and 'hacks' in many languages, like map/reduce/filter, ternary operator, lambdas,inner/anonymous classes?
Imo they can make development faster and more efficent but they make the code very unreadable, especially if someone else has to read it, Therefore I try to use them only when it's appropriate. My dev friends use them too much and it makes reading their code a hellish experience, especially in Javascript with Rx.3 -
Looks like Android studio's artificial java to kotlin converter learned faster to write better kotlin than my shitty brain :/
People from java background, where did you learned to write efficient kotlin code and how?
Where to learn how to write that famous "kotlin's super precise and small , ugly ass anonymous looking code full of keywords , that only work when arranged in a particular pattern and defies my all previous knowledge of oop , java and good practices " code?
I really wish to learn, since android and google seems to be heading towards this beautiful new shit1 -
!rant
How should I put this... I have REALLY enjoyed help desk job more than anything thus far.
I've seen people posting about how dumb clients may be, and I know there's also those cases, but ultimately those are usually just good inspiration to comedy.
So here's the background: I was working in growing website development company (marketing called it digi-office for some reason). The clients were firms ranging from local bakeries to international suppliers.
The intriguing thing with working in help desk was usually smaller tasks and direct customer contact through e-mail. I got feedback (which always important) and the rush of good feeling at the end of every task; faster and more frequent than working on a year project. But the cherry on the cake is that I got to investigate problems within each websites' and the CMS's code base, fix them or point out bigger flaws in systems and blame others from them. 😂
How your help desk experience differ? Or do you also recognize the good side?1 -
I'm an apprentice software engineer, have been for about a year now. I feel so dumb all the time. Used to be I'd just teach myself at my own pace for about a year or two (which was slow, on and off because of life getting in the way). Now I'm surrounded by programmers with decades more experience than me and I can't help but feel inferior.
I want to get better faster but, I work full-time now so I don't know how to supplement my studying. I've been studying linear-algebra online because my maths is crap and I remember one of my colleagues mentioning that it would be useful. But now I'm not sure because apparently discrete mathematics is better.
I also need to keep up with Java since that's what I'm learning in university but, I'm mostly using React/Typescript in my current project. By the time I finish work I don't even want to look at a line code and I lack the self-discipline to force myself to study in the evening.
I need to pick a direction and stick with it but, it's seems to just be increasingly harder as I've gone on.3 -
I have no specific story to tell (for now. Will post ke if i remember one) but i have had tons of CS teachers that are shit. From ones who don't know shit to ones who are so bad as a human being i am sure thrte are hundreds of people out there to kill them. I have had multiple teachers where all they did was read out a book and we'd have o site everything they read. Whole fucking semester. And not just one person or once. M-U-L-T-I-P-L-E TIMES AND TEACHERS. then I ve had ones who would rejection my code even if it's better, is right, can andle more edge cases, most likely magnitfrs of times faster and isn an eye sore with just effig if-else on op of if-else nested within if-else with many for loops. Then there are those who want you to do just what they want and expect you to not have a life of your own. Those who blatantly abuse their powers. Those who couldn't care less. Those who are not that bad a teacher but their attitude and style just makes you want to leave. There's one currently who wants a group of 4 people in second year to develop a full blown industry level application in mere 3 weeks. AND WE ARE HAVING OUR THEORY PAPRRS INBETWEEN FOR 2 EFFING WEEKS. So that's just like a month. Fortunately I have a group that's good enough that I can have them do the testing and filling up the documentation (did I mention that he needs full documentatiin for software plus a report on how our development process) and have them work on presentation (yup. We need to present this thing) all for just 50 marks. 1 uni credit. Our system still gives 80% weightage to pure theory. Plus the practical part is somewhat theory too.
Our HOD wants us *insists*forces** to stay back at college and work on projects (which is nice but what he ments is use the shitty outdated books from early 2000s to study something). Now I'd be happy to stay back if college provided decent internet (I am not asking for gigabit speeds. Even 1-2Mbps would work) and place to sit. But nope, our college non-teaching staff is eager to send us out of their department and by extention college building. There is literally nowhere you can sit. Plus yup, there is no internet and nowhere for you to plug your laptop in. That's a moot point anyway because they don't want you to use your laptop in college library or anywhere anyways. Plus you don't get much of mobile data too because of the building design. Those work only near windows. Why would I be at college if I can get a 50+Mbps down, area to sit, snacks, port to charge all at home. And you'd say we should talk with him about this – well it's not his issue is all he has to say.
Well, such is life in Indian colleges. And my college/uni is one of the better ones.1 -
I'm simplifying my notes during the lecture with writing a piece of code. It's much faster than in my native language.1
-
Question:
Should I make my own JS library/framework to make my work go faster, I would put the most used code in this library2 -
So the saga of broken fucking everything continues at work, and I'm managing it, effectively, and doing it correctly on the first go-round. It's a long process though, because the two retards who preceded me were equally inept for completely different, yet equally disruptive and destructive reasons. The first dude was just plain psychotic, probably still is. I'd post some of his code, but I don't want anyone's face to melt off like those Nazi dudes at the end of Raiders of the Lost Ark. I can handle it because I'm constantly inebriated, which is not as fun as it sounds. If you have to ask yourself if you can handle it, you probably aren't, unless you've had to Uber to/from work due to still being fucking drunk. Anyway, enough about that, and it was only like twice. The rest of the times, I was more blazed than Jerry Garcia at a weed smoking contest. Moving along.
UPS shipping labels broke two weeks ago, I fixed it, but these fucking 10xers jointly decided to not only never implement anything resembling error handling, other than EMPTY GOD DAMN "try/catch"es (empty catch, wow so efficient), and instead of using COMMENTS, which I know are a new thing, they'd wrap blocks of code in something like: if 1 = 0 {} FUCK YOU DICKFACES. As I was saying before I got emotional again, they tied the success to all kinds of unrelated, irrelevant shit. I'm literally needle/haystacking my way through the entire 200GB codebase, ALONE, trying to find all the borked things. Helpfully, my phone is ringing all the time from customer service, complaining about things that are either nothing to do with the site, or due to user stupidity, 75% of the time.
A certain department at my company relies on some pretty specific documents to do their job, and these documents are/were generated from data in the database. So until I can find and fix all of the things, I've diverted my own attention as much as possible to the rapid implementation of a report generation microservice so that no one elses work is further disrupted while I continue my cursed easter egg hunt from fucking hell.
After a little more than two days, I'm about to lauch a standalone MS to handle the reports, and it's unfortunately more complicated than I'd like, because it requires a certain library that isn't available on Winblows, so I've dockerized the application. Anyway, just after lunch, I've finished my final round of tests, and I'm about ready to begin migrating it to the server and setting up (shitty fucking shit) IIS to serve it appropriately. At this point, this particular report has been unavailable by web for about 8 days.
A little after lunch, and with no forewarning of any kind, the manager of managers runs upstairs and screams at me to "work faster" and that "this needs to be back online RIGHT NOW", but I also know that this individual is going to throw a fit if things on this pdf aren't a pixel perfect match. So I just say "that's some amazing advice, I wish I'd had the foresight to just do it better and work faster". Silence for a good five seconds, then I follow up with "please leave and let me get back to my work". At that moment from around the corner, my "supervisor" suddenly, magically even, remembers that he has had the ability to print this crucial, amazingly super fucking important document all along, despite me directly asking him a week ago, and he prints it and takes it where it needs to go. In the time that it takes him to go to that other department and return, I deploy my service.
I spent the rest of the day browsing indeed and linkedin jobs, but damn this market is kinda weird right now, yeah?2 -
*rewrites rust mpsc*
you did it wroooong
I thought my threads were locking if I had thousands of jobs spawning thousands of more jobs. turns out it's fine. actually if I organize my data locks in the way everyone wants to do them my CPU fans go off but my original way you don't feel jack shit and processes faster
turns out it's because 320k jobs is a bit much for mpsc. because my jobs can spawn more jobs the whole thing just grinds to a halt. and there's sync-mpsc which allows you to have a maximum number of data you send through it, therefore I can just have 245 sent jobs instead of 320k but then this locks all the threads because for a thread to finish it needs to finish sending jobs, but a sync mpsc won't let you send a job if current jobs are over the specified limit. so all the threads get stuck sending jobs. smart. not. what's even the point of that?!
and evidently there's no built-in way to prioritize certain jobs. the AI thinks you should just send jobs in and each thread should have a priority queue. I don't know sounds dumb to me. then you could by random luck have threads with lots of jobs that need to be prioritized to be done and other threads stuck hanging waiting for previous jobs / the other threads. no thanks
so clearly the solution is to rewrite mpsc but allow prioritization when a thread goes in to ask for a job to do
since my jobs are intended to start other jobs, it makes sense to have no actual upper bound limit to the number of jobs in the queue but to favour doing jobs that won't start new jobs to lower the RAM and compute necessary to juggle all this
hope this is the actual problem. cuz the code works for like 200 jobs spawning 500 jobs each, which is 100k jobs total
but it stalls to a halt doing 8300 jobs spawning 500 jobs each (which if I do the math -- in my tests it stalls at 320k jobs and seems the number should be 4,150,00 jobs -- yeah I think this is probably the damned problem)8 -
When you hear “Haskell performance”, what comes to your mind? I was never really interested in Haskell since I had Clojure, and I thought Haskell might be slow.
Haskell with GHC is actually as fast as C or even faster. Haskell runs right on your hardware, no VM or interpreter.
When a program is small, the performance is comparable to C. Sometimes it’s quicker, sometimes not. But when a program is large, Haskell implementation would be faster if you’re not a robot that generates perfect C code.
It’s both very high-order AND very fast. You don’t need math to code in Haskell.
Too bad there are no kewl libraries.12 -
I've been playing with code for years, but only finally started trying to make it profitable by working through making websites for cash. A friend of mine is just getting into it brand new and is really dedicated. He is going to learn fast and I'm going to be able to walk him through a lot of my mistakes to move much faster than I did.
Is it bad that my favorite part of this relationship is that I will have someone that understands me when I make fun of jQuery? -
Project I’m working on is required to be in React-Native...I’m a Swift/Obj-C developer. I wrote two lines of React code and then I have spent the last 3 hours trying to get dependencies for a single library installed to run the project again...
Tell me how React Native is a better and faster way to develop apps over native code???
This seems like a waste.11 -
Went to a hackathon and tried to use ARCore. Most painful experience of my life. There are so many issues and critical bugs that I can't even fit them all into a 5000 character rant, Google has shittier code than a highschool startup.
So instead of typing 5000 characters I'll just save you all some time. If you're forced to use ARCore, don't even try to use the AcquireCameraImageBytes or related apis for actually accessing the camera feed. Just use unity's screen capture API (draw an invisible rectangle on the whole screen, make a texture, readPixel entire rectangle). Turning off all models for 1 frame and taking a screen capture is easier, faster, and somehow more optimal than using Google's code.
Also, they released Augmented Faces on Friday. Their demo plainly doesn't work the way they intended on many devices because the list never gets populated since their engineers are dumb fucks. Just force the face mesh to always remain active and you'll instantly support all devices! You can deactivate it using your own methods but Google's doesn't work on many devices. There's an issue in their repo about this that they are plainly ignoring.
Also if you're interested I have a (working?) engine to use Object Detection for interactions within AR + a create your own adventure game demo made w/ object detection + ar on my git:
https://github.com/pshah123/...
My code is 100% crap so definitely don't use it in production but I was able to get the individual pieces working so hopefully this helps someone! Unless you're from Google, then fuck you please uninstallrant please uninstall google fuck google mv google /dev/null sudo rm google sudo kill -9 google git rm google16 -
When they decided to deprecate the old app that went back to early DOS, they decided to use VB.NET because they'd used some VBA and were familiar with it. Except they had a vague idea that C# was faster and decided to write the OpenGL code in that. Also they had some C++ code and decided to write more of it, accessed by the main program via COM.
I come in and the decision is made to integrate some third-party libs via a C++/CLI layer. On one hand screw COM, but on the other we're now using two non-standard MS C++ extensions. Then we decide we need scripting, so throw in some IronPython.
I'm the build engineer for all this, by the way. No fancy package managers since almost all the third-party dependencies are C++; a few of them are open source with our own hacks layered on top of the regular code, a few are proprietary. When I first started here you couldn't build on a fresh SVN checkout (ugh) without repeatedly building the program, copying DLLs manually, building again, ad nauseum. I finally got sick of being called in to do this process and announced that I was fixing it, which took a solid week of staring at failed compiler output.
Every so often someone wants to update that damn COM library and has to sacrifice a goat to figure out how the hell you get it to accept a new method. Maybe one day I'll do a whole rant just based on COM. -
Internal monitoring dashboard that was made in PHP4 that was really slow (even for PHP4 standards) due to doing a lot of unnecessary things.
Fully uncommented, fully undocumented elsewhere, massive fustercluck of code.
Had to change at least 300 methods in order to make is somewhat run decent (sadly, I wasn't allowed to just rewrite from scratch, which would have been a lot faster)...
Just your regular SNAFU. -
Does anyone else code really slow? I spent an entire day Friday working on one DAO (and one small help desk ticket). Nothing complicated, and I knew what I was doing the entire time. At the end of the day, I just felt like I could have written it faster, or got more done. And I was really focused on it the entire day.3
-
Management suddenly decides they wanted to see if a new process is any good and decides to load all the work on 2 people ( including me ) and keeps the deadline 5 days later ( when one person is taking a 3 day leave in this 5 days ).
In this situation, the other person involved in the process, routinely infuriates me by suggesting we fix up something within these days and not worry about readability or code quality. My argument is the POC is subject to heavy changes, so why not make it more "modifiable" from the start and not create a sphagetti which i would be left trying to fix when he goes on leave.
I would be blamed for slowing down things unnecessarily if i put forward my argument too sternly. Genuinely conflicted about whether to go on the offensive or to accept the reality and make myself uncomfortable by doing this faster.2 -
I thought my code was bad and that was why it was taking twice as long as any other group to run
No it’s just Illinois the state my group was assigned has almost 2000 more data rows to scrape compared to any other group. My code wasn’t running slow. It just had longer to run
I’ve spent 4 days trying to fucking refactor and improve my code Ignoring clean code and attempting clever code to run faster and now I need to revert back to clean code since no one else in my group would be able to understand or work on the damn file if I left it at clever
Fucking hell 😫1 -
I don't know is it me or what, but I am really trying hard to get my hands on Vim and trying to get use it for all my daily development. But I don't know why I keep comming back to vscode thinking it will be faster to complete "this one task" in vscode and I will try vim later for other once 😐
Vs code feels more easy to move around project files, working in tabs etc etc. I do try to work on vim as well just for very silly bugs or something but I really want to switch to Vim full time but not able to convince my mind for the task in my hands at that point in time.
Anybody has any advise? I would really appreciate the help on this one12 -
Built the most generic file importer.
So a customer had his SAP system giving us some 5 million barcodes in a csv which we needed to parse. But as there could be different file types and I thought the handling would always include the same steps I made them configurable through function pointers. - Did not want to make it as spooky as the rest of the code base where the function pointers were buried deep in some shared memory configs, which might even change at run time, but rather I statically used the member functions of my class. Just to poke fun on the ugly C++ syntax of member function pointers. I still shudder at the thought some poor soul now has to maintain that code.
(For the actual parsing I actually used a one liner in awk which was churning through the records in one minute which was faster than the SAP guys seemed to be accustomed to.) -
Recently I have had to help our support team handle a variety of embedded development support tickets for a product line that is quite complex in nature. It is really starting become frustrating how common it is that the so-called “developers” that are using this product are so incompetent at requesting help in a proper/sane way. It is even more frustrating that some of these schmucks start acting up and stating bullshit statements like (para-phrasing) “OMG we have a ‘big opportunity’ and a deadline to meet”, “you need to help us faster”. These are also the same guys that are like “I know you have a free SDK that does everything correctly, but I want to write my own ‘pro’ driver written in my own ‘dumbass code style’. Oh and I am not going to follow documentation and not implement required functions and make you read my god awful code snippets to find out what I what I did wrong instead of reading the docs or comparing against the SDK.”
To anyone that behaves this way...fuck you! Just stop. Stop being a developer altogether. If your “opportunity” is so important, why the fuck are you half-assing your support ticket? Why are you making it SO DAMN DIFFICULT for someone to help support you! Give as much info as possible to prove your point or provide context to the problem you are having. In the majority of these tickets the dumbasses don’t even consider that relaying the product’s firmware version is relevant information, that a Wireshark (and/or logic analyzer) capture can be very useful to provide context to the type of operation being performed. Code snippets can be nice but only if there is sufficient context. We have had to ask one guy 3 times already for the FW version...what the flipping hell is wrong with you?!
Ug...I feel sorry for Support/FAEs sometimes dealing with customer bullshit drives me nuts and its a shame this stuff happens in a sector that should know better...Please don’t be like these devs. If you make a half-assed request it is only reasonable to expect a half-assed response and nothing more. -
My main project in work is making program in C# (right now .NET Standard) that can read scans of invoices that are sent from contractors. I'm working on it for almost two years now (with breaks and only halftime because university). Alone. And for last two months I've been redesigning, refactoring and making whole app "better", using experience and knowledge gained in the last two years.
Obviously my boss wasn't happy with that but I got him to accept it, promising that it'll make it work faster, expansion will be simpler and I'll make core as a separate library that can be used anywhere, not only in the JobRouter ecosystem.
And so I reworked most of the code, made it cleaner, I hope, and a tad quicker. And I was happy with it while testing on a package of invoices. Today I made first integration with customer's JobRouter.
The results aren't any better - in some cases they are much worse. Especially while searching for invoice entries, which can be in any shape or form and on any of document's pages.
I guess, being a Junior, I wasn't really up to the task. I'm sick of working on a "guessing" program that has to work with every invoice template users can imagine. I'm sick of not getting any recognition for what I did good. And I'm sick of constantly being pushed to make it work better when I just don't have any more ideas or my skills are just lacking.
To be honest, I don't know what to do. I'll probably have to work on making it search the data better. But it's not trivial to just look at the code and see errors. Iterating on the code while working with different invoices worked for a bit in older versions, but I reached the point where changes made to make one invoice be read better, made another one worse.
Its like on those GIFs where you squish one bug to make another two appear.
So yeah, I'm currently really doubting my career, skills and intelligence.8 -
It's finally weekend and I spent all night coding. Now I want to code more because I have so many ideas but my fucking eyes hurt!! C'mon eyes... recover faster!!5
-
is it better to work on a project every day even when i dont feel like it but then do like 80% of the work for the next milestone with a shitty code (done alot faster)
or
work on a project when i have the will to work on it but then do 30% of the work for the next milestone with a clean code? (done alot slower)3 -
I love coding, but there are some days when it drives me absolutely crazy. Like when I spend hours trying to debug a single line of code, only to realize that the problem was actually something completely different.
Or when I'm working on a project and I'm pretty sure I know what I'm doing, only to discover that there's a better, faster, and more elegant way to do it. It's like my entire codebase is taunting me: "You thought you were good at this, didn't you?"
But you know what? Despite all of the frustrations and setbacks, I keep coming back to coding. Because there's nothing quite like the feeling of finally getting that piece of code to work, or seeing your project come together in a way that you never thought possible.
Coding can be a rollercoaster of emotions, but I wouldn't have it any other way. Here's to all the developers out there who know what it's like to ride that coding rollercoaster, and who keep coming back for more.1 -
[CONCEITED RANT]
I'm frustrated than I'm better tha 99% programmers I ever worked with.
Yes, it might sound so conceited.
I Work mainly with C#/.NET Ecosystem as fullstack dev (so also sql, backend, frontend etc), but I'm also forced to use that abhorrent horror that is js and angular.
I write readable code, I write easy code that works and rarely, RARELY causes any problem, The only fancy stuff I do is using new language features that come up with new C# versions, that in latest version were mostly syntactic sugar to make code shorter/more readable/easier.
People I have ever worked with (lot of) mostly try to overdo, overengineer, overcomplicate code, subdivide into methods when not needed fragmenting code and putting tons of variables.
People only needed me to explain my code when the codebase was huge (200K+ lines mostly written by me) of big so they don't have to spend hours to understand what's going on, or, if the customer requested a new technology to explain such new technology so they don't have to study it (which is perfectly understandable). (for example it happened that I was forced to use Devexpress package because they wanted to port a huge application from .NET 4.5 to .NET 8 and rewriting the whole devexpress logic had a HUGE impact on costs so I explained thoroughly and supported during developement because they didn't knew devexpress).
I don't write genius code or clevel tricks and patterns. My code works, doesn't create memory leaks or slowness and mostly works when doing unit tests at first run. Of course I also put bugs and everything, but that's part of the process.
THe point is that other people makes unreadable code, and when they pass code around you hear rising chaos, people cursing "WTF this even means, why he put that here, what the heck this is even supposed to do", you got the drill. And this happens when I read everyone code too.
But it doesn't happens the opposite. My code is often readable because I do code triple backflips only on personal projects because I don't have to explain anyone and I can learn new things and new coding styles.
Instead, people want to impress at work, and this results in unintelligible, chaotic code, full of bugs and that people can't read. They want to mix in the coolest technologies because they feel their virtual penis growing to showoff that they are latest bleeding edge technology experts and all.
They want to experiment on business code at the expense of all the other poor devils who will have to manage it.
Heck, I even worked with a few Microsoft MVPs.
Those are deadly. They're superfast code throughput people that combine lot of stuff.
THen they leave at you the problems once they leave.
This MVP guy on a big project for paperworks digital acquisiton for a big company did this huge project I got called to work in, which consited in a backend and a frontend web portal, and pushed at all costs to put in the middle another CDN web project and another Identity Server project to both do Caching with the cdn "to make it faster" and identity server for SSO (Single sign on).
We had to deal with gruesome work to deal with browser poor caching management and when he left, the SSO server started to loop after authentication at random intervals and I had to solve that stuff he put in with days of debugging that nasty stuff he did.
People definitely can't code, except me.
They have this "first of the class syndrome" which goes to the extent that their skill allows them to and try to do code backflips when they can't even do code pushups, to put them in a physical exercise parallelism.
And most people is like this. They will deny and won't admit, they believe they're good at it, but in reality they aren't.
There is some genius out there that does revoluitionary code and maybe needs to do horrible code to do amazing stuff, and that's ok. And there is also few people like me, with which you can work and produce great stuff.
I found one colleague like this and we had a $800.000 (yes, 800k) project in .NET Technology, which consisted in the renewal of 56 webservices and 3 web portals and 2 Winforms applications for our country main railway transport system. We worked in 2 on it, with a PM from the railway company.
It was estimated 14 months of work and we took 11 and all was working wonders. We had ton of fun doing it because also their PM was a cool guy and we did an awesome project and codebase was a jewel. The difficult thing you couldn't grasp if you read the code is if you don't know how railway systems work and that's the only difficult thing.
Sight, there people is macking me sick of this job11 -
Hire are a few tips to up productivity on development which has worked for me:
1) Use a system of at least 16gb ram when writing codes that requires compilation to run.
2) Test your code at most 3 times within an hour. This will combat the bad habit of practically checking changes on every new block you write.
3) Use internet modem in place of mobile hotspot and keep mobile data switched off. This will combat interruptions from your IM contacts and temptations to check your WA status update when working.
4) Implementation before optimisation... This is really important. It's tempting to rewrite a whole block even when other task are pending. If it works just leave it as is and move on to the next bull to kill, you can come back later to optimise.
5) Understand that no language is the best. Sometimes folks claim that PHP is faster than python. Okay I say but let's place a bet and I'll write a python code 10 times faster than your PHP on holiday. Focus more on your skill-set than the language else you'd find yourself switching frameworks more than necessary.
6) Check for existing code before writing an implementation from scratch... I bet you 50 bucks to your 10 someone already wrote that.
7) If it fails the first and then the second time... Don't try the third, check on StackOverflow for similar challenge.
8) When working with testers always ask for reproducible steps... Don't just start fixing bugs because sometimes their explanation looks like a bug when other times it's not and you can end up fixing what's never there.
9) If you're a tester always ask for explanations from the dev before calling a bug... It will save both your time and everybody's.
10) Don't be adamant to switching IDE... VSCode is much productive than Notepad++. Just give it a try an see for yourself.
My 10 cents.1 -
Its been a month since i opened Android studio, and am feeling so weird doing the things now i do.
I had been learning and developing apps for almost an year( not exactly any big apps, but kinda in a learning phase, making prototypes, learning about the internal workings, reading blogs/articles,etc ) . Although i did got a few internships and earned some money, i didn't felt any good calling myself an Android developer with insufficient skills.
Frustrated, i just thought of taking a break, as my college was also giving a pressure of its own. Meanwhile i got a python data analytics scholarship from some 1 day competition at clg., So last September and October have pretty much gone into that. Python being an old friend seems like a pretty fun thing to do, and am totally into it (for now)
But java seems to let go of my hands even faster. Even though i used to waste much of my time reading how stuff works or checking out ui/animations , i did coded some stuff and made cool prototypes. i had a feeling that one day this all learning will be over and i will be able to code apps with ease... But now, it feels am going back to stage Zero. I feel as if i can't even write a hello world app.
I hope my poor little codebase is documented well enough to accept me back.
Don't leave me, java . We are on a break :'''( -
Having a lot of bad experiences while working as intern in startups and about to join a MNC, i wanted to share my work life balance and technical demands that i expect from a company. These are going to be my list of checkpoints that i look forward , let me know which of them are way too unrealistic. also add some of yours if i missed anything :
Work life balance demands ( As a fresher, i am just looking forward for 1a, 2a and 8, but as my experience and expertise grows, i am looking forward for all 10. Would i be right to expect them? ):
1a 8 hr/day. 1b 9h/day
2a 5days/week. 2b 6 days/week
3 work from home (if am not working on something that requires my office presence)
4 get out of office whenever i feel like i am done for the day
5 near to home/ office cab service
6 office food/gym service
7 mac book for working
8 2-4 paid leaves/month
9 paid overtime/work on a holiday
10.. visa sponsorship if outside india
Tech Demands (most of them would be gone when i am ready to loose my "fresher " tag, but during my time in internship, training i always wished if things happened this way):
1. I want to work as a fresher first, and fresher means a guy who will be doing more non tech works at first than going straight for code. For eg, if someone hires me in the app dev team, my first week task should be documenting the whole app code / piece of it and making the test cases, so that i can understand the environment/ the knowledge needed to work on it
2. Again before coding the real meaningful stuff for the main product, i feel i should be made to prepare for the libraries ,frameworks,etc used in the product. For eg if i don't know how a particular library ( say data binding) used in the app, i should be asked to make a mini project in 1-2 days using all the important aspects of data binding used in the project, to learn about it. The number of mini tasks and time to complete them should be given adequately , as it is only going to benefit the company once am proficient in that tech
3. Be specific in your tasks for the fresher. You don't want a half knowledgeable fresher/intern think on its own diverging from your main vision and coding it wrong. And the fresher is definitely not wrong for doing so , if you were vague on the first place.
4. most important. even when am saying am proficient , don't just take my word for it. FUCKIN REVIEW MY CODE!! Personally, I am a person who does a lot of testing on his code. Once i gave it to you, i believe that it has no possible issues and it would work in all possible cases. But if it isn't working then you should sit with me and we 2 should be looking, disccussing and debugging code, and not just me looking at the code repeatedly.
4. Don't be too hard on fresher for not doing it right. Sometimes the fresher might haven't researched so much , or you didn't told him the exact instructions but that doesn't mean you have the right to humiliate him or pressurize him
5. Let multiple people work on a same project. Sometimes its just not possible but whenever it is, as a senior one must let multiple freshers work on the same project. This gives a sense of mutual understanding and responsibility to them, they learn how to collaborate. Plus it reduces the burden/stress on a single guy and you will be eventually getting a better product faster
Am i wrong to demand those things? Would any company ever provide a learning and working environment the way i fantasize?3 -
https://appleinsider.com/articles/...
Tl;Dr This guy thinks apple is poised to switch the Macs to a custom arm based chip over x86! He's now on my idiot list.
I paraphrase:
"They've made a custom GPU", great! That's as helpful as "The iPad is a computer now", and guess what Arm Mali GPUs exist! Just because they made their own GPU doesn't make it suitable for desktop graphics (or ML)!
"They released compilation tools right when they released their new platform, so developers could compile for it right away", who would be an idiot not too...
"Because Android apps run in so many platforms, it's not optimized for any. But apple can optimize their apps for a sepesific users device", what!? What did I miss? What do you optimize? Sure, you can optimize this, you can optimize that... But the reason why IOS software is "optimized", and runs better/smoother (only on the newest devices of course) is because it's a closed loop, proprietary system (quality control), and because they happen to have done a better job writing some of their code (yes Android desperately needs optimization in numerous places...).
I could go on... "WinTel's market share has lowly plataued", "tHeY iNtRoDuCeD a FiElD pRoGrAmMaBlE aRrAy"
For apple to switch Macs to arm would be a horrible idea, face it: arm is slower than x86, and was never meant to be faster, it was meant to be for mobile usage, a good power to Wh ratio favoring the Wh side.
Stupid idiot.19 -
I wrote my first proper promise today
I'm building a State-driven, ajax fed Order/Invoice creation UI which Sales Reps use to place purchases for customers over the phone. The backend is a mutated PHP OSCommerce catalog which I've been making strides in refactoring towards OOP/eliminating spahgetti code and the need for a massive bootstrapper file which includes a ton of nonsense (I started by isolating the session and several crucial classes dealing with currency, language and the cart)
I'm using raw JS and jquery with copious reorganization.
I like state driven design, so I write all my data objects as classes using a base class with a simple attribute setter, and then extend the class and define it's attributes as an array which is passed to the parent setter in the construct.
I have also populateFromJson method in the parent class which allows me to match the attribute names to database fields in the backend which returns via ajax.
I achieve the state tracking by placing these objects into an array which underscore.js Observe watches, and that triggers methods to update the DOM or other objects.
Sure, I could do this in react but
1) It's in an admin area where the sales reps using it have to use edge/chrome/Firefox
2) I'm still climbing the react learning curve, so I can rapid prototype in jquery faster instead of getting hung up on something I don't understand
3) said admin area already uses jquery anyway
4) I like a challenge
Implementing promises is quickly turning messy jquery ajax calls into neat organized promise based operations that fit into my state tracking paradigm, so all jquery is responsible for is user interaction events.
The big flaw I want to address is that I'm still making html elements as JS strings to generate inputs/fields into the pseudo-forms.
Can anyone point me in the direction of a library or practice that allows me to generate Dom elements in a template-style manner.4 -
devRanters!
Do any of you find that you can type the solution faster than GitHub Copilot recommends?
That's how you know you're senior 😏
Also, on a serious note, does it only support JavaScript / TypeScript? Didn't really take time to investigate.
I thought there was also a feature you could tell it what to code and it would try to write a solution. Haven't really seen how to do that yet.7 -
Oh for fucks sake! Why so we have threading when we synchronize EVERYTHING with a singleton... and when I actually show you that even unthreaded spaghetti code runs 40% faster under real life conditions than your shit you just brush it of because I'm still at university and don't know what I'm talking about... And not because changing it would require money or time we don't have... no, just because I “lack the necessary experience with such things.“
-
What if some one very cruel programmer programmed a programmer and designer AI that can generate code 700X faster, generate flawless and reliable code / design in any and Every programming language that could replace 100% of the programmers in the world?
What if he give it for free?
And companies started to fire all programmers and designers to download the free AI and use it and it was better than every programmer in the world?
What if the AI was able to code a whole Office suit and all Adobe products in just 3 seconds?
What if it was very intelligent that no one needs to hire a programmer ?
What if any one started to create their own app using it and replace programmers like car replaced horse?
What do you feel about it?
Do you wish if it happen?
Or not?
Is it your dream?
Or nightmare?17 -
Searching in Confluence sucks so bad it was faster for me to check out a branch of my code to find a url in a comment for a particular user story than it was to type the query, go through pages of unrelated results only to give up and hope I got the details right.
-
Not a horror. I'm rewriting services.
It started as a help request. I was asked to help with completing a service dealing with push notifications which was a research prototype. It was suggested to keep core part of it, but it was so awful that I just removed all files and wrote the service from scratch.
The second service had been developed for more than a year by a junior and then by our manager who wanted to complete it as fast as possible, without taking care of code quality. Then I was asked to take over the project and after some time I agreed with one condition: I'll have 1 month on takeover. But when I looked at the code, it became clear that it's much faster and better to rewrite everything except API and database than to takeover existing code.
The third service dealing with file exchange was working, but the junior who wrote it advised to rewrite it because it was a very simple service. So, I initiated rewriting, designed a new API and reviewed the final result.
And now I'm dealing with the fourth one. It was developed in my team but not under control. Now, when I "inherited" this complicated project, I decided to rewrite it because it should be simple, but it doesn't. It features reflection, layers inside layers, strange namespaces, strange solution structure. And that's after months of refactorings and improvements. So, wish me luck because I want to keep part of the infrastructure, but I don't know if it's possible. -
TL;DR I just recently started my apprenticeship, it's horrible so far, I want to quit, but don't know what to do next...
Okay, first of all, hey there! My name is Cave and I haven't been on here for a while, so I hope the majority of you is doing rather okay. I'm programming for 6 years now, have some work experience already, since I used to volunteer for a company for half a year, in which I discovered my love for integrations and stuff. These background information will probably be necessary to understand my agony in full extend.
So, okay, this is about my apprenticeship. Generally speaking, I was expecting to work, and to learn something, gaining experience. So far, it only involved me, reading through horrible code, fixing and replacing stuff for them, I didn't learn a thing yet, and we are already a month in.
When I said the code is horrible, well, it is the worst I have ever seen since I started programming. Little documentation - if any -, everywhere you look there is deprecated code, which may or may not been commented out, often loops or simply methods seem to be foreign for them, as the code is cluttered with copy paste code everywhere and on top of that all, the code is slow as heck, like wtf.
I spent my past month with reading their code, trying to understand what most of this nonsense is for, and then just deleting and rewriting it entirely. My code suddenly is only 5% or their size and about 1000 times faster. Did I mention I am new to this programming language yet? That I have absolutely no experience in that programming language? Because well I am new and don't have any experience, yet, I have little to no struggle doing it better.
Okay, so, imagine, you started programming like 20 years ago, you were able to found your own business, you are getting paid a decent amount of money, sounds alright, right? Here comes the twist: you have been neglecting every advancement made in developing software for the past 20 years, yup, that's what it feels like to work here.
At this point I don't even know, like is this normal? Did git, VSCode and co. spoil me? Am I supposed to use ancient software with ancient programming languages to make my life hell? Is programming supposed to be like this? I have no clue, you tell me, I always thought I was doing stuff right.
Well, this company is not using git, infact, they have every of their project in a single folder and deleting it by accident is not that hard, I almost did once, that was scary. I started out working locally, just copying files, so shit like that won't happen, they told me to work directly in the source. They said it's fine, that's why you can see 20 copies of the folder, in the same folder... Yes, right, whatever.
I work using a remote desktop, the server I work on is Windows server 2008, you want to make icons using gimp? Too bad, Gimp doesn't support windows server 2008, I don't think anything does anymore, at least I haven't found anything, lol.
They asked me to integrate Google Maps into their projects, I thought it is gonna be fun, well, turns out their software uses internet explorer 9.. and Google maps api does not support internet explorer 9... I ended up somehow installing CEF3 on that shit and wrote an API for it in JS. Writing the API was actually kind of fun, but integrating it in their software sucked and they told me I will never integrate stuff ever again, since they usually don't do that. I mean, they don't have a Backend as far as I can tell, it looks like stuff directly connects with their database, so I believe them, but you know... I love integrating stuff..
So at this point you might be thinking, then why don't you just quit? Well I would, definitely. I'm lucky that till December I can quit without prior notice, just need a resignation as far as I can tell, but when I quit, what do I do next? Like, I volunteered for a company for half a year and I'd argue I did a good job, but with this apprenticeship it only adds up to about 7 months of actual work experience. Would anybody hire somebody with this much actual work experience? I also consider doing freelancing, making a living out of just integrating stuff, but would people pay for that? And then again, would they hire somebody with this much experience? I don't want to quit without a plan on what to do next, but I have no clue.
Am I just spoiled, is programming really just like that, using ancient tools and stuff? Let me know. Advice is welcomed as well, because I'm at a loss. Thanks for reading.10 -
Everytime i am forced to code with Visual studio I cant really remember why I hate it so much. But when I wait for the first autocompletion it comes back at me: Intellisense you useless piece of crap! I am faster coding in notepad looking up shit on the internet for 'autocompletion'....
-
Critical Tips to Learn Programming Faster Sample:
Be comfortable with basics
The mistake which many aspiring students make is to start in a rush and skip the basics of programming and its fundamentals. They tend to start from the comparatively advanced topics.
This tends to work in many sectors and fields of Technology, but in the world of programming, having a deep knowledge of the basic principles of coding and programming is a must. If you are taking a class through a tutor and you feel that they are going too fast for your understanding, you need to be firm and clear and tell them to go slowly, so that you can also be on the same page like everyone else
Most often than not, many people tend to struggle when they reach a higher level with a feeling of getting lost, then they feel the need to fall back and go through basics, which is time-consuming. Learning basics well is the key to be fast and accurate in programming.
Practice to code by hand.
This may sound strange to some of you. Why write a code by hand when the actual work is supposed to be done on a computer? There are some reasons for this.
One reason being, when you were to be called for an interview for a programming job, the technical evaluation will include a hand-coding round to assess your programming skills. It makes sense as experts have researched and found that coding by hand is the best way to learn how to program.
Be brave and fiddle with codes
Most of us try to stick to the line of instructions given to us by our seniors, but it is extremely important to think out of the box and fiddle around with codes. That way, you will learn how the results get altered with the changes in the code.
Don't be over-ambitious and change the whole code. It takes experience to reach that level. This will give you enormous confidence in your skillset
Reach out for guidance
Seeking help from professionals is never looked down upon. Your fellow mates will likely not feel a hitch while sharing their knowledge with you. They also have been in your position at some point in their career and help will be forthcoming.
You may need professional help in understanding the program, bugs in the program and how to debug it. Sometimes other people can identify the bug instantly, which may have escaped your attention. Don't be shy and think that they'll make of you. It's always a team effort. Be comfortable around your colleagues.
Don’t Burn-out
You must have seen people burning the midnight oil and not coming to a conclusion, hence being reported by the testing team or the client.
These are common occurrences in the IT Industry. It is really important to conserve energy and take regular breaks while learning or working. It improves concentration and may help you see solutions faster. It's a proven fact that taking a break while working helps with better results and productivity. To be a better programmer, you need to be well rested and have an active mind.
Go Online
It's a common misconception that learning how to program will take a lot of money, which is not true. There are plenty of online college courses designed for beginner students and programmers. Many free courses are also available online to help you become a better programmer. Websites like Udemy and programming hub is beneficial if you want to improve your skills.
There are free courses available for everything from [HTML](https://bitdegree.org/learn/...) to CSS. You can use these free courses to get a piece of good basic knowledge. After cementing your skills, you can go for complex paid courses.
Read Relevant Material
One should never stop acquiring knowledge. This could be an extension of the last point, but it is in a different context. The idea is to boost your knowledge about the domain you're working on.
In real-life situations, the client for which you're writing a program for possesses complete knowledge of their business, how it works, but they don't know how to write a code for some specific program and vice versa.
So, it is crucial to keep yourself updated about the recent trends and advancements. It is beneficial to know about the business for which you're working. Read relevant material online, read books and articles to keep yourself up-to-date.
Never stop practicing
The saying “practice makes perfect” holds no matter what profession you are in. One should never stop practicing, it's a path to success. In programming, it gets even more critical to practice, since your exposure to programming starts with books and courses you take. Real work is done hands-on, you must spend time writing codes by hand and practicing them on your system to get familiar with the interface and workflow.
Search for mock projects online or make your model projects to practice coding and attentively commit to it. Things will start to come in the structure after some time.4 -
Anybody like to rip up CTF (or similar)? I've honestly never done a CTF before, I'd like to give jt a shot. I'll get my ass handed to me because I'm not back up to par on OpSec yet, but I adapt well and when I get into a nice groove I can make shit happen! (I like to think so, anyways haha!!)
I've been in full on dev mode lately and haven't had any time to Hulk Smash for a while... I went to fire up a new Kali live USB today and I couldn't run through the updates like I always have- they changed sooo much and I was pissed because I didn't have ethernet with me. That'll be another day for sure, but I still have my machine with Manjaro armed to the nutsack and back with the BlackArch rep. I def could use a break from the chaos, and getting my ass handed right to me sounds like an awesome time because learning is my favorite thing next to a possible chance at getting to destroy shit.
It's weird, because I'm sort of a n00b but also at the same time I've had computers ripped apart/jammed in my face since every day since I was 9 and Y2K was about to hit the fan lmao!! My hardware/network/layering knowledge is fuckin mint titties, I just can't code like a fuckin madman on the fly. I don't have a "primary" language, because I've been having to work with little bits of several languages for extended periods of time... I can at least find my way around all the dox without much of an issue and have no issue solving the probs I come across which is neat, but until the day comes where I can fuck a gaping hole through my keyboard on the fly like George Hotz during one of his lazy Sunday OpenCV SLAM/Python code streams all jacked up on Herba Mate hahahahaha!!!!
The dude uses fucking VIM and codes faster than anyone I've ever seen on levels of science/math so challenging I almost shit myself inside out when I catch one!!!! The level of respect I have for all my fellow red pills in here is as high as it gets, and that's one of the best parts about being a code junkie- sometimes ya get to cross paths with beastly, out of this world people that teach you so much without even having to explain shit.
If anyone's down, or maybe has some resources for me to check out so I can get my chops up let's make it happen -
Relatively often the OpenLDAP server (slapd) behaves a bit strange.
While it is little bit slow (I didn't do a benchmark but Active Directory seemed to be a bit faster but has other quirks is Windows only) with a small amount of users it's fine. slapd is the reference implementation of the LDAP protocol and I didn't expect it to be much better.
Some years ago slapd migrated to a different configuration style - instead of a configuration file and a required restart after every change made, it now uses an additional database for "live" configuration which also allows the deployment of multiple servers with the same configuration (I guess this is nice for larger setups). Many documentations online do not reflect the new configuration and so using the new configuration style requires some knowledge of LDAP itself.
It is possible to revert to the old file based method but the possibility might be removed by any future version - and restarts may take a little bit longer. So I guess, don't do that?
To access the configuration over the network (only using the command line on the server to edit the configuration is sometimes a bit... annoying) an additional internal user has to be created in the configuration database (while working on the local machine as root you are authenticated over a unix domain socket). I mean, I had to creat an administration user during the installation of the service but apparently this only for the main database...
The password in the configuration can be hashed as usual - but strangely it does only accept hashes of some passwords (a hashed version of "123456" is accepted but not hashes of different password, I mean what the...?) so I have to use a single plaintext password... (secure password hashing works for normal user and normal admin accounts).
But even worse are the default logging options: By default (atleast on Debian) the log level is set to DEBUG. Additionally if slapd detects optimization opportunities it writes them to the logs - at least once per connection, if not per query. Together with an application that did alot of connections and queries (this was not intendet and got fixed later) THIS RESULTED IN 32 GB LOG FILES IN ≤ 24 HOURS! - enough to fill up the disk and to crash other services (lessons learned: add more monitoring, monitoring, and monitoring and /var/log should be an extra partition). I mean logging optimization hints is certainly nice - it runs faster now (again, I did not do any benchmarks) - but ther verbosity was way too high.
The worst parts are the error messages: When entering a query string with a syntax errors, slapd returns the error code 80 without any additional text - the documentation reveals SO MUCH BETTER meaning: "other error", THIS IS SO HELPFULL... In the end I was able to find the reason why the input was rejected but in my experience the most error messages are little bit more precise.2 -
Me: Look boss i refactor application, now it is way faster then previous one.
Boss: Cool, but who wrote the previous code?
Me: OH! well me. -
Julia sucks!
It has similar syntax to Python and it's messing with my Python's knowledge.
Thanks to my Image processing subject's professor who preferred Julia over Python, because it's faster! and then he uses a package called Pluto (similar to Jupyter) which makes running Julia code super frustrating.1 -
It's always a matter of much is there to do and in what language...
There is the IDE-Zone, which is dominated by IntelliJ (CLion be praised when you do Rust or C++) for large stuff and heavy refactorings.
Always disputted by VS Code with synced settings. It's nice and comfy and has every imaginable language supported good enough, especially when its smaller change in native code or web/scripting stuff.
Then there is the "small changes" space, where Vim and VS Code struggle whos faster or which way sticks better in my brain...
might be you SCP stuff down from a box and edit it to re-upload, or you use the ever-present vi (no "m" unfortunately)
sometimes things are more easy for multi-caret editing (Ctrl-D or Alt-J), and sometimes you just want to ":%s/foo/bar/g" in vim.
I am sure that each of these things are perfectly possible in each of the editors, but there is just reflexes in my editor choices.
I try to stay flexible and discover strenghts of each one of my weapon of choice and did change the favorites. (Atom, Brackets, Eclipse, Netbeans, ...)
However there are some things I tried often and they are simply not working for me...
might for you. I don't care. and I'll just use some space to piss people off, because this is supposed to be a rant:
nano just feels wrong, emacs is pestilence from satan that was meant for tentacles instead of fingers, sublime does cost money but should not, gives me a constant guilty feeling (and I don't like that) that, and all the editors from various desktop environments are wasted developer ressources. -
So apparently my code went to prod more or less all right. Phew, the deadline was this week-end. This project have been sitting there for month, they gave me the technical requirement and never bothered to ask the stakeholders about it. When the contract went in, they started to freak out it wasn't usable.
The thing is, this project had way more moving part and trying to threat video in the frontend is not the easiest. But now is REFACTOR TIME.
I dream of getting rid of the browser video api (too flaky), download the bitmap directly and render it in requestAnimationFrame. I call it just-in-time rendering. I think i'd need to put a decoder in aws, I did it already with ffmpeg. I could not manage to put it in streaming mode though, so it was still a bit slow, but i could decode, write and re-encode faster than the video player speed.
What do you lads think? Doable or not? I at least need to general tidy up (this codebase have grown organically without any fucking direction from above, like this project took all my time on the technical side, I did not have time to run after people to get specs), centralizing state, improve monorepo and tooling, perfs,...
Hopefully they understood i cant keep adding whatever feature they want today. -
Just got 3 Enki invites.
Use code: BBOHA441
If you don't know what Enki is, check out their website: https://enki.com/
As I was faster yesterday, I want to inform @futoricky and @wubstepper.
Hope you guys can catch an invite.
Text stolen from @szenjanos :D8 -
When you use Cloud9 to make a project go faster by coding at the same time with your partner and you spent time on Ctrl+X + Ctrl+V on all the code so that it says that you did that code and none of it was done by your patner XD1
-
Is it a good idea to code my Android app keeping sqlite in mind before actually migrating to a noSQL version?
The primary reason for doing this is not having to deal with APIs or server side coding and also faster testing and prototype development.
Any ideas or suggestions?7 -
Can anyone tell me what bun does and what’s the hype about, like if I have a vue project does bun build it for me and make it faster? Or it’s just for backend code optimization4
-
One time a has some task to optimize an images on mobile application so it can swipe on list without lags (to this time it works fine, there was microseconds lags, but it was my code and I don't like to leave like this). I takes me a long time trying a lot of solutions but everytime was the same. I leave this task because I thought it can't be done. Everyday I was thinking about it, one time I have even a dream about programing XD. One morning I wake up and it came to me, one simple solution (I think there was 2-3 lines of code to change). I go to computer and try it, it works, it was a weight off my mind. Of course I go to boss say now we have faster, better etc. and he also was happy :)1
-
OpenSource is fun they said. I being a bored teen thought, ah, another chance to experiment. Discover something new. Now I am into piracy, movies, music, software. If I can get it for free I ain't paying for it. So I went on to GitHub to see what exciting new Repos I could contribute to. I hate already implemented plenty of algorithms in GO for GitHub.com/TheAlgorithms so I was looking something more practical, more beneficial to society. Then I saw it, the perfect repo, not too complex and not amateur. SpotDL/spotify-downloader for downloading songs from Spotify, a grey area coz it's technically piracy. Well not from Spotify, we fetch the info from the Spotify API and search for the songs on YouTubeMusic. They were just about to release v3, a complete rewrite of the codebase stressing code readability and stuff. I spend about a day studying the codebase, trying to findout just where I could make my contribution. I can see outright that there's a huge problem with implementation.
First of all the script spawns 4 processes for downloading songs though you might be downloading only one song. Which means for everytime you run the script you have to wait for 4 other processes to be spawned before any downloading can happen. Sure this is faster when you are downloading more than like 4 songs, but it's actually slower when downloading a single song. But I ignored that coz I assumed that most users download playlists and albums. Anyway we talked with the like lead developer and he was all like, make those PRs anytime you feel like. So I made a really minor first contribution.
I introduced download from Spotify URI functionality, modified like 10 lines of code. I was half expecting that the PR would be merged within hours at most 24 hours coz of how minor of a contribution it was, 5 days in it was pending. So I tagged the lead Dev and he was all appreciative of the PR, calling it real 'clean code' and stuff. 3 more days, the PR is still not merged. I have now stacked 4 more commits to the same PR, I tag the dev and he's like he's waiting to see if my 'feature' will get atleast 10 upvotes so that it can be merged, he links an issue. I go to the issue and my feature is not there, So 11 days after I made my PR I have to write a comment explaining the 'feature' introduced in my PR and then wait for 10 upvotes.
I was like f**k this, I'll just develop on my fork if you want the features on my fork, you will make your own PR! I am so done with OpenSource, development is slow. I have no idea how you guys do it. I can't handle development where I don't have write access.6 -
The things that make me wanna hate React Native is that the project folder becomes so BIG, makes it so hard to remove the whole project folder, including node_modules.
I really hate Dart but liking Flutter only because the project folder - along with the necessary code gets created pretty faster than React Native. On the other hand, React Native takes ages to load all the node_modules.
So, I'm asking the experts here, who have worked in both frameworks, should I leave RN and go for Flutter?
Cause, I don't wanna waste a handful of time every time just to create a RN project.
If I should stick with RN, please tell me a way so that I don't have to waste the time just to create a RN project.
Thanks3 -
i thought whiteboarding turning into leetcode mediums or harder correctly in 20 minutes or less was bad
now codesignal is fucking us over, tried my first one without researching any of the code score shit
anybody have tips for gaming the system there? i heard claims that speed trumps correctness for their point system (e.g. faster but not passing for all test cases may score higher than slower but all test cases pass) additionally code cleanliness/readability isn't weighed as heavily as the other factors
and to do problems individually to completion further rather than spreading yourself out across multiple problems in an exam
wont deny im still a salty scrub at the end of the day -
I kind of feel like I type faster when I use Windows than Linux.
Don't know whether it is because I type code on Linux and !code on Windows1 -
Had to refractor and abstract some code into an angular 2 component so it can be reused by another. Well I could have just copied and pasted the code from component 1 to 2, that would have been a lot more faster than making this piece of code separate. The later is better, removes code duplicate and your code reads better.
-
Hey just release UpStamps (https://www.upstamps.com/).
UpStamps is a Feature Flag Management Platform to separate code from different environments and projects, this helps teams and developers deploy faster with less risk.
I want to know what you think and feedback is appreciated.5 -
I was thinking of learning touch typing, but then I read that you only spend 10-20% of the time actually writing code and the rest of the time thinking.
So I decided to learn to think faster...