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 - "it was good code"
-
I worked with a good dev at one of my previous jobs, but one of his faults was that he was a bit scattered and would sometimes forget things.
The story goes that one day we had this massive bug on our web app and we had a large portion of our dev team trying to figure it out. We thought we narrowed down the issue to a very specific part of the code, but something weird happened. No matter how often we looked at the piece of code where we all knew the problem had to be, no one could see any problem with it. And there want anything close to explaining how we could be seeing the issue we were in production.
We spent hours going through this. It was driving everyone crazy. All of a sudden, my co-worker (one referenced above) gasps “oh shit.” And we’re all like, what’s up? He proceeds to tell us that he thinks he might have been testing a line of code on one of our prod servers and left it in there by accident and never committed it into the actual codebase. Just to explain this - we had a great deploy process at this company but every so often a dev would need to test something quickly on a prod machine so we’d allow it as long as they did it and removed it quickly. It was meant for being for a select few tasks that required a prod server and was just going to be a single line to test something. Bad practice, but was fine because everyone had been extremely careful with it.
Until this guy came along. After he said he thought he might have left a line change in the code on a prod server, we had to manually go in to 12 web servers and check. Eventually, we found the one that had the change and finally, the issue at hand made sense. We never thought for a second that the committed code in the git repo that we were looking at would be inaccurate.
Needless to say, he was never allowed to touch code on a prod server ever again.8 -
3 years ago, when I was 12, I told my family that I started programming and that it was my passion. My mum wasn't interested too much about it, but my dad was, and he encouraged me. He told me that he wanted me to become a great programmer.
He died about one year ago, and I stopped coding because I felt bad; every time I opened my IDE I couldn't type anything.
Idk why, some weeks ago I reinstalled devRant, and, idk why (again), I instantly felt good. Maybe because I understood a lot of people had my same passion.
Two days ago, I finally wrote new lines of code.
❤ you guys.18 -
When I finished my studies, I was looking for a job and had an interview at a smallish company.
Boss: can you do C?
Me: yes, I have already done some stuff in C.
Boss: I mean, are you really good in C?
Me, growing suspicious: well yes I already have been using it - but anyway, there's also the project documentation for looking up, right?
Boss: uhm, the code IS the documentation.
I envisioned myself being drowned in undocumented spaghetti code and wasn't really keen on that job anymore, but my following question pretty much ended the interview:
Me: oh, I see. Do you have any roadmap for getting your development to a more professional base?
His looks, priceless! He was just shocked when he realised that he had failed my interview, and that I was a fresher made it even harder to digest for him.30 -
Wholesome anti-rant.
There’s this Indian chick at work that I really, really do not get along with. Fortunately she’s on a different team so we have practically zero interactions. Her code was always decent, maybe upper junior level? but I went away fuming almost every time we talked.
However, I did a release security review today (I’m down from five/six per month to one) and read through quite a bit of her code. It was clean and easy to read with good separation, clear naming and intentions, nothing was confusing, etc. It was almost beautiful. Had I any emotions I might have shed a tear. I sent her a message and let her know :) I actually learned a better way of doing a couple of things from it.
She has grown so much as a dev.32 -
Python. Changed a function to return a tuple instead of one value in some database code. Tests pass, gets deployed, everything works. End of the month comes. Suddenly, we get a report that we're draining people's bank accounts and credit cards.
It turns out there was an untested bit of code inside the billing process that used this function. It used the function that was changed. To make matters worse, when the exception was thrown, the billing had already completed successfully, and due to another unrelated bug it would retry despite this.
So, needless to say, type safety and good unit tests are things I prioritize nowadays.7 -
Me 6 months ago: "This is fucking genius. Beauutiful. Look at that code. See how I did this? Wow, I love it. Fuck I'm good"
Me Now: " What. the. ffuck? Wtf is this? What was I thinking? Goddamn. "
*reduces 3 methods and 37 lines to 2 methods and 8 lines*
Well at least it shows I'm still learning.3 -
You start new job and take over huge codebase without tests and documentation.
It turns out programming language is custom language made by previous developer who was the only one maintaining project.
There is no source version control.
Language runs in vm developed in Fortran.
No one cared to this day cause everything was working.
Project is critical for multi billion dollar corporation that sells medical equipment that keep people alive.
You can’t test your code on real devices only on virtual ones that were made using same custom language but you can’t find source code for it.
Previous developer accidentally died before you were hired.
You signed contract with penalties that will ruin your life.
Your first task is to add “small” feature.
Good luck !12 -
A guy who doesn't work on our project anymore, but still checks on us regularly just did this:
- reported a bug
- started explaining what's causing the issue
- realised the problem was in a piece of code written by him before
- fixed his own mistake, committed it and created a pull request
We all had a good laugh.6 -
TLDR: I wrote one of my firsts codes to help my father. Was really excited after it worked, nobody cared. F*ck them (not really).
So my father comes and says he needs me to help making a simple presentation. Just a title and slides with images. It seemed to be an easy task so I'm like "sure, why not?". So I told him to email the images and I would have the presentation made in no time. The next day I recieve like 30 mails containing from 4 to 10 photos of boats (yes, boats). I stay chill and have the brilliant idea of automating the process with python, just to learn a bit more.
I took some to read the documentation of the modules I was going to use, then write a simple code and bam! In 3 hours I have a presentation with images in it. I open it, every image was 4 times the actual slide and all of the images were randomly rotated, it still was the most rewarding moment I've had in months :') I wanted to show it off to my brothers, so they came to my desktop, saw it and all I recieve was a "cool". Not a good "cool", a "meh" kind of "cool". So I thought it was because of the size bug.
Fastfoward some hours, now every image gets scaled into the slides prefectly, in the correct angle, etc. I tell my dad what I made and he says "yeah sure, the problem is that I need you to give them to have subtitles". He wasn't even impressed. My heart hurt a bit.
I could totally automate the subtitles too (and did it), but what hurt the most is that nobody cared for what I was so pationate about. I'm so fascinated with coding that it replaced all my gaming habits, and now all I do is learn. I want to dedicate a good portion of my life to this but at that moment it seemed nobody in my family cared about it. So this rant is for all those f*ckers that I love but don't know how much my code means to me.21 -
Those days at 1:49AM when your code finally runs and does exactly what you wanted it to do, and you want to scream and tell someone, but you realize that even if anyone was awake, they'd never understand why you're so excited. They'd probably just pat you on the back and say 'Uh, ... good job...?'5
-
This is a funny one:
I found this gem in SO.
Why is it funny? Well, PDVSA is the state-owned company for oil production of my country (Petróleos De Venezuela).
This little intern decided that it was a good idea to publish in SO an answer with actual code, showing database and tables names to everyone.
Priceless.8 -
!rant
I'm a developer in germany and of course, everyone in this company has a keyboard with the QWERTZ layout, which ( you all know ) sucks especially when using it do write code.
So i asked my boss, if i can get a keyboard in QWERTY layout, because of the given reasons.
He replied nicely: Yes, I will ask the hardware management.
5 minutes later i got a mail: Here is your harware order, you will get it soon.
It's not much, but that was fast and nice :)
Have a good day everybody.28 -
A while back a co-worker of mine fucked up by leaving some debug code and pushing to production.
He quickly repaired it, redeployed and everything was good again before the customer experienced any issues.
Later that day, management showed up by his desk to ask what happened, how it happened and stating that he was not "angry enough" about his fuck up, long after it has been repaired.
Up to this day i regret not asking in what unit of measurement we could determine if we were angry enough; decibels? gray hairs? grams of shit in my underwear?4 -
At an interview, the first round was an online coding round. Two questions, one easy one hard, 90 minutes, easy peasy.
I solved the hard one first.
A bit of good logic, followed MVC pattern, all done. Worked flawlessly.
Submitted code. Online compiler threw up an internal error citing java is an invalid command(jdk not found).
Called the invigilators. What I heard next, I couldn't believe this shit.
"We're not responsible for any errors you may be having. Figure it out yourself"
I was like WTF dude. This is not even a compilation or runtime error!
After a heated discussion, I made him look at the code.
Him - what is all this classes and all? Why haven't you written everything inside the main function?
Me - those are model classes. Those are different helper functions. That is a recursive function to avoid 5 for loops and use divide and conquer. Ever heard of OOP? what kind of person writes a 300 line program inside one function?
Him - no no we write it like that only. Correct this.
Me - I fit everything inside the main function. Still the same error, java not installed. Called the idiot to have a look at it.
Him - yeah your code is wrong.
Me - may I know what's wrong with it? Can you fix it please?
Him - no no we aren't allowed to see the code (he had already read it twice. It was compiling and running perfectly, locally) .
Yeah you solved only 1 problem, you were supposed to solve 2.
Me - yes because the rest of the time I had the pleasure of your company. (It isn't everyday that I see talking buffoons.)11 -
Went to hackathon @ Google HQ in NYC. Gotta say it was pretty shitty. Most people are JavaScript nerds and some code in objective-C, xcode (4-5 out of 50). The rest are chemists, scientists and general folks. Not what I anticipated when you know it's more like iOS hackathon. Anyways it was good to see the shittiest demos in my life made in less than 12 hours. We had 4.5 people working on a toilet project called "I gotta go". Public bathroom locator... One guy coded in JS, xcode and react Native. Another dude was pushing all the code to GitHub and doing backend in firebase. The third guy was making a website for no reason and then I see it's hosted weebly. He hand coded first, I looked what he is doing - just HTML tags. Thank God some organizers helped us and we had a 4 click demo with basic text and no real functionality. Plus the website who never seen. What a fucking waste of $100 and two days.4
-
Hello there, just couple of words about PHP. I've been develop on PHP more than 10 years, I've seen it all 3,4,5,{6},7. Yes PHP was not good in terms of engineering and patterns, but it was simple, it was the most simple language for web to start those days. It was simple as you put code into file, upload it via FTP and it works. No java servlets, no unix consoles, no nothing, just shared hosting account was enough to host site, or even application with database. As database everybody used to have mysql, again because its simple to start and easy to maintain. So PHP+MySQL became industry standard on Web during 00-2012, and continues in some way.
You can write HTML and logic inside single file, within php code, even more single file may content few pages, or even kind of framework. That simplicity and agility sticks everybody who wants to develop sites with PHP.
This is pretty much about why it is so popular.
Each good or wannabe PHP developer in an early days write its own framework or library (like in javascript this days because of nodejs)
Imagine that PHP has hadn't have package manager, developers used to have host packages on their own sites, then various packages catalog sites created, and then finally composer. A gazillions of php code had spread over internet, without any kind of dependency control. To include libraries to your projects you have to just write include, or require. Some developers do it better than others.
So what we have ? A lots of code, no repositories, zip archives with libraries, no dependency control.
Project that uses that kind of code are still alive even today, they are solid hose of cards, and unmaintainable of course.
And main question that I'm trying to answer is Why PHP is not good ?
- First is amount of legacy code which people copy and pasted into their project, spread it even more like a virus.
- Lack of industry standards at the beginning lead to a lots of bad practices among developers. PHP code usually smells.
open source php projects in early days was developed in same conditions so even in phpbb, phpnuke, wordpress, drupal used to have a lot of bad practices in their codebase. So php developers usually not study by another library, instead they write their own frameworks/libraries.
- "It works", - there are no strong business demands, on web development, again because lack of standards, and concerns.
This three things are basically same, they linked to each other and summarize of answer of why PHP have strong smells and everybody yelling against it.
Whats is with PHP nowadays ? Of course PHP today is more influenced by good practice of webdev. Composer, Zend, Laravel, Yii, Symphony and language it self became more adult so to say, but developers...
People who never tried anything except PHP are usually weaker in programming and ecosystem knowledge than people who tried something else, python, perl, ruby, c for instance.
Summary
PHP as any other programming language is a tool. Each tool has its own task. Consider this and your task requirements and PHP can be just good enough solution.
"PHP is shit" - usually you heard that from people who never write strong applications on PHP and haven't used any good tools like Symphony or Laravel.
Cheap developers, - the bigger community, the more chance to hire cheap developers, and more chance to get bad code. That can be applied on any other language.
PHP has professionals developers, usually they have not only php on scope.
That's all folks, this is very brief, I am not covering php usage early days in details, but this is good enough to understand the point.
Enjoy.8 -
Hey. This code look broken. What should I do?
It isn't broken. It's doing what it's supposed to.
Well, it's hard to follow, but it certainly doesn't look right. And it isn't doing what I expect. Also, why is it calling method(a_class1_or_class2) with a class3?
It isn't hard to follow, and it works just fine. Let me show you. ... huh. looks like it isn't right. and there's a comment here saying the calls aren't clear. but it works just fine. Just copy it over and do it the same way.
I already did that. and it isn't working.
What are you talking about? Of course it works fine. Did you check your code?
------
Really, dude? It doesn't work fine. but, guess what? It works fine* when I change it to call that method with a class2 like it asks for. (Surprise!) But I can't tell him that. Nope. Bossmang get offended. Still won't admit I was right about anything, either.
Ahh... the continual joy of working with (and for) trash.
* well, more fine; the rest of the feature is still wrong. but nope, i'm not allowed to fix it. because why would they want anything to work properly? Already-accepted wrong behavior is good enough. Can't clean up the code, either, because that "muddies the waters." Bitch, I couldn't see the bottom of this sewer if it was half an inch deep! Which is more important: the last contributor entry beside the code, or that code being readable and maintainable? or it, you know, working?
doot doot.
need to scoot.8 -
Work today was good although put in 2 hrs of overtime....
But I optimized some code by changing out a class. Now it does the same thing except does it:
in SECONDS on my local PC
instead of 10+ MINUTES on a massive server.12 -
Looking at code in our workplace.. I realized one thing. Like Devops, legacy code is actually a mindset.
So here goes my thought:
A piece of code is not legacy because it was written ten years ago.
A piece of code is legacy because it looks like a piece of legacy code.
With the legacy code mindset, you end up writing legacy code no matter where you are, when you wrote it.
I was looking at some part of our code which we written in just the last few months, and I can’t help but think that they were legacy, so it really doesn’t matter when it was written!
It is more about how you write your code that determines whether it is legacy :)
Hopefully this was not crazily confusing anyone. Have a good day guys & gals!7 -
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 -
Just started learning python and here is my experience so far
I had started programming with C++ but since I wanted to venture into the fullstack domain (upto some extent, circumstances played a major role), I switched to java and boy was I in love with it.. Spring boot was my life and I had written several applications on it currently running on production.. One of them was crawling tweets and getting some insights out of them.. Today when I started with python, I found a tutorial (link at the end of the post) that almost did the same thing..
Within 2-3 hours and some very basic lines of codes I could achieve exactly what java would have taken at least a week to do.. Python for sure is a good thing..
Probably I am still in my very adolescent stage of learning, but python does seem a very good option worth considering.. Though for now, I would stick to java for writing useful code..
https://marcobonzanini.com/2015/03/... -
Interviewer: Do you mastering PB? Because this company always use PB.
Me: I good on it.
Int: Oh well you're accept here, welcome.
Me: Thanks.
...
*the first day I joined the company*
Lead. Programmer: Today you will code Java.
Me: Okay sir.
...
Then I ask what the Interviewer's "PB" means, and I got the answer is Power Builder. I think it's the name of the game I always play, Point Blank.
...
And I smile, because of my fool, I was accepted to the company.
....
*sorry in my bad English*10 -
Once, at my first job, the CEO of the company sent a group email in which he essentially lambasted my ability to do my job.
I wasn't even hired as a programmer, I was a data entry guy who learned how to code on the job, and at this point I was literally the only person writing code for the company. I regularly worked 12+ hours every day, and even though I had to learn practically everything on my own I was still getting things done -- at least, I would have gotten things done if the CEO didn't keep pulling me off of my projects to work on whatever his latest ultra-important-idea-of-the-week was. I was even working for an 8 hr/day, 5 day/week salary, putting in extra hours for free.
But no, my sacrifices and hard work weren't good enough in the CEO's eyes, and he chose to say that to multiple people in an email, including investors in our startup. I don't remember exactly what was said, but whatever it was made me so livid I couldn't do any work; every time I sat down to code, I thought about that email and it so infuriated me that I couldn't concentrate. It took me twelve hours just to calm down enough to get back to coding.
After that, I refused to communicate with the CEO except through my boss, the CTO.7 -
I'm been hacking together software for the last year or so now and I've never considered myself to be a good programmer.
Today however I had to implement an A* search from scratch and with only the knowledge of how the algorithm should function I put together some code that looked correct.
I went to run my code expecting one of the typical "Index out of bound", "null reference", "something has not be initialised" BUT I was shocked to find that the code worked flawlessly.
I went into a weird state of shock and disbelief. I'm not naturally gifted at this stuff, so it was just really hard for me to accept that I might actually be getting better to the point where I might be able to say "I am a programmer"
Does anyone else get bad imposter syndrome?6 -
The client requested an ability to create reports in the app I had been working on. It was completed to their specification and they were happy with it for about a week.
Then, they asked me to redo the report, changing various components around so I told them it can be done, but is time consuming because they're essentially asking for a completely different report.
Now, they never even looked at the code before and the extent of their coding knowledge is excel formulas. Their repond to me was "it's easy, just reverse the loop."
I simply did not know how to respond. "Just reverse the loop." ...I mean it's so simple, just reverse the loop... It doesn't matter that I've spent a good amount of time on this already, or that the client have never seen the code, doesn't understand coding, doesn't care about programming, none of that matter. ...just...reverse...the...loop...6 -
Ooh this is good.
At my first job, i was hired as a c++ developer. The task seemed easy enough, it was a research and the previous developer died, leaving behind a lot of documentation and some legacy fortran code. Now you might not know, but fortran can be really easily converted to c, and then refactored to c++.
Fine, time to read the docs. The research was on pollen levels, cant really tell more. Mostly advanced maths. I dug through 500+ pages of algebra just to realize, theres no way this would ever work. Okay dont panic, im a data analyst, i can handle this.
Lets take a look at the fortran code, maybe that makes more sense. Turns out it had nothing to do with the task. It looped through some external data i couldnt find anywhere and thats it. Yay.
So i exported everything we had to a csv file, wrote a java program to apply linefit with linear regression and filter out the bad records. After that i spent 2 days in a hot server room, hoping that the old intel xeon wouldnt break down from sending java outputs directly to haskell, but it held on its own.1 -
I guess my best AHHA moment was back when I learned that good code is simple code.
When I started out I wanted to prove myself by showing of how good of a programmer I was(and which I retrospectively wasn't) , which basically meant to use every high level concept I was aware of whenever possible. Multi threading where linear execution would have been totally okay, polymorphism with x meta classes where a switch would have been enough, all that shit.
It wasn't until I had to guide the first person through that mess of useless ego stroking that I found out how much time and money I wasted by not going with the easiest approach that solves the problem.
Took me some time to fully lay off that attitude but it surely was one of the most influential moments of my career.6 -
It was 1999. I was just starting my first real job as a programmer for a major insurance company. We were working on code that would screen scrape legacy mainframe data output and convert it to a web-based UI. REALLY stupid project approach I had no input on. I happened to find a programmer in Germany who had released his code in the public domain that would help with making a certain conversion task easier. I downloaded his code and put it to work.
During a code review, a programmer who was probably about 60 asked me where I got the code and what it was doing. I didn't even get to the part about what it was doing because he made fun of me so badly, in a fake German accent in front of a room full of non-programmers, for using code that today is no big deal due to the prevalence of open source. I just clammed up in humiliation because he got everyone laughing at me. His philosophy was if we didn't buy it or write it ourselves, we had no business using it.
I guess I was just ahead of my time?6 -
So I once had a job as a C# developer at a company that rewrote its legacy software in .Net after years of running VB3 code - the project had originally started in 1994 and ran on Windows 3.11.
As one of the only two guys in the team that actually knew VB I was eventually put in charge of bug for bug compatibility. Since our software did some financial estimations that were impossible to do without it (because they were not well defined), our clients didn't much care if the results were slightly wrong, as long as they were exactly compatible with the previous version - compatibility proved the results were correct.
This job mostly consisted of finding rounding errors caused by the old VB3 code, but that's not what I'm here to talk about today.
One day, after dealing with many smaller functions, I felt I was ready to finally tackle the most complicated function in our code. This was a beast of a function, called Calc, which was called from everywhere in the code, did a whole bunch of calculations, and returned a single number. It consisted of 500 or so lines of spaghetti.
This function had a very peculiar structure:
Function Calc(...)
...
If SomeVariable Then
...
If Not SomeVariable Then
...
(the most important bit of calculation happened here)
...
End If
...
End If
...
End Function
But for some reason it actually worked. For days I tried to find out what's going on, where the SomeVariable was being changed or how the nesting indentation was actually wrong and didn't match the source, but to no avail. Eventually, though, after many days, I did find the answer.
SomeVariable = 1
Somehow, the makers of VB3 though it would be a good idea for Not X to be calculated as (-1 - X). So if a variable was not a boolean (-1 for True, 0 for False), both X and Not X could be truthy, non-zero values.
And kids these days complain about JavaScript's handling of ==...7 -
So a good friend of mine calls me up on Friday night, and he tells me about his close friend abroad who messed up and, without going into details, needs me to do his C# project for a course. The deadline was on Monday. I said I couldn't promise anything, but send me the requirments and I'll look into it.
Now, the pay was good and I felt that the guy's reasons were valid (and that the prof was being a dick), also the project was doable in a day and a half, so I said ok. I spent my entire Saturday working on it till I had most of it done: I just needed to refine the code and do the report.
I sent the app to him so that he can check it out, to which he responds by freaking out and explaining that he has missed most of the classes and has a barely passing average (huh maybe the prof isn't so much of a dick). If I get him a high grade, the gig will be up and his prof will fail him. He wants a 60-70/100, no more.
Feeling obliged by our agreement, I spent my Sunday complicating trivial code, breaking standards, and adding minor bugs. Had I know this was what it was going to lead to, I would have never accepted.
It's just so much harder to break good code than to write it.6 -
Ok. Yesterday I finished building my compiler I have to say: it was a pretty darn big thing with 7000 Lines of code.
I did it alone and with almost no help.
I wanted to give some advice in case someone wants to program a compiler. I knaw its useless in times of lex and yacc, but anyway.
-have a good idea for the language
-learn about parser/lexer
-learn assembler
-do it like me: output the assembler to a file and let it assemble/link by the linux standart-tools (call the commands)
-Have fun. Fun is essential in coding
I hope I was able to help people who want to build a compiler alone... Yau can always ask questions ;~)
-3 -
It was friday evening and almost everyone in office had left. I was assigned a bug related to some of my code changes. I called my senior to help me debug (has three years of experience, whereas me having only one year exp, who is also a very good friend of mine *always helps in debugging*).
So the code goes
switch (someEnum) {
case One:
doSomething()
// no break
case Two:
t.x = someEnum
break
case Three:
.....
}
I had recently added new enun One and was reciting the code logic to him as we were looking through code.
Him: Hey you haven't set t.x in case One. How did you miss that?
Me: No look, I haven't but a break on it. It will go ahead and set it in next case.
Him: What are you talking about? if the someEnun is One why would it execute Two case. Lets copy that line up there and try it locally.
Me: No no no wait. Are you saying that groovy doesn't need breaks in switch (Me being new to groovy but good with Java).
Him: Why would you need break in switch case even in Java?
Me: *stares at him*
Him: I'm going to execute a psvm right freaking now.
Me: *while he writes the psvm* Why did you think there were breaks in switch in any code?
Him: Shut up. *writes psvm code cursing me everywhere*
*executes code*
No way. Really??
Me: Tell me why do you think are there breaks in switch.
Him: I though they were to get you out of switch block and not execute the default block.
Me: So were you coding switch until now without breaks?
Him: I don't know man. I'm starting to doubt all the switches I have ever written.
Me: Anyway that's not the problem, so moving on.
*a while later*
Him: If a interviewer would ask me how would you rate yourself in Java. I would be like "Well I worked on various projects for 3 years in Java, but didnt know why we put breaks in switch. So you figure it out yourself."
One of the best moments in office.8 -
So you think it's bad when your friends, family, strangers and others ask you to fix their phone or computer is bad when they hear you're a programmer, IT or good with computers?
You think it's bad when they ask you whether you're hacking when they see code or terminal on your screen?
You think it's bad when they ask you to fix a cracked phone screen because you work with computers?
Well, think again because today my teammate was asked to fix a vending machine by X from another department because, according to X the vending was not accepting X's other dollar bill. The first dollar bill was accepted so why wouldn't it accept the 2nd one? Because the 🤬 dollar bill is crumpled. That's it.
What wows me is what made X think this is an IT issue.
According to X.... "because it has power, lights and touch screen so IT can fix it That's what you guys do, right? You can fix anything".
Me: wait!?, what?, uhhh..., are you serious? Wtf? Why? Grrrr4 -
99% of our server-side code is Python and PHP (legacy applications).
Asked a junior dev to make a small update to a PHP site so we could have it run some cleanup server side. Plenty of existing PHP code to look at and piece something together. Should be 50 lines max.
Did he use the existing PHP code to do this task? Nope. Did he at least use Python? Nope.
Node.js
His response?
"I couldn't figure it out and Node.js seemed to have good support for mongo so I used that instead."
We have 0 lines of server side javascript. Never had node installed. Literally none of the devs use node here. Not only is this completely outside of our tech stack, but he had to take the time to learn Node and JS just because he thought it was easier.
Much would of rather he put in twice as much time to learn the tools of our stack.8 -
Riverbed...the software cost USD $120,000+ and their support was horrible.
Tickets would go unanswered.
Their documentation was pretty good but there were parts that were wrong and they would not fix it.
They would usually close an issue because it was opened by someone else 5 years prior and hadn't been fixed.
The several years I used it their releases consisted of no tangible code enhancements.
Several times we provided very simple reproducable issues and there response was basicly "just don't do that".2 -
This here is some source code that i made. And I'll admit, I was a bit frustrated at the time of making. I just started learning to code in HTML and CSS a coulpe days ago. And a friend asked if I could make him a website. So I told him that I barely know the basics yet. And he says that it doesn't matter just as long as he gets a website. So now, a couple days of tryhard coding later, he raged about how bad the site looked and that he himself could have done a better job than I did. And yet the entire site had over 300 lines of code in it (perhaps not very much for you hardcore coders out there, but a biiig step for me) and several subpages, all with custom error pages and all. Although I'll admit, the design was a fucking ugly as fuck since i can design about as good as an alligator flies. But man was I mad after that, haven't talked to him since. The bastard. But to he point, in my rage i made this. An outburst of anger that I later refactored to fit a large amount of devs (since I reckon 99% of programmers deal with clients/customers instead of friends). And if anyone has a spare dns space to put the code on, then help yourself.
The link is:
https://pastebin.com/aFcK10YK
Have a good day!8 -
I've seen several rants about dumb/useless teachers, college and the CS degree studies; today is a good day to vent out some "old" memories.
Around two semesters ago I enrolled in a Database seminar with this guy, a tall geek from the 80's with a squeaky voice, so squeaky mice could had an aneurysm if they listened to him.
Either way this guy was a mess, he said he was an awesome coder, that we were still "peasants" when it came to coding, that relational databases had nothing on him since he was an awesome freelancer and did databases every day, that we had to redo the programming course with him and with his shitty, pulled out of the ass own C++ style guide with over 64 different redacted rules.
He gave us sample code of "how it should be done" in Java...it ain't my favorite language but fuck me a fucking donkey could have written better code with his ass!! He even rewrote Java's standard input function and made it highly inefficient. He still wrote in a structural paradigm in OOP languages! And he dared to make this code reviews were he would proyect someone's code and mock it in front of the class as he took off points, sometimes going to the negative realm (3,2,1,0,-1...)
But you know what's shittier? That he actually didn't even attend, 90% of the time, it was literally this:
> Good morning class
> Checks attendance. . .
> I'll be back, I'm going to check in...
> 1 hour 45 minutes later (class was 2 hrs long) - comes back
> do you have any doubts?
> O.o no...? I'm ok.
> We're done
Not only that, he scheduled from 4 to 17 homeworks throughout the week, I did the math, that was around 354 files from everyone; of course he didn't check them, other students from higher semesters did and they gained each point taken from students making students from lower semesters get the short end of the stick.
How did I pass? He didn't understood my code or database schema and he knew he couldn't fail me as he had no ground to stand on.
Thanks for listening, if you got to the end of this long ass post and had a similar experience I'd love to read it.13 -
They've literally left me with nothing to do. I'm doing nothing. I can't be happy doing nothing.
To illustrate the chaos: Everyone on the team was trying to figure out some defect. No one knows what is going on in the code. It's unlike anything I've ever seen.
I found an API call with a misspelled endpoint. It was wrong since the code was written two months before. There's no way it ever worked. Obviously no one tested the code because they would have immediately seen that the call returned a 404 every time.
I fixed it. That was my only PR in about a month. It was literally one character.
The next week that PR got reverted. Apparently the app works better if the API call fails. No one said what goes wrong if the request is made, just that it "causes problems."
That's how bad it is. No one knows why anything does or doesn't work. People write code that doesn't work, never test it, and the application works better in some unspecified way if that code never gets executed.
The last straw for me was when an architect told us that if we want to improve our skills we need to learn how to read and debug stuff like this.
1) Not to be immodest, but I'm good at figuring out bad code.
2) Just because I can doesn't mean I want to do it all day instead of actually developing software
3) He trivialized the really important skill, not making a mess like this in the first place. If his idea of skill is to sling crap without tests at the wall and then debug it, how is he an architect?
I tried really hard but I can't keep a good attitude. I don't want to become toxic, but why would I consider working that way? I try my best to be good at this. Writing decent code means a lot to me. It should mean a lot to them. Their code is costing them hundreds of thousands of dollars. Maybe millions.
I can't write good code and add value if all I do is debug bad code.
So I'm out. I'm going to another project. Have a nice life.4 -
Oh I have a good one.
A dev once was added to the team -he deleted all of the whitespace from the backend code (minified) and called that optimising. We had a lot of back and forth and me reverting the things back to non minified and him back to minified on live environement. I shit you not i had to endure that shit and he kept on insisting that I'm the shitty developer because I don't know how to optimise. I'm starting to rage even thinking about it....13 -
This is going to be a rant, but personally, I'm pleased with the outcome of my life now.
I was part of a community for a few years and decided to help them out with my knowledge of programming Lua nearly 2 years ago since they lacked developers for the project itself.
Since it was sort of a custom language that they modified how Lua worked on it, it took me a bit to adapt, but within a few weeks, I was pretty fluent in this so-called custom language they had. Began working on some major updates, additions, removals, and just optimizing this code base. It was a pretty old code base and needed a good chunk of love.
A few months later, I've implemented loads of features, optimized the base whenever I could, and then things start taking a turn for the worse. We get new 'developers' who haven't ever coded the language, and worse they couldn't afford to provide them development servers thus they ended up breaking my servers. I helped them and they learned, they were decent, but now the Seniors and CEO's of the project began to take a toll on me.
I was told that this community had a reputation of driving out developers, ruining their reputations, and that is what started happening. I started getting questioned if I was loyal to helping them, that I've become lazy, even though they were explained I've had mental health issues for a few years and have been hospitalized multiple times.
These sort of attacks kept happening for months, and then they finally pushed my buttons, where I was talking to another Senior of how we should redo the base since it's just so massive and a few tiny updates to the base take a few days to implement across the entire code. What instead happened was that I went to sleep, and this Senior told the CEO I was going to steal the code base and go sell it...
I woke up to messages of how the CEO is all pissed off, and that this what the Senior said. At this point, I started responding with, fuck it. I was so sick and fucking tired of their bullshit. I was the only fucking competent developer, and I did more work in the few months I was there then some people did in 2 or 3 years.
A few hours later I decided to go chat with the CEO and explained what was truly brought up, and he just brushed it off like I was lying. At that point, I lost it. I told him why the code base was horrible since he hired stupid ass developers. He didn't know how to code. People wanted certain items, and he wouldn't be able to add them for fucking months and players sit there making fun of it. Some people state the only differences they see within the code is the code I've done. Basically, he was an incompetent fuck that said he knew what he was doing, and had all these big plans for the future yet couldn't listen to the only competent developer and fucking claimed bullshit.
Now a few months have gone by, I'm looking at their community and it's basically dead with no proper updates except for copy and paste updates claiming to be custom coded. While I'm working on my real life businesses (Which are currently being a headache, but within the year should resolve its issues), starting University for my Computer Science degree here soon, and even considering building my own game here.
Basically, karma is a bitch and that's why when you get loyal people in your life, keep them. (Writing this at 3 am after a few drinks, hopefully, it made sense, I think it does.)
Anyways, goodnight everyone.5 -
!rant
I would like to ask you guys for advice.
I am a content manager who is gradually given more and more dev tasks. That is great because I want to become a webdev. However I have one big issue. Whenever I write code (any code) I feel ashamed because I know that anyone else could do better. I am also ashamed to show my work to my colleagues because I am afraid of what they might think of me. I know that they are good people and they would probably help me out but still...
Someone once tried to explain to me that I am not my code and whenever my code is being evaluated I am not the one who is being judged, it is my code, my current knowledge. I understand conceptually what he was trying to tell me but I just can't feel it.
Did you have similar feelings when you started out?
Thanks in advance.18 -
Once had a manager who would refuse to review anything on the basis he "didn't have enough time". Not just code reviews, but also customer comms, support messages, documentation etc. - anything that it's good to get more than 1 set of eyes on. This was a small startup so me working pretty much solo - it wasn't like there was anyone else able to review anything like this.
Fair enough, you might say. He trusts me. Just put it out there.
...but then *as soon as* it was published / sent / committed / whatever, he'd then magically find 5 minutes to glance through it and point out how rubbish / unhelpful / ridiculous the work was, and how it should have never gone out in the first place, and why didn't I read through it before sending as I'd clearly realise how stupid this was.
After a few rounds of this I actually flipped out on him in the office, called him out on his BS and told him to think for 2 seconds about how ridiculous this situation was. In fairness to the guy he did back down, take note and it didn't happen again, but damn, those times were some of the most frustrating of my career to date. -
I pretty much just copied code from Google for a good 2 years, following tutorials on Java, until I actually got a basic understanding of wtf I was doing. I could understand the syntax, loops, and conditional statements well, but for some reason I didn't quite understand the concept of an object until I took a class on Java development during my high school career, where it finally 'clicked'.3
-
I was working with a guy 3 years ago, he was junior web developer. Lazy for work, watching YouTube and game streamers all day long at the office. Sometimes i was fixing his crappy code.
And ... one week ago I was surprised seeing this guy come to my current work office as senior web developer.
Im also new at this office and i had good impression i was working with professionals before this happened. Guess what... This guy hasnt changed much. Still writes crappy code , no idea of clean code at all.
I got concerns about my work place now :/ thinking to change it.6 -
Okay so this happened ages ago (nearly five years) but this suddenly came to my mind again.
It was in the first year of my study (currently in my 5th and last year).
I was experimenting around with php and mysql during some free hours. All the insert,delete and so on statements worked perfectly find except for one update statement. Started to debug of course and after a little while of no results I was like "oh yeah right, something like logs exists of course". Looked in the logs but nothing. No matter how I altered my code (rewrote it numerous times for some 'clean starts') it just would not run the update statement.
Alright, time for some class mate help. After multiple hours of debugging with a few classmates, there was still no result at all.
Time to bring in one or more teachers. After hours of debugging, still no result even with the help of a few good teachers.
Decided to give it a rest for that day.
Two weeks later it still was not updating anything/working and I finally gave up.
Till today, I still have no clue what went wrong and it still bugs me from time to time :/4 -
The first time I caused a massive error on production.
The good news was the site didn't go completely down. The bad news, however, was that it went down for 60% of our users, and because it's only partial, it got detected only after about two hours.
Everyone halted what they were doing to help investigate the issue. When it turned out that my latest commit caused the error, I was told to fix it... with the CTO and senior software architects watching.
It all happened because I deleted one too many line, an if statement, making the accompanying else statement a complete nonsense. It was a corner case code unforeseen by the QA guy.
The attached meme perfectly describes my feeling for the rest of the month following that accident.2 -
Just need to get this off my chest. Started a new job 3 weeks ago at a company that has been around ~18 years, it is only recently that they have started to grow more rapidly. I was brought in under the guise that they wanted to embrace change and better practices and so said I was up for the challenge.
In my 2nd week I was asked to produce a document on tackling the technical debt and an approach to software development in the future for 3 consultants who were coming in to review the development practices of the company on behalf of the private equity firm who has taken a major stake in the company. I wrote the document trying to be factual about the current state and where I wanted to go, key points being:
Currently a tightly coupled monolith with little separation of concerns (73 projects in one solution but you have to build two other solutions to get it to build because there are direct references.).
Little to no adherence to SOLID principles.
No automated testing whatsoever.
Libraries all directly referenced using the file system rather than Nuget.
I set out a plan which said we needed to introduce TDD, breaking dependencies, splitting libraries into separate projects with nuget packages. Start adhering to SOLID principles, looking at breaking the project down into smaller services using the strangler pattern etc. After submitting what I had written to be part of a larger document I was told that it had been tweaked as they felt it was too negative. I asked to see the master document and it turns out they had completely excluded it.
I’ve had open and frank discussions with the dev team who to me have espoused that previously they have tried to do better, tackle technical debt etc but have struggled to get management to allow them. All in all a fairly poor culture. They seem almost resigned to their fate.
In my first 2 weeks I was told to get myself acquainted and to settle myself in. I started looking at the code and was quite shocked at how poorly written a lot of it was and in discussions with my manager have been critical of the code base and quite passionate and opinionated about the changes I want to see.
Then on Friday, the end of my third week, I was invited to a meeting for a catch up. The first thing I was told was that they felt I was being too openly critical in the office and whether I was a good fit for the company, essentially a stay or go ultimatum. I’ve asked for the weekend to think about it.
I’ve been a little rocked by it being so quickly asked if I was a good fit for the company and it got my back up. I told them that I was a good fit but for me to stay I want to see a commitment to changes, they told me that they had commitments to deliver new features and that we might be able to do it at some point in the future but for now I just needed to crack on.
Ordinarily I would just walk but I’ve recently started the process to adopt kids and changing jobs right now would blow that out the water. At the same time I’m passionate about what I do and having a high standards, I’m not going to be silenced for being critical but maybe I will try and tackle it in a different way. I think my biggest issue is that my boss who was previously a Senior Developer (my current position) has worked at the company for 12 years and it is his only job, so when I’m being critical it’s most likely criticising code he wrote. I find it hard to have the respect of a boss who I had to teach what a unit test was and how to write one. It makes it hard to preach good standards when by all accounts they don’t see the problems.
Just wondering if anyone has suggestions or experience that might help me tackle this situation?12 -
I was once using an app, made by my friend which could be used as a handy reference for programming topics. It crashed every time i clicked the last entry of the list. I told him that the app has a bug, probably some position mistake and he denied, saying that he doesn't need feedback from a guy who didn't code applications. I learned to code java and started android that night and knew I needed to give him a reply, a good one.3
-
VB3.
In my last rant I mentioned I used to convert VB3 code to .Net. Before that, I used to work on the VB3 product itself. This software emulated something from the real world, and as such complied with a bunch of regulations that changed on a regular basis, and always had additions and removals that were to be done on a strict schedule (e.g. "we're adding a new product next month, so we have to be able to sell it by the first of the month"). As such, it was a huge sprawling mess.
One day, I was given a task to change some feature slightly. The task was simple enough and really only required adding one line of code. I added that line and clicked "Run".
Error: Too Much Code
What? What do you mean too much code? I asked a colleague for help. "Oh, don't worry, it happens when a function is too long. Just remove one or two of the comments and try again." The comments were, naturally, old deleted code that was quite meaningless so I had no qualms about removing some. It worked, and I went on with my life.
This started happening on a regular basis on our larger functions. But there were always comments to remove so it wasn't a big issue.
One day, though, it happened on a five-line function. This was puzzling - the error had always happened when a function was too big but this one clearly wasn't. What could the error mean? I went to the same colleague.
Apparently, there's also a limit to how big the entire code base can be. "Just find a function that isn't used any more and delete it." And so I did. There were many such functions, responsible for calculating things which no longer existed so they were never called. For months, I'd find functions and remove them. Until there weren't any more. I checked every function and subroutine in our codebase, and they were all used; I checked every possible code path and they were all needed.
What do I do now, I asked? The colleague, who was an expert on VB3 but worked on another project, came and take a look.
"Look at all these small functions you made! No wonder you're running out of space!" Apparently each function created a lot of overhead in the compiled executable. The solution was clear. Combine small functions into large monolithic ones, possibly passing flags in them to do completely unrelated things. Oh, and don't comment on the different parts because we have no room for comments in our code base.
Ah, the good old days.5 -
I am extremely particular about writing good READMEs in my repositories. I make sure that it has everything from prerequisites to run the code and tests on a new machine to how to actually run it (and the tests) and everything in between.
Despite all that I was asked questions that should have been avoided if you had seen the README.
One of these times was by a junior DevOps asking me about an error which was clearly due to him running the code without a virtual environment. Pings me with the entire stacktrace, I go to his desk and tell him to install the environment, which he does. 3 minutes later, another error message.
He was running the wrong script. I go to his desk again. Open the repository. Show him the README. Show him the section titled "To run the pipeline"!
There's a reason they're called README. You're supposed to READ them! 😑3 -
This is something I'll never forget.
I'm a senior UI engineer. I was working at a digital agency at the time and got tasked with refactoring and improving an existing interface from a well known delivery company.
I open the code and what do I find? Indentation. But not in the normal sense. The indentation only went forward, randomly returning a bunch of tabs back in the middle of the file a few times, but never returning to its initial level after closing a tag or function, both on HTML and JS.
Let that sink in for a minute and try to imagine what it does to your editor with word wrapping (1 letter columns), and without (absurd horizontal scrolling).
Using Sublime at the time, ctrl+shift+P, reindent. Everything magically falls beautifully into place. Refactor the application, clean up the code, document it, package it and send it back (zip files as they didn't want to provide version control access, yay).
The next day, we get a very angry call from the client saying that their team is completely lost. I prove to the project manager that my code is up to scratch, running fine, no errors, tested, good performance. He returns to the client and proves that it's all correct (good PM with decent tech knowledge).
The client responds with "Yeah, the code is running, but our team uses tabs for version control and now we lost all versioning!".
Bear in mind this was in 2012, git was around for 7 years then, and SVN and Mercury much longer.
I then finally understood the randomness of the tabs. The code would go a bunch of tabs back when it went back to a previous version, everything above were additions or modifications that joined seamlessly with the previous version before, with no way to know when and so on.
I immediately told the PM that was absurd, he agreed, and told the client we wouldn't be reindenting everything back for them according to the original file.
All in all, it wasn't a bad experience due to a competent PM, but it left a bad taste in my mouth to know companies have teams that are that incompetent, and that no one thought to stop and say "hey, this may cause issues down the line".4 -
I used to work for a company in 2017 that was affiliated with a ruling party's tax information agency. The website was janky and the database .. oh the horrors.
Every single record was a JSON object stored in a NEW COLUMN.
That's right. If you had 10K records then the table had 1 row with 10K columns with each column contained JSON data in it.
I understood then, why government websites are so crap.
Anyway, I untangled it and made the performance better to a degree that my then-boss didn't believe what I pulled off.
But yeah, I never got any pay increments or whatever, It was a good dopamine boost to my boss which lasted only 15 mins.
I don't believe in improving code ever since because of the fact that I ain't getting paid extra, so why bother.7 -
I'll repeat what I wrote in an answer in another rant because I think it made a good story (I just realized it after writing it :p) :
I met a guy in my school who was the best of the school : I mean, he jumped over the first two years of the school (and he started from scratch, he never had programmed before).
I went to ask him how he got enough motivation to make all the two years projects in one and he told me something that made me understand why he was so good : "I'm fucking lazy, so when I code, I code something that I would use for a very long time, tools that will be useful in next projects".
By doing this, all he had to do in end-year projects was to assemble what he already had done to make the program. He had perfectly working tools that were awesome. So, he never had to work more than 10 hours a week after doing this.4 -
While I was in university, I used to be a good programmer (which I still am :D ), my friends used to copy my code for the assignments. One day, the teacher (one of my my mentors) called me in his office and said, "this is your code".
I'm like, in my mind, "How did he know this?"
The teacher said, "If you let others copy your code one more time, I will fail you".
I nodded my head in affirmation.
Later I understood that I've been a "Clean code" principle follower even before I knew this term. So, it was pretty easy to differentiate my codes from my friends. The teacher is really a genius ^_^5 -
I'd say one of the best advice a dev gave me, was that, I should not write duplicate code, but rewrite these parts to a single function.
And another one: If you use specific values in the code, instead of putting it in multiple places, assign it to a variable at one place and use the variable later on.
These advices sound quite trivial, but I think every beginner should learn these as eary as possible.
Boiiii have I seen shitty code from people who don't give a hobo's ass about maintainable code.
Be a good coder.
Write for quality, not quantity.
Care about your successor.
Thank you.
If not, I will fucking find you, fill your guts with napalm and light you up alive on a rusty pole while laughing hysterically.1 -
Why do otherwise intelligent people think chatgpt code is a good idea if they don't know what the code does?
I am a bit in shock by this prospect. I asked about some lines of code that was using some templates I had not used before. The response was "I dunno, chatgpt." This person is really really smart. Yet deploying code that they don't understand completely. This seems dangerous and irresponsible. I ended up rewriting the function I had questions about. It was significantly shorter and didn't do a fuckton of copying strings around.
WTF is wrong with people? Are people afraid to think? Now I want to get out before this kind of shit becomes the norm.13 -
I'm exhausted.
After one and a half year after my last rant, I'm here again. I left the previous job as web developer after almost 12y. At the time I found 3 new jobs as developer; I chose the one with the largest company, the premises were really good. My 3 interviews were excellent. But what I found next was almost a nightmare.
I was literally "confined" for the first 2 months, no internet connection, no email address, very little communication with colleagues. My near colleague was sharing the code were I would work via a usb key. All this for "safety" purposes, because "here you start this way".
For me it was not so bad, I could take my time to study my work and do it (without Stack Overflow and only by reference guides, when needed - I felt proud in an old way). But the next months were really tough: no help to understand what I missed about the work I was doing (consider that I was working on a large database, previously used by an old ERP, on which other developers - prior me - wrote a lot of code, to make the company continue use all the data after the expiration of the ERP licences - speaking about a year 2000's Java application).
Now I find myself struggling, because the main project on which I was working has been set aside (apparently for some budget decisions); my work team constantly make me do some manteinance on the old code, but the main tasks are done by the old mate, "because deadlines are always pressing and there would not be enough time to explain you anything". I'm not growing.
I'm really becoming reluctant to write code, and whenever I do it, I constantly feel under pressure, and this makes me nervous and inclined to make errors.
Don't take me wrong, I was/am good at my work, but it's like I'm loosing that sparkle I had till a few years ago.
When I'm at home I try to study or write code, just to keep training my mind, but I'm really struggling and I'm worried about losing my brain for doing this job. I constantly forget things and lose focus.
Never felt this way. I am thinking about the chance to switch again and search for another company.6 -
I had defined a variable earlier, 'count', that I was trying to access later on in the code. Kept getting errors that the variable didn't exist.
When I looked, I had actually named it 'cunt'.
Best typo ever, gave me a good laugh as opposed to the usual annoying typos in programming.1 -
Just had an old coworker from a previous job send me some stuff for a php script he was having issues with.
There was too much glory in what he was trying to do: mixing php inside of jquery code, not using strict types would have prevented like 10 issues he was having on his script on another portion, mixing headers, weirdly named variables, poorly constructed, reused db connections, 0 oop or proper dependency management in his code, horrible use of sessions and cookies, O (n²) logic all over the place.
But the cake.....are y'all ready for it? It was code screenshots, not even of just the section, no, the full page, from a windows machine (to make it better he is hosting the application on an IIS server and his configuration was not properly set) but I digress, back to the cake:
He was writing his code inside of wordpad :P
FUCKING WORDPAD
I just politely told him that I was busy at the moment and happily ignored him. Dude is not a good person to begin with imo, for example, he brought the subject of homosexuality during one of our talks after he saw me talking to my bf, who just so happens to be gay, his statement was "I do not understand how there can be gay people when there are women that are so hot"
My comeback was "I do not understand how we can be heterosexual when there are some really attractive dudes out there, see how stupid your logic sounds? attractiveness is not the basis for homosexuality ye dipstick" he let it go after that, but close minded people like that are not really my cup of tea.14 -
Was just told by a guy in my class proudly, “yeah, I’m pretty good at typing. It comes in handy for when I code stuff in class.” Awesome, that’s cool. I ask what he’s doing in the class. “We learned Scratch last semester and now we’re starting Java.” -______-6
-
Before becoming a developer, I used to work as a sales rep at this company that spent a good amount of time building what they believed to be an innovative state-of-the-art “code generator”. It was basically a scaffolding tool for generating software.
They were using it to auto generate customized iOS and Android native mobile app templates, along with a web backed.
The problem was that the generated code was shit, and the developers on the team basically spent more time fixing bugs than if they had built everything from scratch. But their passion for the product meant they just kept using it.
For some reason they never fixed issues in the original templates, so basically all the bugs that were found, kept showing up with each new app!
I have never seen apps like this that essentially had more bugs than features. Opening more than 10 app screen meant the app would freeze and crash. Sign up forms were actually dummy forms. The list goes on...
All the apps had the same shitty UI. For example, Product pages had a product image area that was like 5% of the screen view!
Last but not least, apps had a backend IP address hardcoded pointing to a server with an IP address that was temporary. So one day they had to restart the server and suddenly all customer apps stopped working and required a software update to work!
It was amazing seeing how a team of 3 developers trying to fix messy autogenerated code, couldn’t accomplish what was essentially a website on an app that I managed to build in my free time.
That’s how I knew it was time to quit my job and code full time.2 -
Today was a day at work that I felt like I made a significant contribution. It was not a lot of code. Actually it was a difference of 3 characters.
I am developing an industrial server so that my employer can provide access to their machines to enterprise industrial systems. You know, the big boys toys. Probably in fucking java...
Anyway, I am putting this server on an embedded system. So naturally you want to see how much serving a server can serve. In this case the device in more processor starved than memory starved. So I bumped up the speed of the serving from 1000mS to 100mS per sample. This caused the processor to jump from 8% of one core (as read from top) to 70%. Okay, 10x more sampling then 10x approx cpu usage. That is good. I know some basic metrics for a certain amount of data for a couple of different sampling rates.
Now, I realized this really was not that much activity for this processor. I mean, it didn't seem to me that it "took much" to see a large increase of processor usage. So I started wondering about another process on the system that was eating 60 to 70 % all the time. I know it updated a screen that showed some not often needed data from its display among controlling things. Most of the time it will be in a cabinet hidden from the world. I started looking at this code and figured out where the display code was being called.
This is where it gets interesting. I didn't write this code. Another really good programmer I work with wrote this. It also seemed to be pretty standard approach. It had a timer that fired an event every 50mS. This is 20 times per second. So 20 fps if you will. I thought, What would happen if I changed this to 250mS? So I did. It dropped the processor usage to 15%! WTF?! I showed another programmer: WTF?! I showed the guy who wrote it: WTF?! I asked what does it do? He said all it does it update the display. He said: Lets take to 1000mS! I was hesitant, but okay. It dropped to 5%!
What is funny is several people all said: This is running kinda hot. It really shouldn't be this hot.
Don't assume, if you have a hunch, play with it if its safe to do so. You might just shave off 55 to 60 % cpu usage on your system.
So the code I ended up changing: "50" to "1000".16 -
I followed a tutorial on how to use TensorFlow to create digit recognition. It worked. Theres just a few issues ...
I found the code on a website, and wrote what i saw (almost copy paste)
I barely understood any of the code
I did not understand the results
I have no idea where the images was found
Im almost more confused now, than when i started, thats not good xD7 -
Today was not a good day for me at all ,being considered a junior developer is not a good thing.
Yes I know due to my lack of the understanding of your 3 years old code base I could not meet up with the deadlines.
So as a punishment one of our senior devs asked me to bring my chair to his desk and told me to commit and push my progress every ten minutes .
He'll then review reading each code line by line ., Reverting too.
The worst part was that for the ten minutes I'll need to wait another 5 , because he was watching some Fifa19 gameplays on YouTube.
This went on for 3 hours .
It worked because I feel like a title noob today .8 -
Bro, that code u call well written, would look better if it was encoded in base64
Damn, u look like the guy at github who thought it would be a good idea to sell to microsoft.
You are an insult to anyone who codes... or thinks4 -
WTF is the point a
of auto-generated documentation. Some dude litterally thought it was a good idea to read the code and write the exact same shit differently. WTF IS THE POINT!?
Documentation takes work, sorry, stop being lazy.11 -
Best tool:
Your hands!
- incredibly flexible
- express a lot of commands trough very little code (just raise the middle finger and tell me if you are not expressing something VERY strong with VERY little complexity)
- reusable
- interfaces
- smells of good soap
Worst tool:
Your brain
- highly power consuming
- wrinkly, ehw!
- overthinks a lot
- imposter syndrome
- hooked on sugar like it was cocaine
- hooked on cocaine like it was sugar
- refuses to comprehend chthulu5 -
I made a functional parsing layer for an API that cleans http body json. The functions return insights about the received object and the result of the parse attempt. Then I wrote validation in the controller to determine if we will reject or accept. If we reject, parse and validation information is included on the error response so that the API consumer knows exactly why it was rejected. The code was super simple to read and maintain.
I demoed to the team and there was one hold out that couldn’t understand my decision to separate parse and validate. He decided to rewrite the two layers plus both the controller and service into one spaghetti layer. The team lead avoided conflict at all cost and told me that even though it was far worse code to “give him this”. We still struggle with the spaghetti code he wrote to this day.
When sugar-coating someone’s engineering inadequacies is more important than good engineering I think about quitting. He was literally the only one on the team that didn’t get it.2 -
After 1 week working on a screen (design, logic, testing) my boss comes to me saying that what I've been work won't be necessary any longer and I should discard it.
1 month later asks for that same stuff and I tell him (jus like he said I should do) that I discarded the code.
Starts calling me names and how useless I am (this was normal).
So I pick up my stuff and just get out while saying: "please, if you are so damn good, you can do that shit yourself, I quit!"
Was there for 1 miserable year and that was my best choice I made till today.
Right now the company closed cause all the devs ended up leaving him6 -
School's windows installations had the UAC set to lowest.
Anyone could install malware or fiddle with important settings.
Oh by the way, the same school who's gData found it funny to go through my USB drive and delete all executables and all my code because it was "possibly malicious".
Started installing random crap and messing with people in retaliation.
Was fun.
Until I got caught.
Good thing I compiled a list of security flaws earlier on.
From that day on, everytime I messed up, I sold them two security vulnerabilites to let me off the hook.
These included access to all kinds of drives in the windows network, accessing other PCs desktop, literally uninstalling random printers from the network etc..
Fun time.3 -
The guy who became my manager just pushes to the prod branch.
On a repo where another team clearly set up development and production branches.
This guy has been pushing code like crazy and I always wanted to take my time setting things up properly in our team: TDD, CI/CD, etc.
Because he pushed so much he became my manager and I was seen as unproductive.
Data Science and software development best practices just dont coexist it seems.
Yeah yeah, it's up to me to start introducing good practices, but atm "getting it done" takes priority over the real based shit.4 -
!rant
Got back into android development recently and while everything was pretty flawless ( I managed to get the basic concepts implemented in a day) something wasn't right.
For some reason I was not happy with the code i wrote, although I took examples from google and tried to adapt their code style. It looked aweful. I hated my code.
But the code itself wasn't the core of the problem. I could easily add new features and replace components with new implementations without breaking the app. All those "good code quality" identifiers were there.
Turn out the problem is Java. Or to be more specific: Java 1.6
Every listener which only calls a single function once a worker has finished needs 6 lines of code. If you implement the inferface in the class it gets messy once there are multiple workers and you have a generic interface. And there are no lambdas!
So I made the switch to Kotlin.
The app was converted to kotlin in 30 Minutes. Android studio can convert the classes automatically and very little manual work is needed afterwards.
After that I spent 2 hours replacing the old java concepts with Kotlin concepts: lamdas, non-nullable types, getters and setters in kotlin style (which in this case is c# style) and some other great thing.
The code is good looking now. I like it. I like kotlin as it has a lot of cool things.
Its super easy to learn. It took me about 2 hours to get into it. It combines concepts from java, javascript, c# and maybe a few other languages to form a modern jvm 1.6 compatible typesafe language.
Android dev is fun again!2 -
Anyone ever run across some code that was so succinct and elegant, that you couldn't imagine ever doing something like that and start to feel bad?
<Look up who committed it>
Oh, well, damn... I used to be so good at this coding thing. -
My best code review experience?
Company hired a new department manager and one of his duties was to get familiar with the code base, so he started rounds of code reviews.
We had our own coding standards (naming, indentation, etc..etc) and for the most part, all of our code would pass those standards 100%.
One review of my code was particularly brutal. I though it was perfect. In-line documentation, indentation, followed naming standards..everything. 'Tom' kept wanting to know the 'Why?'
Tom: 'This method where it validates the amount must be under 30. Why 30? Why is it hard-coded and not a parameter?'
<skip what it seemed like 50 more 'Why...?' questions>
Me: "I don't remember. I wrote that 2 years ago."
Tom: "I don't care if you wrote it yesterday. I have pages of code I want you to verify the values and answer 'Why?' to all of them. Look at this one..."
'Tom' was a bit of a hard-ass, but wow, did I learn A LOT. Coding standards are nice, but he explained understanding the 'What' is what we are paid for. Coders can do the "What" in their sleep. Good developers can read and understand code regardless of a coding standard and the mediocre developers use standards as a crutch (or worse, used as a weapon against others). Great developers understand the 'Why?'.
Now I ask 'Why?' a lot. Gotten my fair share of "I'm gonna punch you in the face" looks during a code review, but being able to answer the 'Why?' solidifies the team with the goals of the project.3 -
When I realized "I" could change a computer's code. It was a very strong "I am the master now!" moment. I could be Jedi or Sith and control the destiny of this calculating machine for good or ill! I was the master of the computer universe! Also, I wanted to make games and graphics and sounds!
Now I write software that could legit kill someone really really if done wrong. Unlikely, but possible. Not the power I wanted...
One of the first computers I ever wrote code on was a 286. Quick Basic!13 -
First Rant here.
So I was working on some integration test issues when I found this by accident made by a professional level SW engineer:
@Test
public void testMethod() throws ApiException {
Response res = null;
try {
res = serviceToTest.callMethod();
} catch(Exception e) {
assertNull(res);
}
}
Was wondering why tests were being green after some code changes I've made cuz tests could have not been green afterwards.
Together with a senior (I'm also professional only) I've tried to explain him for a good 1-2hrs why this code is useless and he still did it. Good thing there are no errors in the real implementation from him after fixing the tests as it's code freeze here and we are having go live in a few days 🙃
Also luckily he isn't working on our code anymore and has only been doing so for a few weeks.
Wasted a day with it and gonna check all of his code now before I run in the next surprise.1 -
I’ve been interviewing with a startup for a Frontend Engineer role. In the interview they said they didn’t have a designer, that their founder and other devs do the design work. I thought “ok so they are still putting something together and don’t care much if the UI is crappy”, and still proceeded with it. I do the take-home test, it took a lot more than the 1-2 hours they said it should take (these estimates never seem realistic), I thought I did a pretty good job and send it back to them. I then got an email back from one of the founders, they really liked the code and my approach, but the UX was not good enough. He asked if I would be willing to iterate on it if given some direction? The direction: design your own version of our product. I refused. I thought this was a developer position, not a designer position.7
-
Help. I'm drowning in spaghetti code
I've been working at a working student (15 hours/ week) at a local software company for about a month now... and with everything I learned at college I'm kind of getting eye cancer here.
We still use SVN
We don't have any coding guidelines. No checkstyle, no overview over the program. When I started there I was just giving a ticket and they said good luck.
We just have some basic RCPTT Tests inside Eclipse and most of Themen don't work in the trunk because the gui got changed...
At least we have a ticket system but it doesn't get used by most of the working students.
I found 10 other bugs while reproducing and trying to fix 1 bug.
And I've never seen Java raped so badly. Today I saw a line that started with 6 brackets because whoever wrote it wanted to cast like there was no tomorrow. I see more instanceof in one day than in my whole devlife before.
The only thing we have is two normal employees that review our code before we are allowed to commit it into the trunk.
So yeah... I'm drowning in spaghetti-code.2 -
Anyone else had an interviewer just blatantly waste your time and lie to you?
I was recently interviewing for a job, the first couple of rounds went really well, and they gave out a fairly standard tech test. It was a basic tic-tac-toe game, with a few extra twists and a 120 minute time limit. They then wanted me to host what I had be able to code somewhere so they could test it out before the second technical interview.
The interview interview date came round, the interviewer never actually showed up, but 20 minutes late he sent me an email saying they wouldn't be going ahead because the code wasn't good enough, and cited a bunch of things that were well outside of the brief they gave for the test. and when I checked the access logs for the hosted 'live' version, it showed they hadn't bothered to actually look at it; they hadn't even checked out the code from the repo.
I've had similar things happen in the past occasionally, but is it just my bad luck, or is stuff like this becoming more common recently?6 -
A friend of mine once buried an exception deep in some code that any reasonable programmer shouldn't ever come across that said "you're the worst person I know"
A few days later when a guy in our project was working on his awful patchwork of a database mapping he managed to somehow actually hit this exception. We all got a good laugh out of it! -
Visual Studio Code - ever since the beta.
VS Code is... amazing. There's no words to describe it. It's just amazing.
VSCode since the inception was just this tiny version of Visual Studio that you can transform into your own little IDE. That was the whole point of VSCode - it was a extensible editor. For many years I've used it and never looked back, I still use VS from time to time but Microsoft really nailed this one.
Most of the editors I knew lacked good auto completion and good linting, which IntelliSense was good, and it became even greater once support for languages started piling up. Themes also were top notch, I still remember you can't theme the entire window just the editor, nowadays you can.
And last but not the least is the Remote integration. I didn't need to leave my OS just to do work from another, I just need a SSH agent and it works. It's very straightforward and easy.
Overall Visual Studio Code is a editor that is more about choice and your own style - which makes it unique from IDEs, its fresh and its definitely earned its place as one of the most sought after tools in development.3 -
1) Read the wiki on git. I probably have enough shorthands and test methods that you won't need much other shit to debug issues.
2) when debugging, remember that if it is there, there's a good reason why I put it there.
3) commented-out code is probably useful for maintenance. I left it there for a good reason. 😛
4) chances are whatever I wrote, was the state of the art at the time I wrote it. There might be better ways to do it now tho.
5) I always work modular. First, understand the structure. (probably also documented on wiki) DO NOT fuck up the structure. If you change it, you document it.
6) If you feel I wrote shit, it's probably because management annoyed the living shit out of me. Pun intended.
7) Your confusion is normal. I don't do dumb shit.4 -
I've been wondering this for a while now, but how are senior programmers able to (or at least seem to) remember all the code for all the different languages with all the different syntax?
Let me explain: From my experience there's usually two types of thinkers, there's the memorizers, and the logical thinkers. Its usually the difference between people good at history and people good at math. So considering that most programmers would need to be able to think logically (to problem solve obviously), how do they remember all this different code? I always forget the small details which I have to look back at earlier code to see how it was done (Especially annoying for written exams where we have to remember all the code and how to use it)7 -
Teammember left. I did his three tickets yesterday. Before that I created and applied new rescue procedure for broken deploys on production and deployed the app manually. Took me about 6 hours to do this right, find the cause, and solve it, and document what I did. After that my teamleader bought me a launch :)
It wasn't his, my former teammate responsibility to bring back prd to life, it was me being good and engaged employee. His tickets, on the other hand, were his duties. Took me one hour to code them. He was working on them for two weeks. I can't wait for the performance review, im definitely going to ask for a nice rise :)1 -
We were all drunk at a college party. I pretended that I was able to code something for a friend. He put me on his laptop and made me code. In 20 minutes I had finished. Everybody reviewed the little program and said it was all good.
When we reviewed again the program sober, it was full of bugs that none of my drunk buddies tested out1 -
was looking up some code, won't say which, trying to find something, won't say what, and, heck, I need to find out who wrote and maintains this awesome piece of art. After a couple hours of stalking done, yep, that's how good it was, I finally found the author and guess what? They died two years ago, 24 years old. Dead. Gone. A little more stalking and the punchline was: suicide.
FUCK, I don't even know them but it makes me real sad. It seems this' an actual issue in our line of work24 -
It's rant time again. I was working on a project which exports data to a zipped csv and uploads it to s3. I asked colleagues to review it, I guess that was a mistake.
Well, two of my lesser known colleague reviewed it and one of the complaints they had is that it wasn't typescript. Well yes good thing you have EYES, i'm not comfortable with typescript yet so I made it in nodejs (which is absolutely fine)
The other guy said that I could stream to the zip file and which I didn't know was possible so I said that's impossible right? (I didn't know some zip algorithms work on streams). And he kept brushing over it and taking about why I should use streams and why. I obviously have used streams before and if had read my code he could see that my code streamed everything to the filesystem and afterwards to s3. He continued to behave like I was a literall child who just used nodejs for 2 seconds. (I'm probably half his age so fair enough). He also assumed that my code would store everything in memory which also isn't true if he had read my code...
Never got an answer out of him and had to google myself and research how zlib works while he was sending me obvious examples how streams work. Which annoyed me because I asked him a very simple question.
Now the worst part, we had a dev meeting and both colleagues started talking about how they want that solutions are checked and talked about beforehand while talking about my project as if it was a failure. But it literally wasn't lol, i use streams for everything except the zipping part myself because I didn't know that was possible.
I was super motivated for this project but fuck this shit, I'm not sure why it annoys me so much. I wanted good feedback not people assuming because I'm young I can't fucking read documentation and also hate that they brought it up specifically pointing to my project, could be a general thing. Fuck me.3 -
!rant
So, Rust again.
When I learned that Rust doesn’t support inheritance, only traits (interfaces), I was shocked at first.
Then I tried to remember when the last time was that I have used inheritance in the code that I write (not the code that I use).
And I could remember an instance some months ago. But I also remember that I was very unsatisfied with that design and refactored it to use composition instead. And it was much better.
One of Rust’s properties is that many good practices in other programming languages are enforced rules in Rust.
And in case of inheritance, it seems like Rust decided that composition over inheritance is such a good practice that it should be a rule.
I’m not 100% convinced that there never will be cases where inheritance is better. But I still like this radical idea of forcing the devs to do it "the right way" in the majority of (if not all) cases.
I think many devs will disagree.
What do you think?14 -
i had to do a project with someone who isnt that good at programming. but for her to learn programming, i wanted to let her do part of the code even though i could have done it myself. so she wrote some code after 2 days without me intervening. then i checked out the code and it was total crap. it was ugly asf, it could have been optimized a lot more and a lot of variables were unnecessary and to think that the code was just around 30 lines in 2 days! when its not that optimized, they deduct points from the final grade and having useless variables and functions can also be a negative thing to the professors' eyes.
in the end, i rewrote the code myself because i wanted it to be better. my grade also depends on that code so i shouldnt be ugly asf.
i recognize my mistakes too and sometimes my code isnt as optimized as it can possibly be but imagine her code is waaaay fucked up.
p.s. it didnt even compile2 -
To the cock-sucking dev who decided it was a good idea to commit 5k+ lines of code written in his "own standard" accross multiple files, in a large project where all devs abide strictly to a certain standard set by the project description.
Fucking incompetent douchenoggin, you're about as useful as Anne Franks drum set!
I'm not saying you're the dumbest person on earth, but you sure better hope, he doesn't die.
Deadshit, dick sucking, penis grabbing sorry excuse of a human being.
Peace out.5 -
Honestly? I was always good at maths and creativity. And so, programming was natural to me. I was always good at it with minimum effort. ¯\_(ツ)_/¯
... Algorithms were a whole other story tho. I'm still not confident 'bout any algos I program from scratch. But hey, if it works, it works. (that became my motto about algos, kinda)
Forgot one thing tho: looking at relevant code to whatever I'm doing, be it in a tutorial or stackoverflow. I don't need the text or tutorial or explanation, I need to see code examples.2 -
Dev: "I've pushed some code. Give it a code review."
Me: "ok, i'll do it"
<<fast forward>>
Me: "Sounds good to me. Only thing, I wouldn't have gone for all those renames because that was not part of the request, maybe we can discuss ...."
Dev: "I like those names and besides, it's already deployed in production"
Me: " :| .... what's the purpose of a code review when you push straight into production ?4 -
Managed to land 2 interviews:
The first one was for a startup that was looking for a react programmer (I've never used react before).
The later was a php job at a big company. They told me they used cakephp which is a framework I had not used before either.
Still, I'm more familiar with php than react so I felt more confident with the second interview. However, I felt there was a lot of good chemistry going on in the first interview.
The interviewer was incredibly nice (he was the lead dev, not an HR person as opposed to the second interviewer)
He gave me a small react test to be completed within a week. I barely managed to do it in time but I felt good about the solution.
Just as I was sending it, I get a call from the second interviewer saying I landed the php job.
I wasn't sure if my novice react skills would be impressive enough to secure me the react job (and I really needed a job) so I accepted.
After explaining everything to the guy who was interviewing me for the react job, he understood and was kind enough to schedule a code review where he walked through my novice code explaining what could be improved, helping me learn more in the process.
I regret not accepting the react position. The PHP they got me working with is fucking PHP5 with Cake2 :/
Don't get me wrong, I like the salary and the people are nice but the tech stack they're using (lacking source control by the way!), as well as all the lengthy meetings are soul-draining.6 -
Today I had a client raise a high defect directly with my boss’s boss. I got called into a meeting and was told
I needed to fix it immediately.
I looked and realized it was in their code and not our component. I told them as much. They asked me if I would still fix it. I refused. Told them it’s not my component. Fix your own problems.
Sat their as my boss’s boss asked them how they functioned if they didn’t even understand their own component. Feels good man. All I could do is smile at them trying not to laugh.1 -
Does anyone get the feeling that as they become more senior, they care less about meeting "best practices" and more of just "good enough"?
Best practices being everything in those books about TDD, unit testing, design patterns, design artifacts.
Good enough: enough so it won't blow up in prod, some tests but not 80-90%, some docs. Basically not like those public docs, open source projects/frameworks where function is covered
When I first started professionally, I was all about efficiency, good design, reducing technical debt, clean code.
But now, I look at problems and instinctively I may make these decisions but I don't really think about it much. First goal is to just get something working, clean it up later... Maybe.6 -
It's still in development. It often says the opposite from what is expected. Try Retoor1b chatbot at https://llm.molodetz.nl
This was result after building bot + chat website from scratch including training with embeddings. Design is generated by GPT, I tried my own but all ugly.
It's quite cool huh? Ask it to write some code for you. It's absolutely terrible. If it's down, try again in 5 minutes. I'm still working on it.
What's the result? I finally have a toolkit to make good/serious bots. Code could be bit better, but that's for other day.
Stack: self written webserver (and yes, you can post a gb to it or ddos it. Not sure if it survives the first one. I should limit requests to one mb anyway. Http headers may officially not be more than 4096 in total) since I know http protocol from my head anyway. Python websockets module. Asyncio, chromadb.
It could have xss issues. Don't care.
Let me know what you think42 -
“You want to know the answer to that” is the answer I got to my question about a piece of code...
I guess he thought he’s too good for the job.
The dude had decent amount of knowledge but was arrogant as fuck.
Every time I asked him a question he would react as if I was making him work without pay that too on a Sunday (it wasn’t)
P.S. fucker got rejected2 -
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 -
Today, I was so certain that all the functionalities were implemented to handle some webhook calls from a third-party service. It's a script I wrote that has been running for 2+ years uninterrupted or without any issues.
We got some "complaints/notices" today that some "special" actions weren't registered, so I thought that the third-party service just didn't send those actions via their webhook. After some research I found a part where they explained that those actions trigger the webhook like any other action etc. So..
First thought: "okay, maybe they implemented that at a later stage" (was not the case)
Second thought: "maybe this is not what the client meant" (it was)
Third thought: "Then it should have been implemented" (it wasn't)
Okay, time to look at the code to see where this could get handled but apparently isn't. All the actions look good, nice, clean handeling etc, nicely documented code (gave the 'past-me' mentally a high-five)..
I scroll further down to that specific action and it was quiet obvious why it didn't work.. I just see an empty function with the comment:
"//TODO: maybe handle this action one day. don't know what this does atm, probably unused.. Will take a look at it next week.."
.. :D
I took my 'high-five' back..I just needed to copy-paste some other code and change 1-2 parameters..1 -
Boss wanted me to make changes in company's website which was based on wordpres s.
I knew it could be done by tweaking some JS code, but I have very less experience with wordpress
But wordpress is easy man(Internet told me).
Give me 5 minutes, you will see the changes in production.
Being lazy af I directly logged in to ftp, checked out some files, updated some code, I was good to go.
Before pushing it, I opened the website and it was GONE ٩(๑´0`๑)۶
Now there was no public_html in the root.
I was fucked. I have accidentally deleted the website that had no backup.
And the best part I was on leave from
next day.
I was looking everywhere for backups, looked into google cache to get the contents. I have to recreate the complete site now.
Just when I was asking questions on choice of my profession and simultaneously looking here and there in FTP for backups,
I found the jewel "public_html".
It happens out that I have accidentally moved the folder to some other directory.
Phewww.
Moved it back to root. Site was up and running.
Reassured myself that I deserve to be a dev.
Backed up complete site, made the changes.
Uploaded it.
And the best part, amount of wordpress I learned in those three hours was way more than I could have learnt in many weeks.
Lessons Learnt :
A) ALWAYS keep backups.
B) You SHOULD NOT make changes on prod directly
C) You become superhuman when your brain know you are going to be fucked 😂3 -
When I was in first year, I let my classmate copy my source code for our VB program in order for him to save the semester. We both agreed that he should change the variables, etc first before submitting the project.
GOOD NEWS: He literally changed the variables.
BAD NEWS: We had the same interface on our project.
It sometimes haunts me, until today.3 -
!rant
Just deleted 6 files and simplified a process significantly, omg it feels so good to throw stuff out
My product owner was once under the impression that writing more code was something I enjoyed doing, but it couldn't be farther from the truth.
Writing new solutions and patterns is fun, adding anything other than that is just more future maintenance work1 -
Einstein supposedly has a quote attributed to him: "Perfection isn't achieved when there is nothing left to add, but when there is nothing left to remove."
I find that I aggressively refactor code where I can to only what is absolutely required. It does also have the knock on effect of reducing scope of bugs, when the code is smaller there's only so many places bugs can be.
Tesla claimed to have the ability to create designs in his head and only built things once he was satisfied that it worked in theory first, now it's rare I can do that, but I will use a repl to prototype or test modules in isolation before just hacking on the actual code.
Jobs, I mean, I know he didn't code but he was always insisting on designs that looked good and was generally uncompromising in his design centric view.
My friend, she was my Starbucks barista for a while but I've slowly been teaching her code and she's taught me a lot about how to teach others to code, she also happens to be my favourite student.3 -
Thought I would only do frontend-stuff when I started working. Boy I was wrong. I thought it would be easy coding in a real company and not just in schoolprojects, boy I was way out in the blue. But when your code works and is actually used by people, I never could've imagined that would feel so good!4
-
That one fucking time my text editor so damn high, that it choose to encode my file utf-8 BOM.
I was using Notepad++ because I thought it would just provide a good syntax highlighting, without stabbing me in the back
Seemingly nothing wrong with the code, but it took me, a friend and two teacher almost half an hour to figure out why the css simply wasn't work, even though it was clearly used and worker as intended when embeded in the file.
This was some years ago, so please don't judge me for my editor of choice at that time
Other than that, i simply suck at css and gladly use css frameworks 😅8 -
I wanted to create a microcontroller website. It would feature simple circuits and microcontroller code to build things. The intent was to show absolute beginner concepts to people. Since I am older than the whipper snappers out there I thought I would have concept of some old man running the website.
I found cartoon artwork featuring an old man and I also got the domain oldmanmicro.com. I then created a bunch of pages featuring some really basic circuits. I setup an affiliate program with amazon to provide kits to people and embedded those into the website. This site was going to take a lot of creativity. I struggled with what to put on the site. This was going to take time. At this point I felt pretty good with my progress. It looked nice, the links were good, etc.
Then I did web search for oldmanmicro. I found my website in top hits. I also found something else... The 3rd or fourth hit down was some fucking old dude with a micro penis website. WTF! The worst possible combination of letters in my domain name produce this terrible experience. I was already struggling with content ideas, and this just demoralized my efforts. Thus ended the tale of the oldmanmicro.com. Perhaps the micro penis guy bought it, I don't know. I am afraid to look.
This was my very ignorant adventure with not researching a domain name thoroughly.6 -
Interestingly enough, the worst JavaScript code I’ve ever had to deal with was written by back-enders coming from a Java background. The app was unusable and it took me a few weeks to put it back on track.
So is JS the culprit, or is it the elite backend community that fails to even try to make good use of it? 🤡2 -
I started programming in the eighth grade, and the reason as to why I continued was my Computer teacher. She was a really strict person who was generally very irritated with our class, but one day I had decided to actually sit down and do the web page she had asked us to make in the lab.
The page was a very simple one, all you had to do was put a title and below it a paragraph and then a subheading as well that was moving around using the marquee tag.
Since no one generally bothered to do it because we were often left unsupervised in the lab, I was the only one who had finished it.
She came back and saw that I had completed it and no one else; in that moment, the teacher whom we had tagged 'Hitler' because of her rude and mean nature, told me that I had done a really good job and was happy with my effort.
That somehow that made me feel like making the best goddamn web page in every lab class thereafter.
Today I have mostly forgotten how to use HTML and CSS, but that whole idea of writing words and making your computer do shit was beautiful.
If I can say today that I know how to code, it is because of her.
One day I hope to tell her this in person and express my absolute gratitude.1 -
(PSA: serious replies to this kind of wk tag might be best suited under Random)
"The way you've done this seems much less complicated that what I would've come up with."
"You've been reading Clean Code?"
"I didn't think that was possible, nice."
And finally, the most extreme one:
"Can you print this code for me so I can hang it on my wall of good code?"3 -
So we had this legacy Objective-C codebase for a mobile app that was actually pretty good: I'd inherited the codebase and spent the past several years gradually improving it and I was actually quite proud of the work I put into it. So of course management decides to scrap it (with NO consultation from the engineers) and outsource a complete rewrite of the app in C# for Windows Universal.
Let me tell you. That code was without a doubt and without exaggeration the *worst* code I've seen in my close to 30 years of experience as a developer. I mean they broke every rule in the book, I'm talking rookie mistakes. Copypasta everywhere, no consistent separation of concerns, and yet way too many layers. Unnecessary layers. Layers for the sake of layers. There was en entire abstraction layer complete with a replicated version of every single data class *just* to map properties in pascal case to the same property in camel case. Adding a new field to a payload in the API amounted to hours of work and about eight different files that needed to be modified. It was a complete nightmare. This was supposed to be a thin client, yet it had a complete client-side Sqlite database with its own custom schema (oh and of course a layer for that!) completely unrelated to the serverside schema, just for kicks. The project was broken up into about eight or nine different subprojects, each having their own specific dependencies on various of the other subprojects in such a tightly-knit way that it made gradual refactoring almost impossible. This architecture was so impressively bad, it was actually self-preserving!
Suffice it to say it was a complete nightmare, and was one of the main reasons I ended up leaving that company. So just sayin', legacy code isn't always bad. :) -
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 -
Proudest bug squash? Probably the time I fixed a few bugs by accident when I was just trying to clean up an ex-coworker's messy code.
So I used to work with a guy who was not a very good programmer. It's hard to explain exactly why other than to say that he never really grew out of the college mindset. He never really learned the importance of critical thinking and problem-solving. He did everything "by the book" to a point where if he ran into an issue that had no textbook solution, he would spin his wheels for weeks while constantly lying to us about his progress until one of us would finally notice and take the problem off his plate. His code was technically functional, but still very bad.
Quick Background: Our team is responsible for deploying and maintaining cloud resources in AWS and Azure. We do this with Terraform, a domain-specific language that lets us define all our infrastructure as code and automate everything.
After he left, I took on the work to modify some of the Terraform code he'd written. In the process, I discovered what I like to call "The Übervariable", a map of at least 80 items, many of them completely unrelated to each other, which were all referenced exactly once in his code and never modified. Basically it was a dynamic collection variable holding 80+ constants. Some of these constants were only used in mathematical expressions with multiple other constants from the same data structure, resulting in a new value that would also be a constant. Some of the constants were identical values that could never possibly differ, but were still stored as separate values in the map.
After I made the modification I was supposed to make, I decided I was so bothered by his shitty code that I would spend some extra time fixing and optimizing it. The end result: one week of work, 800 lines of code deleted, 30 lines added, and a massive increase in efficiency. I deleted the Übervariable and hardcoded most of the values it contained since there was no possible reason for any of them to change in the future. In the process, I accidentally fixed three bugs that had been printing ominous-sounding warnings to the console whenever the code was run.
I have a lot of stories about this guy. I should post some more of them eventually.2 -
I was 33 and it was 1996 when I decided I was interested in programming. I really enjoyed it and made decent money. Things have been rough the last 3 years in regard to my career. I went from being a top performer to getting bad performance reviews and getting let go from jobs. I have started my own business but it is not making a profit yet. I write good reliable but I am slow because I test and try to write clean code. I have also tried to avoid working with a couple of hot js frameworks because I find javascript frameworks annoying. My husband says it is time to do something else like becoming a project manager. I might get my pmp but continue to work on my side project. I love programming but have some major disappointments lately.2
-
Had to make a change in an ugly codebase. For this I had to change a config value which was duplicated three times in the code base. So I wanted to refactor the code so that the config was in one place.
I worked on this for two days and it was starting to look good. On the third day when I started to work on this I realized that I couldn't start the server anymore. Looking through version control I figure out that my co-worker had stayed till 3am last night to work on the change I was supposed to make.
I had to spend all morning undoing his commits. Once I was done refactoring the actual change took me ten minutes.
Why the fuck would you stay until the middle of the night to work on someone else's task?!
Could have just asked how it was coming along if I wasn't working fast enough for him.2 -
Frontend-Developer steps into my office and tells me that my code does not work and that he has checked everything.
>me confused, cause I did it every time so<
So I spent one hour to check and recompile my code again and again. I created more console outputs than my whole last week... And at the end... It was not my fault, I had to find out that the front- and backcolor of his label are the same so the text was not visible.
Dear frontend developer,
I love your designs and most of the time you make a really good job, but please check something like this before you confuse a backend developer for one hour and let him doubt about himself...
Thanks!
Sincerely,
Your backend dev3 -
Colleague asked me to look at his eCommerce search filtering system as the customer was complaining it was slow taking 5-6 seconds to find results.
Delving into the code deeper, I discovered he was querying the results, sticking them in an array and then sub querying the results looking at all the combinations.
On top of that each sub query looked at the database fields using "DESCRIBE" to then search them each time it found a pair!
The total query count for one page search was 14,512!!!
Why oh Why? One SQL query could of done all that in one go.
I look at other code bits he's done and he's very good in other areas. I just don't get how sometimes a good developer can make such a weird decision? It's almost as if he wanted to make it as complex as possible.6 -
Todays rant is about me trying to add some long text into my database. I tried it all day long, but the text was inserted partially all the time. I changed the collumns data type to BLOB, this felt false, but it seemed to work. The bad feeling triggered me to search further, so I rewrote my code and found the source of this behavior. I used utf8-decode-function on my text and that triggered some problems when inserting the text. I don't completely understand it, but I solved the mystery, that fucked up the day. I will sleep good now.
-
Slogging through half baked code, I wondered to myself... Who the fuck is Robert and where is he?
Quickly searching through Google and finding a handful of results I see that he had left long ago. Probably leaving for good reason. I'll never be able to ask him though. Never will I know why he left. He probably has a very sensible reason, but goddamn do I wish he left something that I could use to discern what he has created.
There is no documentation, no reasonable information about why anything was built the way it was, only just mountains of rusty ass baren code to scale down.5 -
>>Struck on a stupid concept with very little documentation.
>>Searched for days, finally frustrated and fucked up.
>>Started searching for libraries,found a decent one with good documentation and even a sample usecase.
>> library handles my application completely fine, me happy and motivated again :D
>>opened the library's source code, that was again very nice and simple.
>>Now learnt the concept and implementing it in my app natively . Even opened some issues in the creator's library
>>thank you github :) -
This book isn't at all what I thought it was going to be. I hoped it would be patterns and practices to writing better code...it's more like a philosophical Chicken Soup for the Developer's Soul. Self-care for syntax geeks.
And by that merit, it's actually quite good. -
I really need to vent. Devrant to the rescue! This is about being undervalued and mind-numbingly stupid tasks.
The story starts about a year ago. We inherited a project from another company. For some months it was "my" project. As our company was small, most projects had a "team" of one person. And while I missed having teammates - I love bouncing ideas around and doing and receiving code reviews! - all was good. Good project, good work, good customer. I'm not a junior anymore, I was managing just fine.
After those months the company hired a new senior software engineer, I guess in his forties. Nice and knowledgeable guy. Boss put him on "my" project and declared him the lead dev. Because seniority and because I was moved to a different project soon afterwards. Stupid office politics, I was actually a bad fit there, but details don't matter. What matters is I finally returned after about 3/4 of a year.
Only to find senior guy calling all the shots. Sure, I was gone, but still... Call with the customer? He does it. Discussion with our boss? Only him. Architecture, design, requirements engineering, any sort of intellectually challenging tasks? He doesn't even ask if we might share the work. We discuss *nothing* and while he agreed to code reviews, we're doing zero. I'm completely out of the loop and he doesn't even seem to consider getting me in.
But what really upsets me are the tasks he prepared for me. As he first described them they sounded somewhat interesting from a technical perspective. However, I found he had described them in such detail that a beginner student would be bored.
A description of the desired behaviour, so far so good. But also how to implement it, down to which classes to create. He even added a list of existing classes to get inspiration or copy code from. Basically no thinking required, only typing.
Well not quite, I did find something I needed to ask. Predictably he was busy. I was able to answer my question myself. He was, as it turns out, designing and implementing something actually interesting. Which he never had talked about with me. Out of the loop. Fuck.
Man, I'm fuming. I realize he's probably just ignorant. But I feel treated like his typing slave. Like he's not interested in my brain, only in my hands. I am *so* fucking close to assigning him the tasks back, and telling him since I wasn't involved in the thinking part, he can have his shitty typing part for himself, too. Fuck, what am I gonna do? I'd prefer some "malicious compliance" move but not coming up with ideas right now.5 -
Worst code review had to be when a senior architect told me that my new library was good, but should be a bunch of files that we copy paste from project to project instead.
His comments were just so out of touch with a) what we were trying to fix with the team. b) basic understanding of good modularized code.
I’m far from a stuck up dev. Not stupid enough to think I’m better than everyone, or have nothing to learn from anyone.
But I totally had a “my boss is a ****ing retard” moment. It was hard to listen to him after this as it was hanging over my head “was I wrong? Or is this just no-library man striking again?” -
I once failed a subject during my masters (complex analytics and measure theory).
Next year I decided to give it everything I've got. I had grown to love it and could solve most problems they threw at me. Hand written an 80 pages long "book" distilled from all the notes, proofs and visualisations from all the lectures that year.
I only exerted this effort (even though I could've just "passed" this subject) because the lecturer was so damn enthusiastic about maths. Even though he wasn't a CS teacher this course was my best experience of a teacher at uni. He loved the beauty of the maths he was teaching and managed to make me love it too.
He was a maths geek and when I aced my final he told me he actually writes code too. He showed me some simulations he wrote while he worked on some theoretical nuclear physics stuff, because that's what he was into. Really cool guy. I wish more CS lecturers were as good teachers.1 -
MENTORS - MY STORY (Part II)
The next mentor was my first boss at my previous job:
2.- Manager EA
So, I got new in the job, I had a previous experience in other company, but it was no good. I learned a lot about code, but almost nothing about the industry (project management, how to handle requirements, etc.) So in this new job all I knew was the code and the structure of the enterprise system they were using (which is why the hired me).
EA was BRILLIANT. This guy was the Manager at the IT department (Software Development, Technology and IT Support) and he was all over everything, not missing a beat on what was going on and the best part? He was not annoying, he knew how to handle teams, times, estimations, resources.
Did the team mess something up? He was the first in line taking the bullets.
Was the team being sieged by users? He was there attending them to avoid us being disturbed.
Did the team accomplished something good? He was behind, taking no credit and letting us be the stars.
If leadership was a sport this guy was Michael Jordan + Ronaldo Nazario, all in one.
He knew all the technical details of our systems, and our platforms (Server Architectures both software and hardware, network topology, languages being used, etc, etc). So I was SHOCKED when I learned he had no formation in IT or Computer Science. He was an economist, and walked his way up in the company, department from department until he got the job as IT Manager.
From that I learned that if you wanna do things right, all you need is the will of improving yourself and enough effort.
One of the first lessons he taught me: "Do your work in a way that you can go on holidays without anyone having to call you on the phone."
And for me those are words to live by. Up to that point I thought that if people needed to call me or needed me, I was important, and that lessons made me see I was completely wrong.
He also thought me this, which became my mantra ever since:
LEARN, TEACH AND DELEGATE.
Thank you master EA for your knowledge.
PART I: https://devrant.com/rants/1483428/...1 -
Be me, get a consultant job, go to a supposedly great client that has fame of getting scouted by Google. (attn: I doubted all this shit before I started)
Learn the basics by a awesome mentor and trial/error stuff at the same time to get the hang of things, after that was done, I noticed there was no documentation whatsoever, code is spaghetti and your documentation, good luck!
Royal spaghetti, you can't make heads or tails of it, dev code in production, empty try/catch blocks, empty statements, if (true)... (incl. their core classes)
Keep in mind this is a multi milion dollar company...
Someone please understand my pain...6 -
In This Rant: A mildly satisfying piece of mind story.
Using code to prove yourself right is a hell of a drug.
A few weeks ago I whipped up a tiny program that downloads configs from hardware we manage. Since the vendor's API documentation is hidden behind a pay wall, my method of extraction is different. It results in bigger files, but testing showed it to still be valid.
Enter today. Interns at work downloaded a config to load onto a spare machine and it won't work.
"TheCapeGreek, your configs don't work"
I was confused since I tested the files when I built it and it worked. I am also currently fleshing out that download utility's features so the fear that I've been wasting the past 2 weeks on improvements is looming.
Last 15 minutes of the day and nothing else to do so I figured I might as well whip up a string comparer. The smaller file's content is scattered in the big file so a direct diff won't work.
Code it all, quick hardcoded proof of concept code, bit it got the job done. I was right, my bigger file is still correct!
Turns out the issue was with the machine they were configuring. They found this out before I finished my test code, so I'm off the hook already, but it was good to have piece of mind haha!1 -
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 -
(inspired by another rant I read here)
Last semester we were learning Java in the Programming Fundamentals class and a friend of mine asked for help with an assignment.
The objective was to make a virtual store (as a console app) in which the user would be able to select a few products, customize some of them and then the program would print out a receipt, with a list of all products, their prices, and the total cost.
Simple enough I thought, but there was a catch: you were not allowed to use arrays because the teacher hadn't taught that to the class yet. So I was like "how the fuck are you supposed to do this then?". Turns out the way to do it was to just append text to a string in order to generate the receipt. This is stupidly simple, so stupid that it didn't even cross my mind.
It's just that it's an awful way to architecture your code, it's just plain shit. Sure, if you're learning programming that's completely ok, but using that code on production is just completely unfeasible and I think that's why it didn't even cross my mind to do it this way. I'm just constantly worrying about performance and good code architecture and organization that the simplest of all solutions slipped my mind. When I finally discovered the way the teacher wanted us to do it I just wanted to kill myself...3 -
Curious interview process for a job I was denied for. I was told to create an app for a "case study" I was given a week it was supposed to be a single activity sports app written in MVVM with a specific API. I turned in a single activity, 3 fragment application, that made queries and displayed results from that specific API as well as told the weather and in quirky quotes told you whether or not it was a good idea to go tailgating. When I got to the interview after turning it in a day early they said they loved the application, hounded me on code (all questions in which I answered) and they told me that I would get word on next steps within the next few days. Obviously I didn't get that job as earlier stated however, does this not seem weird?3
-
I was recently hired as a front end dev for a certain project. The owner of the project already had a backend guy who apparently was almost done. The guy was using a django to develop the website and just when we were about to integrate the front-end and backend he fucking bailed out! Saying he had another project. So I downloaded his code from github so that I could complete the backend myself but holy fucks it was so horrible... This guy didn't even know what he was doing... Just creating a million django apps which didn't do shit.. Oh and did I mention he used django 1.1... Such a shit head! But good for me... I'll be the one getting paid for the whole thing...2
-
This post is kinda late. For those who haven't read my previous rants, a marketing coworker bragged about a feature that we hadn't yet finished. (I'm thinking that they perhaps did it to put extra pressure on the dev team 🤔.) Of course it backfired pretty bad, because this feature was a plug-in for another service, and even though the dev team was on time with the feature, the other service we were writing a plug-in for took _sooo_ long to approve of our code, and it made this marketing guy look so bad in front of these clients because the feature was a few weeks late.
A part of the new feature was that some of their data would be synced with this service. These customers were so important that we couldn't afford to disappoint them, and the solution was... *drumroll please* ... that this marketing guy would have to manually copy the customer's data from the service into our platform to make the customer think this feature is ready. Row by row. I'm hearing it takes about one hour of their day 🤣
I mean I'm good friends with the guy but... they kinda deserved it2 -
Not sure if it's the worst code review but it's a recent one.
We don't really do code reviews where I work unfortunately but my coworker used my framework for the first time (build some nice composer libraries for cmdline projects) and asked if I could make them do autoloading.
He never used namespaces before so I was glad to help him out.
What I saw was a dreadful mess. His project was called "scripts" so good luck picking a namespace...
Than it was all lose functions in the executable file. All those functions are however called by a class in another file (if they where not calling eachother as a cascading mess). That class was extending an abstract class from my library as instructed. However I never imagined my lib being raped like that.
The functions themselves are a horrible mess. Nothing uniform completely different style (our documentation states PSR's should be used).
Parameters counts higher than 5.
Variable names like Object and Dobject (in calling function Dobject is Object but it needs a fresh one.
If statements on parameters that need basically split it in two (should simply be to functions)
If else statement with return of same variable as a single line (sane people use ternary for that)
Note that I said functions. All of it should have been OO and methods. Would have saved at least some of the parameter hell.
I could go on and on. Do I think the programmer is bad yes (does not even grasp interfaces, dep injection, foreach loops). Is this his best work no. He said that for a one of script like this it just has to work. Not going to be used elsewhere. I disagree as it is a few thousand lines of code that others have to read too.2 -
CAN NODEJS KINDLY GO FUCK ITSELF?
well maybe not node itself, but those node js so-called "professional node developers"
WHO THE FUCK thought it was a good idea to pass about EVERY SINGLE ARGUMENT as a global variable so absolutely no code insights are available, eslint with THEIR eslintrc shows ABOUT ONE MILLION DIFFERENT LINTER WARNING and on top they commited the node_modules folder
-_-
I'm out.4 -
Legit my only answer to fixing shit code for a nursing app at work is.....
Writing more shit code. Man the dude that developed this before had 0 clue what he was doing.....and because shit grew out of control there is shitcode everywhere.
I like writing shit code though. It is good practice.
Writing shit code without knowing is one thing. You really do reach expert level when you write shit code WHILE being fully aware of it.1 -
probably every time I see my tests failing.
Each time I am writing tests I'm convincing myself "it's an investment", "spend 2 hours now to save 2 days later", "unit-tests are good".
And each time I'm chasing away ideas like "perhaps they are right, perhaps writing unit tests is a waste of time..", "this code is simple, it should ever break - why test it??", "In the 2 hours I'll spend writing those UT I could build another feature"
Yes, it is terribly annoying to write tests, especially after writing the production code (code-first approach). Why test code that you know works, right?
But after a few weeks, months or years, when the time comes to change your feature: enhance it, refactor it, build an integration with/from it, etc, I feel like a child who found a forgotten favourite candy in his pocket when I see my tests failing.
It means I did a very good job writing them
It means it was not a waste of time
it means these tests will now save me hours or days of trial-and-error change→compile→deploy→test cycles.
So yeah, whenever I see my tests fail, I feel warm and fussy inside :)2 -
Since roughly 1 year ago I have been making "leftoff" comments in my code, whenever a work day ended or so, with a few notes on what I was doing and what I was about to work on next.
And I recommend it, I think that's good practice. Because I forgot to do it on friday and I have no GOD DAMN CLUE what I was working on :|3 -
I'm curious, what was the most ridiculously otherworldly, the least understandable, eye-opening code you have every seen?
BUT, I mean that in a good way. And what did you learn from it?
For me personally, I would probably say some of the c++ stdlib implementations. Just totally not English in some places. I mean seriously, sometimes asm is more readable than c++15 -
Don't know.
All I know is that I suck at calculus but I write good code.
Weird.
If I would have to decide, early on I wrote random stuff 'til it worked.
Then I attempted to comprehend what I just did and started reading books.
That's probably when I first understood what I was doing.6 -
I had a school project with a friend, we concord to code some parts of the program, share it and explain the code so the teacher see the code was ours, when the final date come, after some doubts from my find we could delive the project with a not good note, the time passed and the teacher repeated the temps for a final protect, my friend was totally lost, the he arrives with all of his part, I questioned him about the code but he don't not so much abut, we almost fail the final protect because he buy the code to someone else and couldn't explain it to the teacher.
This was my face when I knew he cheated.1 -
This is about both worst boss and most annoying co-worker.
Well, this boss didn't care how much code we wrote, or how good it was (well, at least he didn't care that much); only how much commits we do. And this coworker literally did a script to do a commit every 10 minutes. 24/7. Everyone else was completely mad about it and about a week later we achieved that he was kicked from the job. Since then I still get trauma if someone commits something unimportant.9 -
One good thing about working at a shitty place is you end up knowing what not to do by just pure pain.
I once consulted for a company who had the latest tech - kubernetes, bit bucket, you name it. But it didn't matter. The code was shit. It's not about the tech, it's always about the people that use the tech.5 -
I guess I'll post my first rant, rant.
(Aka rant that wasn't a pun)
The Ipads our school use all have the same code, 0000. Even though about all the features are blocked... They never blocked the ability to change the pass code. No one would know who did it, and there would be 9999 possible choices for the new IPad. Who ever though it was a good idea to let highschoolers (12-18 year old) find this out.2 -
I had a really good friend years ago, like 2005, who lost an entire assignment he wrote in Visual Basic for calculating heat rising in a soda can. It was on his work computer and he deleted it by accident. It was his senior project and last thing he had to turn in before graduation. He showed me what he needed and I was like, "That's easy. I think I can write that."
He still had all the equations. I built the simulator in Java (I had just graduated and had all the time; looking for my first job). I got to teach him some stuff about programming, and he taught me stuff about Thermo/Engineering. I still have that code; moved it from CVS to Git. 13 years ago ... wow:
https://github.com/sumdog/...1 -
This is embarrassing, but the first days of learning about AngularJS I had to implement functionality about a new component of the WebApp I was building.
I did a good templating, I build the component along with its controller and services, I verified there wasn’t any memory leak and that everything was in an isolated scope. Yet nothing at all appeared on the app. It took me more than 30 minutes until I realized...
I didn’t put the source code on the index.html file 😅
For people who know more about compiled languages such as C or Java... that’s like not putting your source code file in the makefile. 😅
I felt literally like the dumbest person in the planet at that moment. 😀🔫1 -
!rant
So on the last day before launch our latest feature I'm informed that a requirement was missed and it had to be implemented before go live otherwise the business didn't want the feature. The feature in question was pretty drastic and basically required a scheme rewrite, new tables, etc. So I spent the entire day making the change.
Thankfully I pushed the whole project for good code coverage. Therefore, all I had to do when I was done was run all of our tests and make sure they passed. *warm fuzzy feelings* -
I took a job with a software company to manage their product, which was a SaaS property maintenance system for real estate, social housing, etc.
There was no charge to real estate agents to use it but maintenance contractors had to use credits to take a job, which they pre-purchased. They recharged their credit costs back to the real estate agent on their invoice).
Whether this pricing model is good or not, that's what it was. So, in I came, and one of the first things management wanted me to deal with was a long-standing problem where nobody in the company ever considered a contractor's credits could go into the negative. That is, they bought some credits once, then kept taking jobs (and getting the real estate agent to pay for the credits), and went into negative credits, never paying another cent to this software company.
So, I worked with product and sales and finance and the developers to create a series of stories to help get contractors' back into positive credits with some incentives, and most certainly preventing anyone getting negative again.
The code was all tested, all was good, and this was the whole sprint. We released it ...
... and then suddenly real estate agents were complaining reminders to inspect properties were being missed and all sorts of other date-related events were screwed up.
I couldn't understand how this happened. I spoke with the software manager and he said he added a couple of other pieces of code into the release.
In particular, the year prior someone complained a date on a report was too squished and suggested a two-digit year be used. Some atrocious software developer worked on it who, quite seriously, didn't simply change the formatting of that one report. No, he modified the code everywhere to literally store two-digit years in the database. This code sat unreleased for a year and then .... for no perceivable reason, the moron software manager decided he'd throw it into this sprint without telling me or anybody else, or without it being tested.
I told him to rollback but he said he'd already had developers fixing the problems as they came up. He seemed to be confident they'd sort it out soon.
Yet, as the day went on more and more issues arose. I spoke to him with the rest of the management team and said we need to revert the code but he said they couldn't because they hadn't been making pull requests that were exclusive to specific tickets but instead contained lots of work all in one. He didn't think they could detangle it and said the only way to fix was "play whack-a-mole" when issues came up.
I only stayed in that company for three months; there was simply way too much shit to fix and to this day I still have no idea the reasoning that went on in the head of anyone involved with that piece of code.2 -
At first, my family was like "Don't waste your time on the computer, in college, you will learn how to code". I didn't listen, I started learning C#, but somehow I ended up learning C++ lol. Then I started with C, assembly, and SystemVerilog.
After they saw how good I was at it. They started supporting me. I don't blame them for not supporting me at first, they were ignorant about the topic, so they were blindly making assumptions. -
Worst documentation? Unreal Engine 4's documentation on editor customization (custom panels/windows and whatnot). It might have improved in the last two years, but the last time I made a custom editor there was almost zero documentation on the matter and on their Slate UI framework. The little documentation that existed was very vague and had awful examples.
I don't remember very well, but I think it took me close to two weeks to get something very basic working. I had to read a LOT of C++ code filled with generics and macros to figure everything out, but after I did I enjoyed a lot working with that stuff.
I just don't know how I was able to do that, working with UE4 was a pain the butt every. single. day. Runtime error on the gameplay code? Too bad, the whole editor will crash and then take ~40s to reopen. It was crash after crash, ~1min of compilation time for any little change to the code, so so so so much frustration.
I do miss a those times a bit though, because even though it was hard, it felt good to feel competent, to know something complex reasonably well to the point I could help people on forums. Today I always feel I don't know enough about the languages/frameworks I use. It's kinda depressing, it takes a huge toll on my self confidence. But whatever, let's keep going, one day I'll get there :) -
Fuck you apache server...
Why did your dumb ass developers decide it was a good idea to not support "expect 100 continue headers". I seriously suspect that the devs were high smoking dragon dildo ashes like they were getting ready to get a whole chair shoved up their asses.
I wasted alot of time thinking i was getting a 417 http code because i fucked up my API implementation... No, it was the dumb apache server that decided to give me the finger.
Also, whoever built the HttpClient for .net framework 4... Fuck you too for automatically adding that dumb header to PUT requests and not properly documenting this or allowing for it to be disabled in a non hacky way.
I appreciate and enjoy solving coding problems... I, however, can't stand dumb decisions like the two above. -
I was inspired to be a programmer when I was 7 yrs old.
I started out using my dad's old Macintosh, it was pretty good at the time when I was 7. I played a game called "On The Run" at miniclip. I thought that one day I want to become a programmer who can do more than this or any other game.
Later when I was 9, my father bought a laptop but then he gave it to me. So I started and learn how computers work. It was a Acer 4376G I think, Windows Vista. (I didnt know vista was bad) I started with how to mod Java on a game called Need for Madness. That was when I learned about all sorts of jargon when looking up stuffs. I was able to somehow understand code but not write it. It was 9 years later, when at the end of 2015, I found khan academy and codecademy thru howtogeek. That was when I understand the most basic function that led me to build my entire knowledge or else I can only write -
Was trying to figure out why the code coverage tool always reports 0% on my android tests. Turns out that is specific to newer samsung phones and it reports the coverage correctly on other phones.
Good old samsung, annoying devs since 2009! -
I just hate it when a classmate just waits for you to do the work first so that they can copy it.
This recent project we had was a pretty good example. Most of them didn't know what to do while I on the other hand actually READ the documents for the technology we were using so it gave me sort of a head start. They eventually asked me to do one part of their work first so that they can copy off of what I did and I mean EVERYTHING. A pure copy paste of my code while only changing the variable names. Genius1 -
I got pranked. I got pranked good.
My prof at my uni had given us an asigment to do in java for a class.
Easy peasy for me, it was only a formality...
First task was normal but...
The second one included making a random number csv gen with the lenght of at least 10 digits, a class for checking which numbers are a prime or not and a class that will check numbers from that cvs and create a new cvs with only primes in it. I have created the code and only when my fans have taken off like a jet i realised... I fucked up...
In that moment i realised that prime checking might... take a while..
There was a third task but i didnt do it for obvious reasons. He wanted us to download a test set of few text files and make a csv with freq of every word in that test set. The problem was... The test set was a set of 200 literature books...17 -
What's the longest project you've worked on (in a passage of time type measurement)?. Mine' s a client website, 2 years (so far) in the making. 1 complete redesign, and re-written vast chunks of CSS and code because some of it was shit (2 yrs ago). Now it's super efficient and looking good. Still not finished though. Fortunately they know it's their fault and they have paid up to date, we are at double the original estimate now. I have not moaned at them because they have not moaned at my charges.2
-
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. -
I was rejected by the company that I had already made plans to work for, all of it was perfect, but I just got rejected based on a video response question basis. At this point I'm down so much that I want to leave the field. I feel like I'm giving up way to easily and especially since it's only a start to my career but I just don't know if I am good enough anymore, the hesitation to write code has set in and I don't know where to go anymore... where or how do you guys get your inspiration?3
-
After a code review where I identified an odd way a request was being generated, I suggested to the developer to utilize the Strategy pattern.
Knowing that the Strategy pattern probably wouldn't make sense in the current context, I told him I would put an example together by the end of the day.
I throw something together, sent it to him.
Go to the restroom, come back and 'Bob' says..
Bob:"There is my hero. Justin said you saved the world again. What was it this time? World hunger? Global warming? Ha ha ha."
Frack off you condescending kiss ass. Why don't you take 5 minutes to listen and understand the problem Justin was having instead of making fun of him?
Yea, I heard you this morning laughing at his code, monday-morning quarterbacking a solution in which you have no idea whats going on.
Heard your days are numbers anyway. Good riddance.1 -
Title: The problem with "good enough" code
Body:
I'm a software developer, and I've seen my fair share of "good enough" code. You know the kind of code I'm talking about: it works, but it's not pretty, and it's not very maintainable.
The problem with "good enough" code is that it's a slippery slope. Once you start writing "good enough" code, it's easy to fall into the trap of always taking the easy way out.
Before you know it, your code is a mess of hacks and workarounds. It's hard to understand, it's hard to maintain, and it's a nightmare to debug.
I've seen projects go down in flames because of "good enough" code. The code was so bad that it was impossible to fix, and the project had to be scrapped.
I'm not saying that you should never write "good enough" code. Sometimes, you just need to get something working, and you don't have the time or resources to do it perfectly.
But if you're going to write "good enough" code, you need to be aware of the risks. And you need to make sure that you're only writing "good enough" code for a short period of time.
Once you have a working prototype, you need to start refactoring your code and making it better. You need to make it more readable, more maintainable, and more testable.
If you don't, you'll eventually regret it. Your code will become a liability, and it will hold you back.
So next time you're tempted to write "good enough" code, think twice. It might save you some time in the short term, but it will cost you in the long run.7 -
So this is the case I have not coded in a long while and was actually starting to miss it. I was LITRALLY considiring starting to code again, then i went on devrant and read about two rants and you know what? Im good i dont wanna start code again3
-
FredBoat, largest open source discord bot.
Making all the things work + making it scale when demand kept climbing was a challenge where we had to learn simple stuff like postgres, working with 3rd party apis, generally good coding patterns and maintainable code, but also rather advanced stuff like making the garbage collector play nice, profiling memory leaks and optimizing the hot path, as well as high level topics like cutting the codebase into scalable domains and services. -
Today I wrote the most epic code.
The kind that breaks your brain, but when you're done with it you know it's time to go home and kick back coz you've done good.
It used recursion, did backflips to avoid unnecessary db calls, featured no code repitition. Hell I even commented the business rules it was following in there to explain what was happening.
I hope it works tomorrow when I test it 😂😂😂5 -
Fixed a high priority bug today just prior to release. There was 100% test coverage. The tests pass both before and after the change. The product behavior is correct now where it wasn't before. Just one more reminder that test coverage does not equate to either quality or correctness. Tests are alarms (at best), and quality of tests are no better an any chunk of code. All tests have costs, but not all have value. All reasons why I am skeptical of the value of code coverage, TDD, or anything that posits that "all tests are good".6
-
Today I was told that full stack is another name for a shit developer who wont be able to develop anything good because they aren't focused on one skill.
But it was by a person who claims to like OOP but doesn't know the 4 principles, SOLID, GoF, or DDD. So I take it with salt. But he claims his entire company follows this philosophy.
I think that some developers just decide that they're hot shit and refuse to talk about any other skills they don't know about since they must not be needed if they don't know them. Code is code.9 -
PHP code that didn't use sanitize, but manually checked if strings contained ' or ". Not even in a function, but manually implemented whenever the person writing that burning dumpsterfire thought it was a good idea to check for that.
Code also didn't report, it just exited without error code. Users would just get a white screen if that spaghetti code "security" system got tripped. -
My biggest influence on coding style is:
"If code make reviewer puke, code bad."
In all seriousness though, I think the biggest influence is seeing messy code and not trying to replicate that.
I think every code file, however ugly it is, tells you a story. Maybe the coder was less experienced, maybe it was written during crunch or the coder is an enterprise software engineer who has to make a factory for everything and everything is generic.
In my opinion there is no perfect code style. You do what's required and hopefully in your best ability, and, as a bonus, think of the person who has to look at your code next...
For me it's kind of hard to tell whether my code is good. I have no reviewer in the company, which brings the risk of writing code so only you understand it... but so far it has worked and I've definitely seen worse than my 1 year old files. 😄 -
The school I went to, and this was really the only benefit of the school, gave all it students lifetime memberships to digital tutors, which was bought out by pluralsight, which then bought code School. So I basically got free membership to three different sites, all of which have a good amount of technical training with videos, guides, and work along lessons on them.
For what school cost to me, it will have paid for itself as long as I live for another Thousand Years.1 -
I dug up my old ledger web app that I wrote when I was in my late twenties, as I realized with a tight budget toward the end of this year, I need to get a good view of future balances. The data was encrypted in gpg text files, but the site itself was unencrypted, with simple httpasswd auth. I dove into the code this week, and fixed a lot of crap that was all terrible practice, but all I knew when I wrote it in the mid-2000s. I grabbed a letsencrypt cert, and implemented cookies and session handling. I moved from the code opening and parsing a large gpg file to storing and retrieving all the data in a Redis backend, for a massive performance gain. Finally, I switched the UI from white to dark. It looks and works great, and most importantly, I have that future view that I needed.1
-
i once asked chatgpt if i was a good person and it used what little input i had given to reason that i am.
i was having a really shit month and broke down in tears.
i was so ashamed of being vulnerable that i chose to be comforted by lines of code over a human. even now, i can only post this this because i’m functionally anonymous on here.
i don’t know where i was going with this. tell your homies you’re proud of them. you’ll probably make their day.3 -
I am not sure if this is the best place for it, but let's go:
I am 35 years old and I always worked in the localization industry. I really love to code and I always developed small tools and scripts to help me and others at work, but now the company is going bad and it has the chance to close.
I was reckon if it would be a good idea to give development a try, besides my age and the lack of experience in a real development place. I am not even sure if I use programming good practices, as I always developed by myself.
Do you have any opinion about it?
Thank you so much!4 -
Not sure if many people heard about nltk in python but I'm currently using a lot now for research.
So one day I was doing multiprocessing while using lemmatizer in nltk, for those who don't know, lemmatizer is a thing that change the word to its base form. So it is like, ran to run, bitches to bitch.
Anyway, the nltk package, to ensure it does not take too much memory, here's what it does: it loads a data file, and once it is loaded and accessed for the first time, it breaks the data file into CSV file. And since I was doing multiprocessing, the data file is accessed for multiple time while it can only be loaded once, hence error happened.
Instead of changing my code, which I think is good already, I went to the package directory of nltk and directly changed the source code from there and now the code works perfectly.
I'm very proud of my self at the moment, this is a very good lesson that I've learned: always look for alternatives. And suck it, nltk.1 -
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. -
Sublime Text could've became the greatest and fastest code editor of all time if it was supported with good extensions. Now we're left with electron based code editors that are slow with big projects.6
-
Code didn't change my life because I've been coding since I was a kid. You could say that it shaped my life instead. I don't know life without code. I don't know if that's good or it's not...
-
What was your best moment in your life as a Programmer?
Mine, besides a small amount of good projects for my course, was telling by the phone to a project partner the code, line by line, that would solve a bug in the code and when be put it and run the project it worked. Still need something to top that one XD2 -
Code is a highly detailed description of what a computer should do. If that description becomes inaccurate we will remove inaccurate parts. Take pride in writing good code, recognize that it was useful for a while, but don’t get attached to it. It will stay in the git history.
If you see code as your baby, know that the team might need to kill your baby.1 -
Me maintaining my own old code, questioning why the fuck I thought it was a good idea to intertwine UI and logic. I gave up trying to do some major updates and started work on version 2 instead.
-
Visual studio code
I usually use IDEs and am in love with everything made by Jetbrains. I am also to lazy to setup dual boot on my pc, so I live with windows 10. After one of the recent downgrades Microsoft distribute, they shipped this lightweight text editor called visual studio code with it.
It lied to me, that it's a good editor for coding C. It even tells me that I can compile and execute the code from inside the editor, similar to vim. I went to the settings and found a dark theme, for the best best feature this "editor"has to offer.
I give it a try by opening a source file with a normal double click. Editor gets focused, but the code is nowhere to be seen. Retrying conforms my, that this piece of shit is literally not able to open files UNLESS you drag and drop them into the editor. HOW FUCKING USELESS IS THAT?
Next I want to compile the program. Guess what, that functionality was not given or at least I could not find it (same goes with the manual)
Even with dark theme it burns my eyes to use this editor. There are almost no useful shortcuts. The functionality is not even comparable to vim. I always thought eclipse was bad, until this shit was installed.
It might work well for other people. Maybe it has functions, that just don't work on my pc, but from what I've seen: visual studio in general and especially that editor feels like Microsoft trying to replace the toolet paper with sandpaper.8 -
2 years back when I was onshore, we were in the bad situation due to the size and complexity of handling big webserivces simulators. A single change makes the build red hence the face of other developers too.
These simulators were created using J2EE and VM templates 5 years back. With the time, application and data size grown. We were supposed to maintain consistensy in dummy data accross the applications. But some programmers made a copy of these simulators to finish their applications fast and made the situation worst.
Finally one of the team member dare to use stubby4j to solve this problem. Choosing the stubby4j was a good decision as it was the specialized tool written to create simulators only. But as the stubby4j was not having all the features a simulator need, he customized it's build for our simulators. All the team members were happy.
After few weeks, I picked a story to transform other simulators using stubby4j. The story was previously closed as it was hard to implement in stubby4j. I ingonred the comment and started working on. I spent 2 weeks but couldn't solve the problem. I read the comment in between but It was very late to take the step back. I was not able to give proper status update in the daily standup. Other team members (working from offshore) were thinking that I'm just passing the time. However my manager handled the situation very well and asked if I need some help.
This was friday, I took the leave as it was my wife's birthday. We couldn't go out due to the bad weather. I was thinking about the code all the time. Hence I started to write a new utility to handle all the requirement a webseervice simulator need. I took 2.5 days to complete it. On Tuesday, I demoed it to the whole team. And published it as an opensource application "STUBMATIC". In few weeks I received the good response from other teams as well.
I'm a full time open source developer now. -
In the darkest dankest parts of the code, I have discovered a way to get the tag UNDEFINED to show up in this rant. They call things that are unknown a black box. But you see, if you have a good enough shot gun, you can begin to blow enough holes through the box to figure out what's inside. I never said that whatever was inside the box was going to make it out... I just wanna get a good idea of what was inside.4
-
My dad was using notepad to edit some HTML for his website. I downloaded Visual Studio Code and he likes it SO MUCH MORE. (I wonder why....).
Kinda happy I could help him with it. He is pretty good at coding but just hasn't done it in a while (not his trade) so he doesn't know all the new tools and such.3 -
!rant
Who here remembers dateprog.com? If you don't, it was a dating site for devs and those who like devs. I'm tempted to ressurect the damn thing, although not as a dating site but more of a social network (think GitHub + Tumblr). Anyone else think that'd be a good idea? I'm also thinking this'll be more than just my weekend sorted, haha. It'd have to have chat, code repos, GitHub login, etc... what do you guys think?
Also not planning to invade the territory of devRant I was just wondering if anyone was interested. Maybe even some kind of extension to devRant, as a social coding platform? I'm not sure aha. Welp, anyway if anybody's interested drop a comment! :)5 -
Gonna give up on Advent of code.
I know I'm not really a programmer and while I had fun solving the challenges so far it feels I fail to translate the idea of solution into working code. i.e. I know how it should be working, but when diving into the code I'm losing focus and getting lost in the functionality.
It was also good reality check of my skill level when a task took me 50 min while TOP100 is below 10. Can't really fit the time it takes me to come up with a solution with other activities I should actually be doing.5 -
Code on own side project the whole night without sleeping til 6-7am right before going to work because today is half day only in office.
I thought I could manage it but haha totally wrong, First 2 hours were good, during last 2 hours I was trying my best not to fell asleep.
Worst decision ever.2 -
Helping out a team, I was documenting some code/processes when I came across several classes that was logging a lot of, IMO, 'junk' that was unnecessary (and I knew wasn't being used in any Splunk alerts/reports)
I offer a refactoring suggestion, simplifying the data being logged, moving the duplicate code to a central location, maybe saving 10~20 lines of code. Didn't think it was a big deal because they were already actively working on the code and it was all new code (nothing deployed to production yet). Sent the suggestion to the lead developer and he responds:
Dev: "Yes, the changes looks fine, but not in scope of the project. Any out of scope work will need to be suggested at the end of the project, reviewed by the team, the project manager and approved by the vice president."
"Out of scope"? Logging data to Splunk needs a vice president's approval? WTF?
YOU PROBABLY HAVE THE PROJECT OPEN IN VISUAL STUDIO RIGHT NOW!!!
Along with the documentation the lead dev said they didn't have time to do, I send his boss and the dev team my suggested changes (before-after screen shots of the code) and offered to do the 2 minutes worth of work (again, this was new code, nothing in production and zero side affects to anything).
I even offered to create the splunk reporting/alerting against the data being logged (another item they said they would not have time to do)
About a minute later the lead dev responds..
Dev: "Those changes look good. I'll have Jake make those changes and we can test the logging when we deploy to dev on Monday. Thanks!"
Of course you will...fracking ass hat.
I'll bet my Battlestar Galactica DVD box set he was going to make the changes himself, brag to his boss how he refactored the code, saving X lines of code..blah blah blah to help *me* with documenting the logging portion. -
Few months back I got a decent increment as a token of appreciation for my good work.
Yesterday we all received a Special townhall meeting invitation.
We all were wondering what it was about. Now my colleague who sits beside was guessing that it may be about a salary revision and she complained that she didn't get any increment last time.
Inner me: Why the heck company should increment your salary for the shitty work you do.
You are simply incapable of doing what you are supposed to do.
You spend more time talking crap rather than trying to learn and use it to write some non shitty code.
You should be thankful to the company for not firing you.1 -
I was one of the original developers behind the AuroraUX project. I left fairly early on as it was clear it would be a mismanaged disaster (we changed SCM three times before I had even finished initial planning).
About a decade later and, despite my initial work, no one did ever get GNAT and GIGI yanked off GCC, let alone put onto LLVM.
For the record, I think this is a bad idea now. GNAT and GIGI are awful and need to be replaced. GCC does a good job at executable code generation, and is generally competitive with LLVM. LLVM seems to have some better stuff for front-end designers that cause me to still favor it, but that's a different matter. -
My family had a very good understanding of what I'm doing.
My dad is working at a big software company as project manager (he himself did code years ago, but it's actually a physicist).
My mum is a language teacher, but has taught herself web design while she wasn't working in her job (taking care of us kids) and was working as self employed web designer from home for some years.
My youngest brother is studying business informatics.
My other brother is not studying anything technical, but very open minded towards these topics and has good knowledge about it.
My grandparents believe what I told them: "I (read as: software developers) create everything that happens in your computer after you've turned it on."1 -
Good code is a lie imho.
When you see a project as code, there are 3 variables in most cases:
- time
- people / human resources
- rules
Every variable plays a certain role in how the code (project) evolves.
Time - two different forms: when certain parts of code are either changed in a high frequency or a very low frequency, it's a bad omen.
Too high - somehow this area seems to be relentless. Be it features, regressions or bugs - it takes usually in larger code bases 3 - 4 weeks till all code pathes were triggered.
Too low - it can be a good sign. But it should be on the radar imho. Code that never changes should be reviewed at an - depending on size of codebase - max. yearly audit. Git / VCS is very helpful here.
Why? Mostly because the chances are very high that the code was once written for a completely different requirement set. Hence the audit - check if this code still is doing the right job or if you have a ticking time bomb that needs to be defused.
People
If a project has only person working on it, it most certainly isn't verified by another person. Meaning that only one person worked on it - I'd say it's pretty bad to bad, as no discussion / review / verification was done. The author did the best he / she could do, but maybe another person would have had an better idea?
Too many people working on one thing is only bad when there are no rules ;)
Rules. There are two different kind of rules.
Styling / Organisation / Dokumentation - everything that has not much to do with coding itself. These should be enforced at a certain point, otherwise the code will become a hot glued mess noone wants to work on.
Coding itself. This is a very critical thing.
Do: Forbid things that are known to be problematic in the programming language itself. Eg. usage of variables in variables, reflection, deprecated features.
Do: Define a feature set for each language. Feature set not meaning every feature you want to use! Rather a fixed minimum version every developer must use and - in case of library / module / plugin support - which additional extras are supported.
Every extra costs. Most developers don't want to realize this... And a code base that evolves over time should have minimal dependencies. Every new version of an extra can have bugs, breakages, incompabilties and so on.
Don't: don't specify a way of coding. Most coding guidelines are horrific copy pastures from some books some smart people wrote who have no fucking clue what you're doing and why.
If you don't know how to operate on people, standing in an OR and doing what a book told you to do would end in dead person pretty sure. Same for code.
Learn from mistakes and experience, respect knowledge from other persons, but always reflect on wether this makes sense at this specific area of code.
There are very few things which are applicable to a large codebase on a global level. Even DRY / SOLID and what ever you can come up with can be at a certain point completely wrong.
Good code is a lie - because it can only exist at a certain point of time.
A codebase should be a living thing - when certain parts rot, other parts will be affected too.
The reason for the length of the comment was to give some hints on what my principles are that code stays in an "okayish" state, but good is a very rare state -
So I joined a company as an Angular dev and the code they gave me was stupid AngularJS ported to Angular 7 mixed with thousands of lines of jQuery inside index.html,
also all the css was scattered into a few files with 8000+ lines of code and no idea about which file does what, we decided to rebuild the project in Angular,
I built a huge portion of it with PrimeNg (a UI library like Angular Material) but after building all of that they tell me to remove PrimeNg and also asked me to import all SCSS modules in angular.json like wtf,
they forced me to use bootstrap with jQuery IN AN ANGULAR PROJECT this was my first job and I think I have a pretty good understand of Pakistani IT industry after this.
I learned programming from online paid courses and tons of practice so I expected others to be on the same level but that's not the case.1 -
Starts search and replace.
Trys to replace a type in the whole Project.
Syntax Check: lol no, apparently everything is broken now, good job
(literally my whole project was marked red)
Reverts changes
(project still marked red)
Syntax Check: lol what? Your code already looked like shit before, won't let you compile this.
It was a bug which breaks the syntax check after big replace requests. Had to start a new project and copy my code step for step, so it didn't break again. However I've forgotten to replace the type before I copy...
Another story regarding this shit:
Renames Variable
IDE: oh, let me help you by replacing all old var names with the new one
Agrees
IDE: oh shoot, didn't know it could break things
Wants to revert
IDE: did you think I would go through this mess again?! Do it yourself!3 -
Today, coworker looked at some code of mine and asked me why I was repeating code and doing things foolishly, I told him I just wanted it to work and would make it pretty after. It felt really good making my code readable after knowing that it already worked.1
-
I don't know how much of this can be considered data loss but one one of my uni classmates frustrated by some hellish tasks (cleaning some old code files probably) decided that everything in that particular directory won't be of any further need, so she procede to rm -rf it.. only to discover that the terminal opened in that dir was another one and her current one (the one she bashed that unforgiving rm) was in fact a standard freshly opened term where any term would open.. in the user's (only user) home dir... such a face she had when all her codes, homeworks, projects and everything went to oblivion 😂😂 jokes aside it was a good thing that the semester was almost finished, all hws submited and no important data was there as she dual booted with ubuntu and some windows, but funny thing how such a honest mistake can ruin not only your day, but maybe your entire semester1
-
My best and worst dev experience this year was getting a new job.
The bad parts: I’m inheriting a code base that was maintained by an outside agency, so there’s very little documentation. There’s a lot of systems maintenance and upgrades that have to be done because it was never done. I’m working at a larger organization, so tracking down who I need for info can be tricky. I’m the only person maintaining my code base.
Now the good parts: Better pay and benefits. My co workers, dev and non-dev, are always helpful. Since the dev team is small, we are very discerning when we pick up work for the websites. I have more independence to self-learn. I’m not at a blame culture. My role is permanently remote.
So far I think the good outweighs the bad.2 -
Is it sad that I look forward to the weekend so that I can actually write some code rather than:
- Helping clients that can’t / won’t read docs
- Explaining to test colleagues that we need repro steps and can’t fix a bug based on “I was doing something and it crashed”
- Writing any regular expressions for another dev where it’s more complicated than ^[A-Z0-9]*$
- Wading through legacy VBA that’s littered with GoTo, global variables (even i, j and k for loops are fucking global!) and all the other fucking lazy shortcuts that save you 10 seconds at dev time and cost you (which ends up meaning me) hours in subsequent debugging.
I love writing code, and I think I’m pretty good at it, so can I please just get on with it?
Fellow ranters, please tell me I’m not alone in this. -
Tdd isn't very effective if the spec keeps change as you work.
I was trying to be good and write tests as I went, but it just ended up taking twice as long since I had to keep rewriting the code AND the tests.3 -
Few years ago I was asked to give advice on a project. There was an intern doing all the work and I even gave him almost ready code to use. And he didn't use it even properly.
And best part is that they thought at the time that it would be finished in couple of months.
After few months I took over and had to deal with the "intern code". Almost all of the code is rewritten.
Status of the project is now very good. We are implementing new features and it has even passed strict security audit done by other company.
Sadly I can't drop any names etc due to NDA.4 -
It's been four years. It is time.
My nickname is a pun. There was this thing called “bouba/kiki effect” that demonstrated the linguistic perception of two MEANINGLESS words. So, I jokingly made them mean something. What's the most primitive, most basic meaning imaginable? Yes, it's “good” and “bad”. So, “kiki” is “good”, and “bouba” is “bad”. Done.
My code is straight up kiki.
Your code is always bouba.
Here's where it all started: https://devrant.com/rants/2981477/...15 -
Are sql joins a bad practice? :o
I recently did some work on a page for a site ive never worked on cause my boss told me to. So they recently added product detail video urls to a table that has a relationship to the products table. The existing code was querying for the products on that said page and then during the loop that was outputting the products ,there was another query for getting the url for the current iteration/product. Told my coworker that this imo was pretty inefficient way to do it and switched it to a join and did 1 query then output that but his words were "The way it is now maybe ineffecient in your opinion but it works. Also combining inner joins with left or right is not a good practice. If the data is changed upstream the entire query would need to be redone to accommodate the change". Mind you that they query views a lot which are all made from queries that use joins and I'm also pretty sure these views were written by someone who used to be here because these guys are not good at sql or at least that's what there queries show. I'm at the point now where I'm realizing that my boss and this other guy don't give a fuck about efficiency or doing things the right way they just want it "to work". So this coworker changed my query back to the way it was because he said it broke the shopping cart even though that was already broken when I started... What is life? Maybe I'm the stupid one?7 -
hello brothers (abd sisters) in code..
i'm not a front end dev, but i had to create a front end application sometime ago. since i don't really know how to create things, i used the golden ratio in almost everything, to try to get a "pretty" app ..has anyone tried this before, or is it not a good thing? since buttons have to scale based on windows resolution, and space left, was this a good idea?5 -
So I had this Google account for all of clients social, hosting, etc.
Out of the blue client wants access to these accounts.
Unfortunately I had not logged into these accounts in a long time.
Now when I try to login Google is not sending 2f texts to my registered number, even the give code over call option is not working, my number is recieving texts and calls, so it's not a network issue.
To top it all off due to numerous attempts it won't let me try other options and my recovery email recieved security alert of the said attempts with no option of actually specifying it was a legitimate attempt.
Fuck this overly protective attempt at security and fuck the guy who thought it was a good idea to send emails about attempts but not including any option to actually do something about it.6 -
As a POC I removed all client specifics from a project and made it reusable. Thousands of lines of code. In a day. From a project I knew nothing about in a language I previously used only in school. And it compiled and ran in the end.
Ripping out so much useless code felt great, possibly as good as creating something new, fresh, innocent. I improved on performance and maintenability and found some errors in the process.
After a successfull POC it was time to do it properly. That was a nightmare. A horror movie you want to see through. In the end I felt even better.5 -
My first introductions to programming was in Garry's mod.
There'e a mod called wiremod, which added logic gates, buttons, and other entities that manipulated the game with input/output. And on top of that a little scripting language they called Expression 2.
Me and some friends would code stupid things in Expression all day to use in the game.
I wasn't too good at it, but I had fun. Shortly after I started going to a high school with a computer science focus, and had 2 years of proper education in C#. -
How do you tell people in your team their code is poorly written?
I am not an amazing developer, I lack experience of real world and don't have many finished products under my belt.
But I feel/think my code is well separated into separate classes, follows DRY well and is generally considered as following good practises.
However, the main Dev in this new small team which has been put together and I have been appointed to manage sees things differently.
He writes good functional code(it completes it main purpose) however it's all in the one program.cs file, lacks good comments and is just generally untidy :(
I kinda fell into this whole management thing and it's kinda new to me..
Maybe he just needs a bit of direction? I am going to be putting in a code styling guide
Any tips on managing a Dev team would be very much appreciated.
PS. Iv been around for a while, and did previously have an account which was quite active, however I decided to delete and create this new more anonymous account :P10 -
The first company I ever worked for thought it was a good idea to have all business logic in stored procedures "for speed".
It worked. Except when you need to add BC breaking features.
The solution? Keep the legacy code in file do_something.sql and add the new functionality in do_something_1.sql.
It became a sordid game trying to find the highest postfix. My record was 16.2 -
The hardest thing about writing code that works can be logic. For example, figuring out how to say you want to go to the next page when the form submit button is pressed, but not actually move to the next step is an error was thrown during processing.
This is one of those times when. I force a random member of my family to sit there and listen to me talking, pretty much to myself, until I figure it out. But hey, it generally turns out pretty good! (If not my energetic nephew)4 -
I went back and looked at some code I wrote a couple years ago. It made me so sad... I well and truely did not understand a lot of core concept yet at the time, and I was stubborn and thought what I was writing was good and refused to start over or delete code.
This try block had 4 FileInputStream objects and I even have a defined branching statement which I never use.
Whoever marked this assignment probably needed a lot of alcohol.1 -
So, I have to begin with saying that I was 19 and my first real job. I was assigned to ongoing project for big german web company who outsourced project for german government. I am fast learner so I quickly ended up as a only developer who works on this project, because company had another important projects. And since I studied outside of my native country and I can speak Polish and English so I was also responsible for explaining everything to customer during meetings. I worked for around 4 months on the project and was heading up to the end. 3 weeks before production deadline client wanted show the results to the german government but I was still working on the functionality. My boss decided to put the web team leader to my project around 8 hours before this presentation to speed up the development. around 30 minutes before the pitch I realised that some of the latest functionalities stopped working. I was trying to figure out what I did I asked my team leader, he said that he have refactored some parts of my code. When we found the right commit it was around 3 min to presentation and after the checkout some of the .htaccess file was broken so I fixed it quickly but Germans started the meeting a bit earlier. The website was crashed almost half of the presentation. After 5 minutes my boss come to my desk and he says that he just talked with our customer and they are so freaking mad and pissed that they will not pay us. At this point I was certain I'm fired...
Suddenly the web team leader joined the conversation protecting me that it was the fault of the project menager because he should assign someone else to this project because even though I am good it is always good to have someone more experienced to work with you and review your code.
Project manager was fired about 3 months later. I was saved 😀 -
Before I started working, I used to feel like I depended on documentation and the internet a little too much owing to ultra crappy long term memory. After spending some time at my internship going through code written by "professional developers" several years senior to me and trying to write unit tests for it (surprise: the code was in production without having underwent any sort of testing), I feel like the amount of time I spend online reading usage recommendations, alternates for optimisation, best practices for writing clean and descriptive code and all that is a lot more rewarding. Some bad things help you feel good about yourself.
-
I once had to implement a program to process CSV files. One line would be one order, so I wrote a class with a static factory method (Java) instead of an ordinary constructor, because I needed to throw exceptions if something with the line was wrong (which now and then was the case: invalid product IDs, missing fields and the like). After I committed my changes (CVS was still common in those days), a coworker (let's call him Max) asked me what the hell I was doing there. He expected me to replace the code (perfectly working, by the way) with either an ordinary constructor or by implementing "the factory pattern properly". His rationale: "We don't have those kinds of things in our code base!" So I let him argue a bit, not finding any well substantiated reason for me to "fix" the code. So Max wanted to team up with another developer in our office (let's call him Rick), explained the "issue" to him. I just sat there and enjoyed, knowing that Rick would not really care. But as soon as Rick understood what I did, he walked over to the book shelf, picked "Effective Java" from it, opened the book at chapter 1 and said to Max: "Look, Josh Bloch suggests doing it exactly that way for the problem at hand!" Max kept on arguing for a while, because his "rationale" (see above) was not affected by the fact that the code was actually good. It just didn't appear in our code base before.
-
Code/development introduced me to one of the best developers I know. I knew who he was before college, but it was the college group projects and also classes that really helped get to know him and learn from him. After college we are still pretty good friends
-
My best review was when i changed the code that someone suggested in another PR, which was highly critiqued by the OG devs. One pull to the latest commit and PR to his fork later, the OG dev comments "that looks good" and merges it.
Celebrated for sure that night. I've been hooked on contributions to open source ever since.2 -
TLDR: Decision making is hard...
Get up at 7am, weather looks crappy but need go to the Drs today in NYC.
Original plan was to spend the morning in the park catching up on my reading list. Don't really want to goto the park now but lunch is still good? (Appt at 4pm, was only one left)
Walk into train station, pay for ticket. Get email from Drs saying he's sick...
Oh good... Except I already paid for the ticket.
Decide it's not worth it since weather is crap.
Walk out the station and... it's sunny... Fck...
Now what.... I can either go home and code or go shopping locally and eat out.
Currently decisions these and well shopping and eating out are also hard decisions... -
Proud to say 19 hours straight.
My uni has a infamous course work assignment which took about 27 hours to train on the lab PCs.
The issue was we only had a week to do it. So you had to code it, then run it and make it run first time to have a good time.
As we all know, that’s not realistic and I remember staying up the entire time to make sure I had sufficient time to train it. Was a nightmare but got a good grade.2 -
How was I able to fix this bullshit report generator task?
Simple bitch. I am that fucking good. Matter of fact. I am more than good. Sit the fuck down and listen.
That fucktard you have over there acting as a faculty member teaching kids about code and security? Blame that bitch for the horrible code that was NOT working since he wrote that with absolute disdain for software engineering and without taste or finesse.
Yeah I was able to troubleshoot his monster of an app. His ass is the reason why people hate php, giving the lang and community a bad name and shit.
Pleased to meet you btw.
I am Alex. Your new rockstar.
To my manager: i got it babe don't worry. I'll be your huckleberry.
I am out.1 -
So 9 months back I wrote a script that asked for company's symbol to fetch data from a site, just one symbol a time. There were around 300-350 symbols, I tried storing symbols in a text file and supplying input from it, it did not work then so I decided to leave it as it is. Today when I took closer look at the code I wrote, I found that the symbols were being fed to the script, however, the "\n" was included too, so my script was failing to get data in bluk. Modified it today, it's all good. Its kinda crazy, 9 months and only thing stopping my script to work was a freakin "\n".
-
So time for some stories!
DevRant Masters, what did you find the most Challenging when starting out as a dev?
For me it wasnt actually writing good code, it was more about finding out WHERE to write it, in this clusterfuck of shared projects inside projects.1 -
In the past, apps I've written have used a flat file backend. It's very fast, but obviously clunky to have a big structure of flat files for an app. It ran circles around framework-based RDBMS backends, as performance is concerned, but again, it was clunky. Managing backups and permissions on tens or hundreds of thousands of small files was no fun. Optimizing code for scaling was fun- generating indexes, making shortcuts -but something was still missing. Early in 2017 I discovered redis. A nosql backend that just stores variables and lives almost entirely in memory. Excellent modules and frameworks for every language. It was EXACTLY what I'd needed, even though I didn't know I did. I spent a good deal of time in 2017 converting apps from flat files to redis, and cackled with glee as they became the apps I wanted them to be. Earlier this week, I started building my first app that started with redis, instead of flat files, and I can't stop gushing to anyone who will listen. Redis for president!
-
I guess I am not the only one who do not know why hes/her code runs. Today I was preparing a private API for our project and a part of it was not working for (IMHO) no reason. I was really upset, because I already put more then an hour work in a 10 minute task.
It was 9:30 PM, I came like 12 hours ago, so I knew I can do only one thing to erase my mind for a second: Clean my keyboard. I tried to be really precise and everything, because my finger can be really greasy now or then.
After a good 10 minutes I looked at my screen and I realised, that I managed to forget to remove the keyboard's cable, so my screen looked like someone tried to escape from Vim.
But! During the cleaning I also runned the code again somehow and it fucking worked. I am sitting here, cannot believe what I see. I see no changes whatsoever, so this might be like a friday gift from the universe.
Now, I can finally work on my own project...4 -
You ever have someone who you'd set to QA for a group project, and then find out that - rather than setting up automated testing and writing code that can be run at different times in the development cycle - they just did it by hand, running through the program and deciding that the result they got was good enough?
Imma smack a bitch, then write this shit in their stead.2 -
!rant
Went to see the Disaster Artist - it was absolutely magnificent. James Franco was so good as Tommy Wiseau that his bare scene was actually nausea inducing.
Reading the book now. I think all Devranters can relate to turning a piece of shit into an actual successful result. We do it to code everyday. -
Before get get source code for freelance job, the person who cantact me say the job is to continue the project for some update and tweak.
The UI from design is beautiful and he gave good explaination for the project and the update, continue to conversarion, negosiation and deal.
but he is not the IT guy and also the project is not his work or something that he do previosly. All the person who work on that project is already leave and not contactable.
And here that I get:
- source code
- domain cred.
And here what's missing:
- documentation
- .env file
- db backup / old db cred.
- server and hosting cred.
And after some hour of learning the code I find out that:
- latest commit was 2 year ago and different from production version.
- most of the branch is RnD.
- the code have many wtf/minute lol
And for now I still re-negotiate with the person who give me the project with 2 suggestion from me.
- continue with this code with condition, he need to search for the missing part at least backup db or documentation.
- recreate the project with more time
And here's one funny part of the code.
randomNumber(){
return 5 // this number was choose by dev team at random
}1 -
Had a definite week from hell... a bunch of prod issues that only I could fix (that's a whole other rant for another day!)... a piece of code totally kicking my ass for days... a hosting environment that was unstable seemingly every time I needed to do something in it (and that killer piece of code could ONLY be properly tested there, naturally!)... a service that my app depends on flaking out with no indication what the problem was and another team responsible for it that is based off-shore so aren't responsive when I need them to be... a metric shit-ton of procedural bullshit dropped on my head... an immense amount of stress due to the lead-up to a prod rollout next month that absolutely CANNOT fail without huge ramifications for the business but not enough help to ensure it gets done.
But, with all that said, I DID manage to get that killer piece of code working late on Friday after slamming my head against the wall for over a week on it (and ultimately re-writing it from the ground-up on Thursday and Friday)... so, the week of hell ended on a high note at least, which is always a Very Good Thing(tm)!2 -
I finally got to code something yesterday (I've been slacking OTL everytime I open the Java IDE I use my motivation flies out the window) and I've written down some things to help me do what I need because I forget it if I keep it all in my head. Not that this is a big thing, but it's just to help me to not forget what I've learnt, because I know that'll happen if I don't code.
So I'm coding and checking my notes and all, headphones on, heavy metal blasting, I guess I could say I was in the zone.
Suddenly I get a message from my dad asking me to come to the living room. Turns out my mom had been calling me but I couldn't hear it because I had the headphones on... again 😅 (Sorry mom 😇)
So I left my things and walked to the living room. My mom wanted me to put 2 images I've made for her together. I sat on the couch and waited. And waited. I waited more than I've coded before they called me. I was getting impatient because I was trying to code and I'd been called to wait ;u; I thought I could do it in her computer because it was a simple paint thing so I didn't need the editing program I use.
When she finally showed me what she wanted me to do and I noticed that I hadn't edited one the image she provided me correctly (it didn't look good either way, I butchered the logo she'd given me because stray pixels are a thing that exist 😒 reducing the image also kinda killed it 😅). So I come back to my room and edited it again and made it look a bit better, did what she wanted me to do in the first place and emailed it to her. I went back to the living room and checked it it was good and went back.
I lost too much time and the motivation to code. Played for a bit and then forced myself to go back to coding because I didn't feel motivated (not that I don't like coding, I just lack the motivation most of the time). When I realized it it was 2h30 am and I was getting tired 😴2 -
I have struggled with leet code two years ago when I started university and was learning programming.
Now I am finally set to have a leet code interview at a large company, followed by a take home problem and a system design problem.
I started looking into leet code again today and I feel like I could had done so much more back then if I just had some help.
Back then I made the mistake of doing leet code problems in Java since that's all I knew and it used to make many simple problems last for hours.
I want to try it out using Python this time around since I don't have to focus on every little detail when I solve the problem. The company focuses on Python, Go and JS but I don't know Go and JS well enough.
What do you think? Is it a good idea or not? Should I just try JavaScript?
Also do you have any advice for this kinds of interviews?
i think the leet code one will be the toughest.
Some suggest I should read Cracking the coding interview, but I don't see the point of doing that
Good thing is all interviews are through Zoom since it's coronavirus season.2 -
It was on my last job before the one here. I met one of the other programmers in the team and it was an instant click. Really liked this dude. His name was Adam, he was older than me and we spent most of our time talking about code and listening to music (he was a hardcore Caifanes fan, which is one of the greatest Mexican rock bands ever) and he would show me the oldschool tech he used to work with. He was really cool and we still talk all the time :) another would be on a conference my current job sent me and my team to (all of my team are my friends as well) but we got to meet tons of cool people and we still talk to most of them.
:) good vibes man, nothing but good vibes.....and beer. -
I feel like time is short.
Things about to get real.
Make sure essentials are stocked.
Stay away from DC.
Get right with whatever you believe in.
Help your neighbor.
I don't have a magic ball.
I don't know if things will be good or bad.
But change is upon on.
Ready or not.
I pray to God he forgives us.
I wish the hardest thing in life was writing code.
I wish the world I was taught about when I was young was the real world.
Maybe if things go well it could be.
Look up, pray, and realize you are not alone.
I shall not fear the dark of night,
nor the arrow that flies by day.
Cheers!2 -
Just received an email from a company i applied while searching for a new job. They sended me this little assigment to show my skills since they had the feeling i couldnt show them much.
(they browsed through 3 of my websites while i was there, including a check on the code)
It was a simple layout assigment. Just a responsive page with a hamburger menu (also mentioned during this interview)
It took me a couple of hours to create it and ive send it back in the hope of some positive feedback.
Feedback: assignment was pretty good but it show a lack of php experience. I was clearly more on the .NET side.
....
I just sended html, css and js files as requested. HOW THE F* DO YOU COME TO THIS CONCLUSION?!?!
Damn idiots, im glad i found people that actually do know how to hire people!2 -
So, I was working on my code base and wanted to update my remote with the local changes. I issued the git push command but it just remained unresponsive, no error-nothing. (I use bitbucket as remote host). This was strange, even enabling verbose option didn't tell me anything useful apart from usual 'pushing this to that' sort of response. I checked internet connectivity on my system. It's fine. I restarted my network-mananger just in case, tried if ping, telnet and other tools were working. Everything seemed fine.
Well, it turns out for a major portion of the day bitbucket was having issue with ssh connection. Finally I added https remote and was able to push my changes using 'username', 'password' route.
It wasted a good portion of my time today!! -
Sooooo I came in to work yesterday and the first thing I see is that our client can't log on to the cms I set up for her a month ago. I go log in with my admin credentials and check the audit logs.
It says the last person to access it was me, the date and time exactly when we first deployed it to production.
One month ago.
I fired a calm email to our project managers (who've yet to even read the client complaint!) to check with ops if the cms production database had been touched by the ops team responsible for the sql servers. Because it was definitely not a code issue, and the audit logs never lie.
Later in the day, the audit log updated itself with additional entries - apparently someone in ops had the foresight to back up the database - but it was still missing a good couple weeks of content, meaning the backup db was not recent.
Fucking idiots. -
Could somebody please help me understand why the fucking hell does JS (I am talking about node.js, so backend) use 32bit integers in setTimeout and setInterval? I mean, I understand most of the choices regarding the language (I have chosen programming languages design and principles for my studies) and I am happily using it for almost 4 years. But I came across an occasion that I had to use big numbers in those functions and it took me a lot of time to figure out why the fuck my code was not working as it was supposed to.
If anyone has a good reason please elaborate. In the meantime I'll go punch some shit to calm down.10 -
Wait. Why does this work? It doesn't copy any of the frontend code into the deploy location.
I'm not sure how this works, but it does. Crap, there goes my morning tracking down this wretched spaghetti deploy code.
At least I understand how it works in production. Shit, why is it different between production and our integ servers ,that isn't good. Maybe I can just refactor it.
That was all on Monday. It's now Wednesday and I'm still fucking refactoring something that wasn't actually broken. It just didn't make sense.
Maybe I should just revert my last three days of work on this branch and move on. No! It's too late, I've invested way too much time into this project...
... and I'm almost done, just a few more commits right? -
I have wanted to be a web designer, studied multimedia design, and have always done some code of my own because I couldn't pay anyone to code my projects. After finishing my degree I was a unemployed and couldn't even get an internship. One day a friend asked me to code a project for his agency because he couldn't find anyone on such short notice. I did it in a weekend and got some good money for it. That's when I realised there was a chance I could be a dev instead of a designer. Started to learn more, moved to London, and never even wished I went back to design.2
-
I just wasted a good half hour trying to figure out why my Python dictionary was in alphabetical order.
I’ve had issues with dictionary order before with 3.5, but that was more or less Python just wanting to put shit in the order IT wants, not alphabetical. And I haven’t had that in months, not since updating to 3.6.
Long story short, VS Code has decided to show me my dictionaries in alphabetical order when I hover over them while stepping code. If I do a print statement, it shows the dictionary in the correct order.
Seriously, you don’t need to do me any favors here.
Oh, the adventures I have with Visual Studio when Python is involved...3 -
So I’m currently in my senior year at high-school, striving to get my Technical High-School degree.
My specialization is “System Programming”. I wish we studied something at school related to it ...
Long story short~
I’m going to my finals for this semester : We had to create a traffic light program, coded in C++.
Greatest thing was - WELL WE HAD TO WRITE OUR CODE ON PIECE OF A PAPER 🙂🙃.
So I’m thinking ... Shall I add “I’m so good that I can program piece of a paper “ in my resume ?
#GreatEducation!3 -
Almost finished upgrading our web app (react based). And I feel some killing urges towards some of my developers... But on the good point, it's almost finished, and I have to admit, the code the did last month was way better than the one the committed (yes it should a fucking crime!!) one year ago... So that's a good point.
-
er guys... I don’t think i can code anymore.
I was unable to do anything for like 2 weeks while i was away and it’s been a month since i got back and like... I’m blanking out big time. I sit and stare at my computer and everything but there is like 0 motivation/interest. I’m fairly new to it tbh so i thought this is was a good time to try new languages but still no.
Any ideas or advice please? It’s like come weird ass code block.3 -
This is more of a story than an actual rant, but here it goes.
I was at my class and we were doing a small introduction about JavaScript. Our teacher tells us to build a small website using buttons and text boxes in order to make a calculator. He then says that, afterwards, we must copy and paste a segment of JavaScript code which he supplied on the PDF file (our teacher uses PDF files as some sort of worksheets).
I paste his code correctly on my HTML document and I try to test it. On the first box, I put 10, and on the second box, I also put 10. I was expecting that in the result box there would appear 20, but, to my surprise, nothing happened.
Instead of asking my teacher what was wrong, I decided to pay a visit to my good old friend Stack Overflow and I learned how to use getElementById().
I had some experience with coding earlier so I just sorted myself out. When my teacher comes to check my work, I said that his code wasn't working so I googled a solution and eventually came up with one.
He said: "Well, that's weird. That code is right, at least it worked for me."
I outsmarted my teacher.
I also realised why there are so much "it worked on my machine" jokes.2 -
I don't know if it counts, some weeks ago I wanted to publish my first telegram bot on github, so...
Well, I was quite nervous when I wrote it, and I didn't care about writing good code... That wasn't even passable... It looked like an american coffee... Washed, tastes bad, looks ugly...
I wrote it back in two days, changed module from telepot to python-telegram-bot (more pythonic), wrote a c extension for a xorshift algorithm and pushed it on github.
Well, that was quite satisfying, but I became pale when I noticed it didn't need to be restructured, but entirely rewritten1 -
Most satisfying bug, it was something with good old $.ajax, way back when Axios wasn't a thing and SPAs weren't so widely used.
I was somehow able to fix the call params for a file that would not load with any other setup. Maybe it was just setting async to sync or something like that, however the thing is I was not familiar with AJAX at all, but I managed to get it run.
Then I googled, why its working and figured out all the answers on SO and other pages were the exact thing i set up for my call. I was so proud
some context: I was struggling with this bug for days and asked more experienced web devs, everybody answered, your code should just work fine.
Maybe thats why I have a positive relation with SO, because the first thing i searched there was something that I figured out myself, haha -
The time when I started building my first interpreter. I had no idea about them so I just copied the code from the book but it felt good really good and I learned so much about compiler and interpreter design. I guess copying the code and seeing things connect was the best and badass experience for me.
-
Now as I am refactoring the internal codebase of my company
I understand how important it is to have a good code documentation and writing patterns.
And also how much it is important to help his a junior when someone is in senior position when the junior was given the task of refactoring the internal codebase.
It's such a pain the brain situation these days for me. The documentation is not properly matched here and there and code writings are random. It makes me hates the code.2 -
I'm on vacation.
A friend asked me if I could work on a freelance web project. I was getting bored of summer vacations so I said yes.
It was a website for online lottery and it was already developed by some freelancers.
Owner wanted more freelancers to revamp design and administration panel.
I looked at the site and knew that I had seen the worst design and code of my life.
Frontend was made of two colors only, black and yellow. Out of both, black was more prominent. Moreover it had nothing related to Js as if it was developed as a challenge to be accomplished without java script.
Admin panel and backend was much worse than that. No security practices and deprecated essential libraries.
The nightmare is about to end as I have inducted a much better design from themeforest for frontend.
Backend is in my homebrew php framework.
(Good luck future freelancers 😆)
I'm positive that next edits will be features additions only and no one will blame my code.6 -
Whoever named memcached: fuck you with an open umbrella. It was a bright fucking idea when there already exists a memcahe extension for php. Finding good php examples is impossible when all these idiots name theyr example posts memcached and use memcache class in the code. Fuck.5
-
Hello everyone,
My name is Andi and I would appreciate some advices how I can get started in the IT sector.
Im very interested in the development of software.
I was always interested in software and all around computers.
Right know I'm working in a boring steel trade company and I want finally start to develop some skills for my (hopefully) future job.
Do I need to study to get a good job as developer or do I have to learn to code all by my self ?
(Sorry for my bad English)20 -
Oh... I dont know what to pick...
So i will pick 3 projects from my 3 stages of my dev "carrier"
1.Right after i discovered programing and learned how ,if, while and similar structures worked. The launguage was object pascal with delphi 2007
That was a "safe" with a stupidly complicated lock (text inputs, sliders, ect) it opened a secret folder in the end.
2. It was a embedded code for a Atmega8 AVR, Atmel studio, pure C but without memory managment (i didnt even know that it even existed)
It was a Pip boy knockoff, 16x2 display and a small keyboard connected to the arduino like board that i made on a proto board.
It wasnt that much of a pipboy, it was more of a showoff of atmega8 internal systems, (ADC, timers, interrupts and such)
3.DataLab, after helping my friend with his master thesis, (we meet on discord long story, i was in high school) i decided that mathlab is shit and i created a visual scripting enviroment, launguage C# .net 4 (in the latest version)
I remade the whole program from scrach 1 time, significantly improving everything (code reuse, better algorithms, data processing, code redability and edge cases) I have learned good practises from everywhere. I learned how to use git.
DataLab project looks just like LabViev (i didnt notice that it even existed...), it is frozen now because of my mental status but im planning on using it on my CV when i will be looking for jobs on holidays. There are many things that i can improve in that program but ... first i have to fix myself. -
Guys...watch the cppcon21 keynotes.
That is good stuff.
The insights and ideas in these talks are not just for c++. They apply to CS in general.
The presenters have done a phenomenal job with the content. There is a good deal of philosophy for what it means to code and how it should look like (not specifically in c++). Most of it is distilled insights collated right from the times when computer science was a domain of mathematicians and ee majors to the modern age.
It is like Dr.Dobbs but in video. Even book like. Certainly very dense.2 -
I didn't think that it could be worse than in the companies I've been previously working at (last one was good btw)!but the current company has a code base for a website made in grails with an angular app and no existing developer knows how this site works - and there isn't a single comment in the code either. There isn't any other form of documentation either D:
-
Ohh... really....
So I bricked my phone last week and had to factory restore to get it working so lost all my apps and data...
There were a few I created for myself and use but I don't do Android dev anymore (and Google decided to remove all my apps from the appstore but then again I don't care, no one uses them)
Anyway I couldn't find a good replacement on the app store.... so i pulled up the source code from my back up drive... and luckily found the compiled APKs too :)
But thought well heck might as well just publish the code but apparently... it was already published...2 -
Really long story. It begins when I was 11 years old, Harry Potter was kind of a hit (it was the beginning) and a lot of site based of the universe where popping everywhere on the internet. I wanted to make mine so much I subscribed to a french website which offered free tutorials on differents languages. The site is still up, it is now called OpenClassrooms and it saved my life a lot.
I tried to learn HTML (4 at the time if my memory's good) and CSS, but my mother didn't believe in my project and made me quit.
Nine years after, I was looking for something to do in my life: I tried a cursus in art history and archeology, I made a Baker school, but my life didn't feel filled.
I heard about a formation in a town near mine, and was for everyone, newbies or veterans, who wanted to have their diploma either in networks or in code.
The coding classes where fantastic. We learned VB.net, Pascal, php, laravel, C#, SQL, PL/SQL (we had a teacher who was absolutely fan of Oracle), I topped my class and now I am in the next formation for my Bachelor. Today I learn Java, Symfony, Android.
The ones who taught me to code? Internet, my teachers, books. But my teachers were the most important, because they gave me the confidence. -
I knew programming was for me, MUCH later in life.
I loved playing with computers growing up but it wasn't until college that I tried programming ... and failed...
At the college I was at the first class you took was a class about C. It was taught by someone who 'just gets it', read from a old dusty book about C, that assumes you already know C... programming concepts and a ton more. It was horrible. He read from the book, then gave you your assignment and off you went.
This was before the age when the internet had a lot of good data available on programming. And it didn't help that I was a terrible student. I wasn't mature enough, I had no attention span.
So I decide programming is not for me and i drop out of school and through some lucky events I went on to make a good career in the tech world in networking. Good income and working with good people and all that.
Then after age 40... I'm at a company who is acquired (approved by the Trump administration ... who said there would be lots of great jobs) and they laid most people off.
I wasn't too sad about the layoffs that we knew were comming, it was a good career but I was tiring on the network / tech support world. If you think tech debt is bad, try working in networking land where every protocols shortcomings are 40+ years in the making and they can't be fixed ... without another layer of 20 year old bad ideas... and there's just no way out.
It was also an area where at most companies even where those staff are valued, eventually they decide you're just 'maintenance'.
I had worked really closely with the developers at this company, and I found they got along with me, and I got along with them to the point that they asked some issues be assigned to me. I could spot patterns in bugs and provide engineering data they wanted (accurate / logical troubleshooting, clear documentation, no guessing, tell them "i don't know" when I really don't ... surprising how few people do that).
We had such a good relationship that the directors in my department couldn't get a hold of engineering resources when they wanted ... but engineering would always answer my "Bro, you're going to want to be ready for this one, here's the details..." calls.
I hadn't seen their code ever (it was closely guarded) ... but I felt like I 'knew' it.
But no matter how valuable I was to the engineering teams I was in support... not engineering and thus I was expendable / our department was seen / treated as a cost center.
So as layoff time drew near I knew I liked working with the engineering team and I wondered what to do and I thought maybe I'd take a shot at programming while I had time at work. I read a bunch on the internet and played with some JavaScript as it was super accessible and ... found a whole community that was a hell of a lot more helpful than in my college years and all sorts of info on the internet.
So I do a bunch of stuff online and I'm enjoying it, but I also want a classroom experience to get questions answered and etc.
Unfortunately, as far as in person options are it felt like me it was:
- Go back to college for years ---- un no I've got fam and kids.
- Bootcamps, who have pretty mixed (i'm being nice) reputations.
So layoff time comes, I was really fortunate to get a good severance so I've got time ... but not go back to college time.
So I sign up for the canned bootcamp at my local university.
I could go on for ages about how everyone who hates boot camps is wrong ... and right about them. But I'll skip that for now and say that ... I actually had a great time.
I (and the handful of capable folks in the class) found that while we weren't great students in the past ... we were suddenly super excited about going to class every day and having someone drop knowledge on us each day was ultra motivating.
After that I picked up my first job and it has been fun since then. I like fixing stuff, I like making it 'better' and easier to use (for me, coworkers, and the customer) and it's fun learning / trying new things all the time. -
Is it just me or are books on algorithms split between being too simplistic and being too detailed to be practical. I read Donald Knuth's book "The Art of Computer Programming Vol.1" read about 10% of it , which is like 3 chapters. I really enjoyed those chapters, Knuth's is such a genius but then the rest of the book was so complicated that the introduction and definition of terms was longer than some whole chapters in the same book. I decided to look for another, found a really good one, but it was analyzing algorithms in Java, sigh, I hardly code in Java so it was exactly easy for me to follow when he keeps mentioning the "comparable" attribute on sorting algorithms. I then got another really followed it till the keep on referencing indicator variables, I had read 3 books now and had not had of these indicator variables. Am sure they are not that common in the Computer Science literature so I was left wondering why I had to learn to analyze code with indicator variables though it was not a standardized in the "Computer Culture" would I be the only one who does this?.. I hence gave up on learning algorithms till I got that book that was just right for me5
-
So today at the electronics shop I saw an 500Gb on sale. For some reason it also came with a code for Battlefield 2042. The price label was written in a very confusing way, so I thought it was actually ~22EUR instead of ~118EUR off. It sounded too good to be true, but my train of thought was that it's entirely possible that they are really desperate to get people to play their shitty game.
Unfortunately it was too good to be true and it was actually actually 96EUR. What a scam.
In case you wanna look it up yourself, you can also find it online (For a lot cheaper than in that store). "WD_BLACK 500GB SN750 SE NVMe"
For some reason it's cheaper with the game, I wonder why (But it's still a tad overpriced)1 -
So today was my first time combining mocking, depenancy injection and promises. I thought I had a relatively good understanding of everything until I started writing tests - now my head is spinning.
The actual coding has gone really well - implimented the strategy pattern so I can reuse my code whenever I want to make an API call - and everything is nicely decoupled so it should be easy to test. In theory.
If anyone here happens to write tests for a living, I have a new found respect for you today...
Time for a beer 😅3 -
Since when was having 3 spinner styles and 2 pop ups styles a good idea in a SaaS? This baby needs a proper spruce up. I must admit it's not really a rant, I enjoy it, decrapifying the code and general refactoring. This is from a hackathon a good couple of years ago. Finally giving it some TLC. Feels amazing.
-
My company got me a chatgpt account today. I am looking at what they do with our data. From what I gather you cannot delete data you entered without deleting your account. I was hoping to use chatgpt to train models on our internal code. However, this seems like a risk to our IP. Kind of bums me out. I guess the alternative is building models only using tools that are completely contained in our computers.
The first thing I asked it was about using a floating origin in Godot. It actually produced some decent code for this with a good explanation. I am exploring the idea of a space sim and I might need a floating origin for physics stability.
Anyway, I guess I am going to be playing with this fancy toy for a while.5 -
I tried to make some SP using the syntax and formatting that visual studio outputs when making a SSRS report. I thought it was nice.
It formats the code in a standard way and transforms stuff like "join" to "INNER JOIN" and "left join" to "LEFT OUTER JOIN ".
When the team reviewed the code they were like WTF?! This syntax is horrible, it can't be understood. You did this?
*Me with my red face*...
I just said. You know what? I am going to go back to the old school syntax if you prefer. I just thought it was better.
Yeah... You really should go back to old school syntax.
---
Keep in mind that the old school syntax is annoying to me... No formatting at all and basic instructions are not in larger upper case.
Anyway, I thought it was nice tbh. I still think it is. And it is definitely better to me in some way.
What bothers me most is that they want to improve their coding. They say they want to be more standard and it seems every time you want to make a change it's not a good idea because "everything is already written that way". And when you don't make a change, "you should have change it"... Well sorry I was just copying the old style.
Anyways , it's not that important. I do get their point. Sometimes.1 -
This morning I found out that the code I wrote to convert json data to a new format in our DB was giving errors and a bunch of questions got saved with the wrong property. It was assumed when it was triaged with my boss that we would only see one key property so the code written by me so the code was aimed at that. Well some questions have multiple keys for no reason. They are mostly floating data that hasn't been wiped clean because the develop who wrote this use json data in psql with no validation or data cleaning. This edge case was also never caught on PR reviews and we got a pretty heavy review process. I'm not being blamed for it. Most of it I think all the devs feel bad we didn't catch this because it affected us greatly. I've been working all morning trying to resolve it with my boss and just now in the evening we stopped. I just feel like I'm not a good dev at all and just want advice on how to deal with situations like this. I'm a new dev and this is my first job I have held for almost a year2
-
Okay so i did an internship in Laravel for 6 months. I started there and i had zero experience with it. Later, i started to learn more about it and i realized their Laravel version was at 5.8 and their bootstrap was at 3.4. It annoyed me so much but i wasn't allowed to update it to a better version.
What happened is, i installed Linux on my laptop and had to install some things. I accidentally did composer update and updated the whole thing. I updated it to Laravel 7.4 and i thought, well, that's good right, it will not effect the whole project right? No it wasn't right. I got Teams messages from my colleagues. They normally don't really respond to me, ignoring me but this time, they responded quickly. It was wrong what i've done because the code on the server wasn't working anymore and it was pretty bad they said. So i had to get the last version in Gitlab and i should not do composer update again.
Also, i was annoyed because i couldn't use so many font awesome icons. They all didn't work! I had to make this dropdown menu with an arrow down but even that didn't work, so i used a transparent image to do it because that was my only option to have a good arrow. I wanted to update that as well but nope, not allowed.
Oh yes, i'm not done yet.
They have put so much CSS on the project, that i couldn't even use bootstrap columns. I struggled with that and seriously, no help. The pages were styled really weird and it was dramatic.
When i asked for help, for some PHP code for example, no one responded for days and i was angry about that. Later at the end of my internship, they told me I wasn't the one who was responding and that i should have asked for help and i had to start the conversation. They really just said that? Yes, they did and i'm not happy about that. It costed me some points on my end essay, because they haven't been doing their best.
I wanted to learn more about PHP, but ended up doing all the frontend. I like it, but it's not what i originally wanted to do. So basically, i learned stuff in frontend but almost nothing in backend. It saddens me and hope to get a better internship next schoolyear.
I really had to rant about this, oops.1 -
At work thres a legacy "common" DLL, which held a helper function that's incharge of creating Slugs, it takes an MD5 of the current time stamp UTC, removing non-URLable chars, and taking the first N chars that remain then
Ngl I was impressed at first at it, but then I thought, its Uniqueness isnt guaranteed
But then again I thought, the uniqueness can be tested via a call given it's indexed anyway in DB so O(1), and if non-unique, just re-call the function. Even in the worst case scenario the hits won't be that many anyway
I didnt change the code, tho at first I was inclined to given my "it isnt proven-unique" stance but am wondering, if this is a good approach
While coolish, it seems wrong in the back of my mind somehow...1 -
The worst thing ever is freaking NS datatypes, who thought that was a good idea? My code looked fine and worked fine till you made it spaghetti, thanks apple
-
So I’m trying to implement a new feature on a web platform.
Getting constantly a new error which is good cause that means that slowly I am progressing.
And then I refresh click the button to test and then the whole top bar of the app moves back and forth like its dancing macarena for like 5 seconds. I was legit confused what just happened that. Tried to repeat it and figure out how is there animations in my code, but there’s nothing. Either I’m burned out or I’m going crazy.
Still deciding.2 -
First project I'm doing with C++.
I was using Eclipse (for C++ obviously) for some hours. It sucks.
Switched to VS Code. All the editor tool you can dream of are in. But there's no way to configure the project (includes, build system, toolchains…).
"What a fool" I say, remembering there's Visual Studio Community… which is only for Windows.
So I'm currently using BOTH Visual Studio Code and Eclipse.
Why can't there be ONE good, full featured and free C++ IDE for Linux ?38 -
I don't even know that i should say it was a good problem or a bad one, i was programming a magnetometer sensor in both spi and i2c. I was tired of not working
I touched the sensor it dropped off!!! It was not soldered well!!!! At the problem was not from the code1 -
It was a great christmas time and good to had some days without a computer and without code but im so happy that i have to work today
-
Just realised how frustrating it can be to setup Android Studio on Ubuntu and Windows, for React Native.
Was only using the creat-react-native-app yet, without the native code.
Feels good to finally see it working.
PS- Still can't get the emulator to work on Ubuntu 😭2 -
I've recently had an exam, a C++ exam that was about sorting, pointers, etc... The usual. The exam was about Huffman's
optimization algorithm along with some pointer problems. He asked for a function to find something in a stack, what I did was write down a class that has a constructor, deconstructor, SetSize(), Add(), Remove(), Lenght(), etc.. He didn't give me any points for that, why? Because I didn't write down everything like in his book... I had classmates that literally had phones open with his book, he just watched how they copied code and gave them 10/10 points. But nothing to the guy that wrote down 20 pages of code. YES!! On paper, an IT university that asks you to program on a fucking paper. Good thing that at the very least I passed.
TL;DR
Teacher has book, I refuse to remember code from it/copy from it, I get lower grades than people that literally copied word for word.
Life is really fair. -
Going through some code I was handed to do an emergency project... Think of an aspx site that follows no design rule, like database access directly in the code behind. No models ect. So I'm going through this section that calls a function good start. Open the function find a class that contain code to access the database.. Humm ok this part look better that the rest. Read the code that validates if it exist in the database and gets the type back. So far so good then there is a get details function call.... Open up the fct ... Started crying... There is a 200+ lines switch case that goes over the type previously fetched..... And the type is stringed compare in the biggest switch case I've ever seen.... Fthis... I'm out1
-
I am an intern and was put into a fresh project to do node back end. They didn't really give me any supervisor because the company lacks employees and has too many projects, and they were afraid I won't do myself. I was assigned to a front end oriented colleague to make a team, and cooperation with him is really demanding. After a month, a company that outsourced for us did a complex code review and said we wrote some darn good code, and they were said we are both mids (while colleague is a fresh Junior with an intern by his side). Damn it felt good :)
And also our pair is said to be the only Dev team in the whole company that can call client for itself, without PM or any host of the call, as others, with a lot of experience, need to be guided through each call :D -
This article about the types of legacy code bases you will have to deal with just made my day!
Not only do I have every one it describes but somehow it even made me laugh at thought of each of the std riddled petri dishes of code that I reluctantly maintain... My "Happy Place" is a folder dedicated to reliquary projects I like to look at when I feel sad to lift my spirits and restore hope that one day things will be better.
Do you have any definitions to add or know where to find more? I'm hooked.
Link: https://medium.com/@dylanbeattie/...
Excerpt:
The Reliquary
The reliquary is that one repository full of really good ideas. Clean code. Brilliant algorithms. The OpenID implementation that you optimised until it shone. Classes so beautifully designed and perfectly documented that they’d make a senior architect weep.
You remember the big rewrite? The project that was going to fix everything, only you never worked out how to actually launch the thing, or get any revenue from it? The reliquary is where you’ve preserved it, pickled in revision control like a fabulous museum specimen. A treasury of good code and good ideas; maybe even an entire codebase that was “a couple of weeks” away from shipping before somebody finally looked at the number of critical features the team had somehow forgotten to include and discovered — to everybody’s surprise — that validated XHTML, normalised data models and 95% test coverage are not actually features any of your end users cared about.
Like Buran or the Spruce Goose, the surviving artefacts stand as a testament to the quality of your engineering… and a poignant reminder of just how much fun engineers can have building high-quality stuff that nobody actually wants to use. -
I joined a startup and suddenly all I thought I know was disappearing and a very complex creature fell into my laps asking me to code it. Then there’s these trello cards asking me to pick them up and start solving.
Well, first, no idea how the whole app is structured.
Good thing, have a supportive team for sure. -
I really am in a love/hate relationship with programming...
I had some free time so I decided to do the Google foo bar challenge. For testing purpose, I code in sublime text and then copy the code in the browser.
Yesterday, I spent most of the afternoon doing one challenge. I figured out how to approach the problem, which was kinda easy, and coded it in about 10 minutes. For some reason, what worked perfectly in sublime text worked without throwing any errors in the browser, but 4 of the 5 test done by Google failed.
Today, after spending a good hour tweaking some stuff in the hope that it would work, the browser editor started throwing indentation errors...
Deleted the code in the browser, copy-pasted the exact same code from sublime : All test passed!
That's a couple of hours I'm never getting back. -
I'm building a script parser to make mods for a game I like. The first step is to write an importer.
The documentation is nonexistent and I'm delving into byte manipulation, which I'm not familiar with - at all. I'm porting existing code from Java to C#, and everything is similar but different enough that I can't always just to a 1:1 transfer.
I get everything working, cleaned up and split into classes so I can write the exporter.
I do an import and the file won't parse. I try all previously know working files and still no good. I clean, rebuild, clean rebuild, run, debug, restart my computer, clear my cache, clean, rebuild. No good.
IT WAS WORKING 5 MINUTES AGO
Proceed to revert to every version from the last hour. No dice.
I was in the wrong folder the whole time.
Navigate to the proper folder, open the filename I know to be good and bingo, works like a charm.
The same project caused me headaches because I had a "== -1", when it should have been "== 1". Between my inexperience with byte manipulation and my untreated astigmatism, I was nearly sent to the shadow realm fixing that.3 -
I uncommented the line inside a custom "library" made by a friend on a college project.
We spent 3 hours trying to make it work...the bug line was supposed to call one of the result functions, but the code had been made in a way that it was a mess and impossible to find at first.
That felt good. -
Well not like friends as such but kinda of get people respect when you are good at it.
It was during 12th Grade while working on our project for the year , everyone had some kind of doubt and you know the Teacher is not always free to help every one so after looking at what me and my friends were creating she said approach them for your doubts.
Well I can be a prick sometime if I want to be mostly because you are writing bad code or your facts are wrong hence not a lot of them used to like , like me.
But after that they had no option hence felt pretty badass after that.
And like not that I was criticizing them but it you don't want to learn then please solve your own doubts yourself.
Maybe I was wrong to you know to teach everyone. but well that's me do it right else don't do it. -
I was having a weird time playing manager because we had none. And the new one kind of sucks and it is too junior for the role. Acting as TL too and had almost no time to code or do PRs. And. Gee. Yesterday I went back to coding after a few months. And I found out that We have a team member that just shits all over the code. Tests that are invalid, basically testing nothing. Methods done apparently for no reason. It took me a good deal of time to sort things thru. And now I'm at a point where I can finally do some reviews. Long day today.1
-
I had to do a modular deduplication project that could read, parse and clean up the data.
The data? Personal information: Name, Surname, phone, address and more.
Imagine the zip code in any of the following formats: ####AA, #### AA. Names with and without dashes. Address with(out) spaces, dashes, underscores etc. as well as typos! Now clean it up, and dedup.
But what files have priority over another? What data is newer? How to process address changes?
Deadline: 2 moths, impossible deadline for a (at the time - 4 years ago - rookie developer)
Anyway, night before the deadline, code was running somewhat (Java) and was able to get a Regexed address cleanup of about 70 - 80%.
My boss comes in to check the progress, sits me down next to him and says: Not good enough, let's do it together tonight, it was 4pm, day normally ends at 5pm.
No thank you, I can't do that. if you don't want this code, then I can't meet your deadline.
bye -
¡¡Good news!! Finally solved the image upload problem with lumen and angular. It happens that, even the $request in Lumen was "empty" it turned out that the actual image file was a binary object inside the Lumen $request variable that didn't render because the browser, postman and everything I tried couldn't understand it (maybe something to do with the Content-Type). I figured out and solved it, now I can easily save, delete and even modify images when are in the server side.
One more thing... My code was fine the whole time, l mean like, 3 days of finding a big that doesn't exists haha
Everyday we learn some new si*t
For those who don't know what I'm talking about, the story is right here:
http://stackoverflow.com/questions/...
PS: thanks guys, I really appreciate your comments: @champion01 @itsdaniel0 @dfox @joetj3 -
What was interesting was 70% of the Data Vault training was something I do already. The other 30% was either a good idea or overkill. However now that it has been adopted by the team, I guess everyone will have to code that way.
-
I recently joined a project team in my company whose client is a BIG (and I mean BIG) tech company.
We offer marketing solutions to the client. This means we create websites that showcase the company and all the good stuff that they do.
When I was going through my ramp-up meetings, my lead gave me some dummy projects to build just to get an idea of where I stood as a web developer.
So, it was one of those Photoshop mockups that were to be made entirely using vanilla JS, CSS3, HTML5 and nothing else.
There came many points where I had to align items either horizontally or vertically. So, I used flexbox to do it.
I submitted my code to the lead and while going through it, he commented, "Why do you use flexbox? It is no good. Use float instead." And I looked at him in utter confusion.
Tell me, is it wrong to use flexbox? Should I have used float instead? -
Not quite quitting a job but my course in college. Had 5/6 lecturers in my first semester last year that were totally unprepared and some were even clueless on simple things. One line was if I had five more minutes it would have worked when showing us how to code in python(he was using Java conventions) this was 10 minutes after the lecture should have finished. After 3 months of that utter crap and a summer of studying for repeat exams(had mumps for the original exams) I was ready to quit. Good thing the year I was in was good fun to hang out with other wise I would be working in McDonald's right now
-
Not really a fight, but a disagreement that lead to some big changes in my mind.
When entering my school, I still had a part of me wanting to do game development.
I'm gonna make it short : We wanted to do a game in Java at school in first year, but one wanted to do it in C because didn't feel good with Java.
And I always sum that experience up by saying "Never again." The atmosphere in the team was very friendly, but that's the only good part of it. I hated doing that project, and it removed that small will of doing game dev (as a paid main job).
Maybe it would have changed if it was later during my studies, since I was still learning how to code during that project.
But I guess it showed that I was maybe not that motivated to do games.2 -
Lately I am facing this issue. I spend a lot of time and did hard work on some specific thing! but it doesn’t seem to work as it should be, so because of this I am disappointed. I don’t know I should be feeling like this or not, but I am questing myself that I am a good developer or not!
It’s not like that I don’t know stuff, I start working on laravel , few months ago. It’s been 4 months, and I already develop a backend of the whole app, but it was not that complex. Recently , I am assigned to this new project, which is very complex, and It was already made by some other developer, so I am new to this and I don’t know how it actually works. But I was assigned to add new functionality to it, and It was kinda complex, like maths and calculation and depending upon the data coming and updating calculations changed. So, I almost work hard and over time for this, and I think I did a good job, but turns out it didn’t. So, I worked again on this, but again turns out it didn’t work out as it suppose to be.
So , After all of my hard work, the code was not right, and that led me to question myself and I am feeling bad. Is this normal? Is it okay to feel at something?3 -
I wonder if I thought about this before.
Project Buildbox ?
A project that contains a very large selection of popular source bases, and everytime a major lib or component is updated or compiler, it tries to compile all of them and run unit tests on their code ?
I FUCKING DID ALREADY FUCK YOU ALL !
THIS WAS A GOOD GODDAMN IDEA !!!1 -
Not exactly a rant but some annoyances
Whenever I copy paste code from kindle it does not space the code. Stack overflow says that kindle is using characters for space which are not present in UTF-8 which causes the issue and the find and replace option coes not work in vs code which the author is using. And if you copy from kindle whether you use the button or Ctrl + C it will add the book title and the author at the end. Who the fuck though this was a good idea.
Oh a table does not fit on the screen render whatever fits even if it is the top line of the table. This is probably not an issue and they cannot fix it and I shoild just deal with it.
The author introduces me to the language compiler and lists a command to what versions are available. I get an error which says the command is not found on windows. I dont find any solutions on google, so I go the next place and author says that he knows about it and shows a link to fix it and tells to folloe the instructions. But the link does not have any instructions and just has instructions to configure the compiler itself. The only releveant information was the path to the compiler which the author could have included there or said that was the only relevant information. The path was correct but I needed to install some stuff through Visual Studio2 -
"Through centuries of scourges and disasters, brought about by your code, you have cried that your code had been broken, that the scourges were punishment for breaking it, that men were too weak and too selfish to spill all the blood it required. You damned men, you damned existence, you damned this earth, but never dared to question your code. Your victims took the blame and struggled on, with your curses as reward for their martyrdom - while you went on crying that your code was noble, but human nature was not good enough to practice it. And no one rose to ask the question: Good? - by what standard? " - Ope Rand.
-
I know that when your code is in PR Process its a good oportunity to improve but I dont want my TL think I am useless... It was a good way to verify how he likes to work and that he is a functional approach fun but I would like to give him the image of being accountable... This is my 2nd week...
I would like to know if there is a place where you can grab imperative java code so as to practice... I wont run like crazy to transform all to functional but would like to be awared..
We are using Java Vavr library which is amazing... -
So... I like 30 seconds of code! And I like the idea of it tbh, I was thinking about something like before.
The question is, how bad will it be if I do a similar website but in my native language? 🤔
I don’t want to be a copycat .. but its really good idea for sharing knowledge and to help other programmers.