Wholey shit only occurs if you do anal
- 2 Posts
- 26 Comments
vrek@programming.devOPto
Programming@programming.dev•What is your development environment?English
2·4 days agoThat’s what I mostly use too
vrek@programming.devOPto
Programming@programming.dev•What is your development environment?English
2·4 days agoFrom jb I only have used pycharm but it was pretty good.
I worked in a heavily regulated industry. Everything required a manual test. Let’s say you have an employee ID that is 10 digits long which they use to log in. You had to have some else (couldn’t be the developer) to write a series of tests, get those tests approved by 5 people(with specific titles) then a third person to execute the test, then the second person had to write a report saying it all passed, then that report had to be approved by the same 5 people.
That typically wasn’t the delay. The delay was to execute the tests we needed to stop production. That typically was a 6 week wait(unless urgent for “reasons”) and changes like “I will drop scrap by 83%” was typically told wait till July 4th or Christmas breaks. Why? Because production would be down for 3-4 days typically. Someone had to start the system, ok no entry produces error, executor and developer have to sign a physical paper, restart the whole system, now an entry of 1 digit produces an error, sign the form, repeat for all digit quantities up to 9, repeat for all digit quantities up to the choosen value(based on severity if an issue occurred), 2 people sign for each one, system restarted between each. If you had say an enter button and a cancel button each had to be checked for each quantities of digits. Oh but wait what if someone just types there name… Now repeat everything for alphabet values… What if someone does combination, more tests, more restarts, more signing.
Reports easily surpassed 1000 pages, no one really had time to check all that so I saw so many missed signatures and missed tests. I asked the “senior validation expert” can I just automate a lot of these tests using unit tests and attach a computer generated report of all tests passing and the source code of the tests? " the response I got was" what’s a unit test? "they still don’t use any of them to my knowledge.
It would be horrible in real life but I thought a funny intro to a post apocalyptic movie would be a person giving a tour of a bio lab to college interns and…
“through our studies we have learned to increase the transmission rate and the death rate of the small pox virus. The downside is we had to mix it with rabies so the infected tend to get aggressive and lose there ability to rationalize their thoughts. Don’t worry though, there is only this one vial of it in the entire world… these gloves are quite slippery… Oops”
vrek@programming.devto
Android@lemdro.id•New Pixel update means your RCS messages might be visible to your bossEnglish
3·18 days agoWhat I don’t get is why do it at work? Like ok, sure you may not be able to control what you enjoy but it was a credit union… “oh yeah this annual financial report got me so horny I got to go commit a federal crime in the bathroom”… Wtf???
vrek@programming.devto
Android@lemdro.id•New Pixel update means your RCS messages might be visible to your bossEnglish
6·19 days agoYears ago, almost two decades, I setup a Screensaver which basically took any image passed over the network and made a collage. Almost everything was like website banners and such.
One day I was in the server room doing something un-related and in the corner of my eye I saw some horrible images on the other screen. I immediately went to the cto who called the police.
Long story short he was immediately fired(and taken into custody) after being found in the bathroom… The images were kids between 3-7…
Before people ask, we could find out which access point he was using to determine approximate area. A quick walk around showed it wasn’t someone at there desk. Obviously they wouldn’t be in a meeting and there was only 1 set of bathrooms in that area. Female officer went into women’s room and reported it empty. Male officer went into men’s room and found 1 person, court case revealed history on his phone and yeah… Hopefully he’s still rotting in jail.
Fun… Well not really fun… Fact:
Giant tortoise didn’t get a scientific name for 300 years. They were so delicious no crew actually managed to get one back to England. They always ended up eating all the cargo.
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
2·23 days agoAhh, ok yeah makes sense
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
2·23 days agoI don’t recognize the name, what dud facepunch make?
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
1·23 days agoI saw a talk recently, I can find the video if you like but pretty sure it was the most recent ND conference, where they made the point that a lot of lack of efficiency in modern code is because of large companies. Basically in alot of cases it’s more important to get a product out ASAP then to care if it was well done. Ok, a poorly written program may cost an extra $10,000 a month to run but if it earns them a million a month and saves 6 months of development time it pays for itself and they can eat the cost.
This seems like the case with renting vdis instead of fixing the program.
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
2·23 days agoI believe so but I don’t remember the exact encryption algorithm and don’t have access to the code anymore.
This was the same place that had a 500 line file named glob_vars.cs which you can guess the content of because “passing around variables cause memory leak issues”.
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
1·24 days agoYeah but simply using entity framework would of made the configuration file a list of systems.
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
6·24 days agoI agree but I would say if there are variable token costs depending on report it would be nice if client sent request to server, server calculates x tokens to be used, sends x to client, client confirms that’s acceptable, server does work.
Like if I expected a report to be 2 tokens but because of some quirk or a typo or something it cost 200 tokens I would like a chance to cancel it if it’s not worth it.
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
3·24 days agoWas he trying to use a ide or like vim/clang/gdb for debugging before giving up?
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
6·25 days agoThe corporate world runs on excel, never the best option, but everyone knows it so…
vrek@programming.devOPto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?English
3·25 days agoSpeaking as an old person, back then they didn’t have the same concerns. Security? Ehh just don’t let bad guys access your computer.
Yeah a lot of old programs are either great programming or terrible.
vrek@programming.devto
Programming@programming.dev•My first successfull program in CEnglish
2·26 days agoJust warning you, the rpn suggestion is pretty complex and would be a complete rewrite. You are on chapter 2, rpn would probably be covered in the second book.
vrek@programming.devto
Programming@programming.dev•My first successfull program in CEnglish
8·27 days agoAll the other tips are great. I would also recommend checking out a switch statement, for example https://www.geeksforgeeks.org/c/c-switch-statement/
This will clean up alot of the else if statements. Also I would work on code to organization. For example you test if the choice is greater than or equal to 6 or less than 1, then if it is equal to 5 then check again if it’s less than 5 and greater than 0. You already did that third check.
If you want to go slightly more advanced I would put the steps to ask for and save the input numbers into a function then just call that function on each of the following choices. Would add a functional call but would remove another if statement. If you name it well it would also help on code readability.
Also if you want to take this farther like taking more than 2 numbers or more than 1 operation (for example 2 + 3 * 4) look into reverse polish notation. Basically it’s how to store the equation to make executing them correctly easier. That might be a little advanced for you at this stage though.

Last year during the Christmas shutdown at work I actually made a crud application to track naughty vs nice children for santa, yes it was sql based(entity framework) with >90%test coverage (tests based off a in memory database) and with a winforms ui(what I had to use at work).
I might revisit and refactor it this year come to think of it.