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 - "for-loops"
-
Its Friday, you all know what that means! ... Its results day for practiseSafeHex's most incompetent co-worker!!!
*audience: wwwwwwooooooooo!!!!*
We've had a bewildering array of candidates, lets remind ourselves:
- a psychopath that genuinely scared me a little
- a CEO I would take pleasure seeing in pain
- a pothead who mistook me for his drug dealer
- an unbelievable idiot
- an arrogant idiot obsessed with strings
Tough competition, but there can be only one ... *drum roll* ... the winner is ... none of them!
*audience: GASP!*
*audience member: what?*
*audience member: no way!*
*audience member: your fucking kidding me!*
Sir calm down! this is a day time show, no need for that ... let me explain, there is a winner ... but we've kept him till last and for a good reason
*audience: ooooohhhhh*
You see our final contestant and ultimate winner of this series is our good old friend "C", taking the letters of each of our previous contestants, that spells TRAGIC which is the only word to explain C.
*audience: laughs*
Oh I assure you its no laughing matter. C was with us for 6 whole months ... 6 excruciatingly painful months.
Backstory:
We needed someone with frontend, backend and experience with IoT devices, or raspberry PI's. We didn't think we'd get it all, but in walked an interviewee with web development experience, a tiny bit of Angular and his masters project was building a robot device that would change LED's depending on your facial expressions. PERFECT!!!
... oh to have a time machine
Working with C:
- He never actually did the tutorials I first set him on for Node.js and Angular 2+ because they were "too boring". I didn't find this out until some time later.
- The first project I had him work on was a small dashboard and backend, but he decided to use Angular 1 and a different database than what we were using because "for me, these are easier".
- He called that project done without testing / deploying it in the cloud, despite that being part of the ticket, because he didn't know how. Rather than tell or ask anyone ... he just didn't do it and moved on.
- As part of his first tech review I had to explain to him why he should be using if / else, rather than just if's.
- Despite his past experience building server applications and dashboards (4 years!), he never heard of a websocket, and it took a considerable amount of time to explain.
- When he used a node module to open a server socket, he sat staring at me like a deer caught in headlights completely unaware of how to use / test it was working. I again had to explain it and ultimately test it for him with a command line client.
- He didn't understand the need to leave logging inside an application to report errors. Because he used to ... I shit you not ... drive to his customers, plug into their server and debug their application using a debugger.
... props for using a debugger, but fuck me.
- Once, after an entire 2 days of tapping me on the shoulder every 15 mins for questions / issues, I had to stop and ask:
Me: "Have you googled it?"
C: "... eh, no"
Me: "can I ask why?"
C: "well, for me, I only google for something I don't know"
Me: "... well do you know what this error message means?"
C: "ah good point, i'll try this time"
... maybe he was A's stoner buddy?
- He burned through our free cloud usage allowance for a month, after 1 day, meaning he couldn't test anything else under his account. He left an application running, broadcasting a lot of data. Turns out the on / off button on the dashboard only worked for "on". He had been killing his terminal locally and didn't know how to "ctrl + c a cloud app" ... so left it running. His intention was to restart the app every time you are done using it ... but forgot.
- His issue with the previous one ... not any of his countless mistakes, not the lack of even trying to make the button work, no, no, not for C. C's issue is the cloud is "shit" for giving us such little allowances. (for the record in a month I had never used more than 5%).
- I had to explain environment variables and why they are necessary for passwords and tokens etc. He didn't know it wasn't ok to commit these into GitHub.
- At his project meetups with partners I had to repeatedly ask him to stop googling gifs and pay attention to the talks.
- He complained that we don't have 3 hour lunch breaks like his last place.
- He once copied and pasted the same function 450 times into a file as a load test ... are loops too mainstream nowadays?
You see C is our winner, because after 6 painful months (companies internal process / requirements) he actually achieved nothing. I really mean that, nothing. Every thing was so broken, so insecure / wide open, built without any kind of common sense or standards I had to delete it all and start again ... it took me 2 weeks.
I hope you've all enjoyed this series and will join me in praying for the return of my sanity ... I do miss it a lot.
Yours truly,
practiseSafeHex20 -
Colleague: "Python is slow..too much slow."
Then I look at the code:
Eight nested for loops, inside two of them, two function calls and three list comprehension. That function has 2 nested loops and two "objects.all()" Django method, plus a list comprehension too..
Yep, Python is slow.20 -
I work at a small company that uses very outdated coding approaches for their solutions.
About a year ago I went through our main application to improve performance and found quite a few areas that I could tackle such as using a dictionary data structure in place of (many) foreach loops that required to pull out a single object.
That specific change yielded a lot of improvement (you can only imagine) and the other developers wanted to learn the ways of dictionaries (because it was so revolutionary and new to them). I showed them many examples so that they could better understand this data structure.
Fast forward to a few months later, saw one of my coworker's code and noticed that they were using a dictionary... And iterating through each kvp similar to a foreach..... Wtf?!
P.S. that person's salary is much higher than mine :(
First time rant. Thanks for listening!10 -
So my manager (a 29 y/o, who hardly can use a mac) walks towards me with a hint of panic in his eyes.
Manager: Hey commander keen, do you know how to use vertical look up in excel, I've tried, and looked at tutorials.
Me: yeah I really don't know excel (and not willing to learn, especially on the fly), I don't even have excel installed, I can write I script that does what you want.
Manager: No you have enough on your plate
3 hours later
Manager: hey I still can't figure it out, could you solve it with a script, won't that take to long
Me: no send me the files, Ill do it with a script.
I start writing 2 for loops and wait for the file, 10 ish minutes later its basicly done, just need to put in the column indexes.
I send a message on both slack channels (hey are you going to email or slack me the file)
After a hour I walk to his desk and again ask him for the file.
Manager a good 2 hours later on slack: Hey I just send you the file, I hope its not to much work, it has to happen asap.
So if you have kids, and they are not that bright by some kind of birth defect, don't worry, they can always become a manager.
But you can't get me down today. I hit 2000 upvotes and the employer is unknowingly a proud sponsor for reading and writing all these rants and comments :-) thnx devrant8 -
A friend of mine: Look at this nice app I made 😎
*shows me a normal looking app with tabs and different views"
Me: Hmmm… looks good.
Friend: Do you know how I made the navigation between views? 😏
Me: I'm afraid to ask…
Friend: Since I didn't know how to use the piece of code I found on internet, I made multiple views one above another with visibility set to false, and during the navigation I just change the visibility. 😁
Me: WTF? Man… this isn't something you should be proud of… it shouldn't be done.
Friend: Do you also want to know how I backup the code?
Me: No…
Friend: I send it to myself via email.
Me: FUCK!
Friend: I also never use while loops, I prefer to use for instead with a break inside. 😊
*blocked*17 -
My programming teacher is a freaking degenerate. He spend 7 months teaching us basic stuff like if-clauses, while-loops and stuff like that over and over again - everyone was annoyed but he didn't listen to us because "some people still don't get it". (The reason for this could be their total absence during lessons but who am I to tell.)
Beginning of 2018 he realised we hadn't much time left to prepare for our final exam so he tried self-taught learning. 8 sorting algorithms, recursion, how to write classes and objects in less than a week. And of course there was a classtest about this - needless to say that like nobody passed it. He still has no clue why we are "so lazy and dumb".
One of his favourite code examples is a calculator. I don't know how many i've programmed and they've gotten more and more ridiculous. (Who the hell would want interfaces like IComparer in a calculator?)
He even wanted to convince us that for-loops can't count down (and that things like "i--" doen't exist.)
I could go on and on about this guy and his craziness.27 -
"How do I use a for loop?"
I mean I can't fault them for being open to being taught, but if you're working as a software engineer...and can't use loops...11 -
I was interviewing this guy who's been a dev for 12 years. Apparently got laid off in his small town company because of covid.
So I asked him to write an algorithm that loops through a list and returns the largest number.
Not only could he not do that after trying for 15 minutes, but he also spent an entire minute ranting about how algorithmic questions were dumb and unnecessary in this day and age and you can google these things without having them memorized anyway.
The point of an algorithmic question in an interview is not to see if you can memorize the fucking thing. It's to see if you're methodical enough to reason through what you don't know and arrive at a decent solution all the same.
What do you guys think? Was I somehow the asshole here? It was a JavaScript job and the product was fairly complex, not just HTML bullshit.48 -
Please for the love of god name your variables in a sensible way! How the FUCK am I supposed to read your shitcode if you decide to write 6 (!!!) nested loops with variables each named by exactly one character. With no comments whatsoever!
I would rather crack password hashes than this nonsense.13 -
(Interview for sde-3 position)
(continuation of https://devrant.com/rants/2132431/... )
Interviewer - *opens laptop. Gives a question.* solve this.
Me - *a bit surprised that such questions were being asked on a sde-3 level*
this is the 4th or 5th question from geeksforgeeks, isn't it? I know the answer to this. Do u still want me to solve it?
Interviewer - *not believing me* Yes
Me - okay. Well this *writing down the original solution mentioned on the site* is the verbatim code mentioned on the website, with complexity O(n^2).
However I feel this is not the optimal solution. Let me write a better solution.
*I provide a better solution*
This has a complexity of O(n log n) . What do you think?
Interviewer - Nope. This could be a lot better.
Me - okay. Let me see. Did some minor changes, added some caching (obviously this will have no effect on the base algorithm) etc
How about now?
Interviewer - nope. Still not good.
Me - okay. Can you tell me how to improve it?
Interviewer - no we are not allowed to solve problems for you. It is not our interview, it is yours.
Me - that makes no sense. Interviews are a two way street. I'd very much like to know the optimal answer to this.
Interviewer - okay
*copies down the answer from geeksforgeeks*
This is good
Me - *at first I thought this was a prank or something. *
I just mentioned this answer here.
Then I spent the next 10 minutes providing a BETTER solution.
May I know how yours is better?
Interviewer - this solution has 2-3 loops. Yours has a function calling itself.
Me - that's called divide and conquer using recursion mf!
Anyways let's take an example and do a dry run.
Interviewer - okay
*we do dry run*
Interviewer - oh yes. Yours ran faster. But it will run fast only sometimes.
Me - yes. Each time the algorithm rolls a dice to decide if it should run fast or slow. You have one goddamn awesome weed dealer man.
I got to go. Thank you for meeting me.14 -
My birthday is coming up on the 13th so I'll be 17 soon, but it's a shame. I like being 16...
Anyway... I'm going to spend the entire day working on my python script because I know no one will come.
For 5-6 years no one came to my birthday even though they said they would.
It's fine. I stopped caring, besides, I get to spend the day with variables and loops! It'll be a fun day, not to mention I'll be home alone so no one will bother me.
Useless but interesting fact: I got lucky. I was born ONE MINUTE before Valentine's day. At 11:59 I would be so upset if I was born on the 14th.77 -
GUYS WE HAVE BEEN WRITING FOR LOOPS IN JAVA WRONG THE WHOLE TIME. Here is how it should be done correctly...
int i = 0;
for(;(i<10) ? true : false;)
{
i++;
System.out.println(i);
}
Jokes aside though does anyone have any more horrid ways to write this?20 -
Going to forums asking for help as to why my nested for loop wasn't working correctly after the first loop only to realise I was using the variable i for both loops...
Felt like an absolute twat4 -
Interesting thing I did yesterday:
This is a program which loops over every word in the wamerican word database and checks if the username is available on the Mojang servers, thus, this is a Minecraft OG username finder, and it works beautifully.
I'm checking 72,000 words, the only thing is I can only check one per second, so the entire process takes about 20 hours. Any usernames which are available are sent into a text file for later viewing, and it remembers which word it looked at last if you can't have your computer on for 20 hours straight.
Very happy! Found quite a few good names so far!14 -
So there is this girl who joined the company as a trainee.
The company developed a 1 year project to train 25 trainees and she joined saying that she already had some experience making websites. (remember this)
They started in the beginning of January and stayed for about 3 months just studying the platform (Salesforce) and receiving some classes from Senior Devs, on subjects like OOP basics, loops, conditions and features of the platform.
After this time they joined the teams, 2 joined my team, a guy with 32 years that worked 10 years in a bank and wanted to go for a IT job and the girl of 22.
We gave her a really small task, just to make a code to copy info from one field to the other on a list of objects.
After 3 days of saying she was working on it we asked her to show us the code, she had written the "code" directly in the class, VS Code was going crazy with errors. When we asked her "But where is the method?", she answered "What is a method?"
After it we had other experiences trying to teach her some things. The team was formed by me (mid level dev), another mid level dev, a senior and a architect (who was self taught and one of the best teachers I've ever seen).
We tried for about 3 months to teach her how to do basic stuff, like a for loop, and every time we learned that she was missing some "foundations" of this basic stuff, so we would come back and explain the foundation, and a couple times she needed to use this knowledge like a week later and didn't remember shit.
So after this the team talked with our leader that we wanted to let her go and focus on the other guy who was going really well and some other junior devs who had joined the team.
But the HR found out that she had sued her last company, we don't know the reason, but HR guys were afraid of firing her without a careful firing process.
So now we're stuck with her in the team, and everything we ask her to do need to be remade, not because the code is bad, but because it NEVER works
And after all this I still ask myself, how did she finish college? Every person that i know that studied CS or CS like courses had a lot of OOP or at least knew what a class and a method were supposed to be.29 -
The exact moment when I understood what programming actually was.
I was getting hard times at my 3rd college grade, trying to implement the recursive sudoku solver in python. Teacher spent a lot of time trying to explain me things like referential transparency, recursion and returning the new value instead of modifying the old one and everything related. I just couldn't get it.
I was one of the least productive students, i couldn't even understand merge sort.
I was struggling with for loops and indexes, and then suddenly something clicked in my head, like someone flipped a switch, and i understood everything i was explained, all at once. It was like enlightenment, like pure magic.
I had sudoku solver implemented by the end of the lecture. Linked list, hash map, sets, social graphs, i got all of these implemented later, it wasn't a problem anymore. I later got an A for my diploma.
Thank you @dementiy, you were the reason for my career to blast off.7 -
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 -
Worst experience with cs profs? Oh boy....
Databases lab: "You'll need to work of this snippet, if your IDE tells you it's deprecated you don't need to care about it"
If you want to imagine the quality of the code base we were expected to work upon just think about that attached xkcd comic, basically an undecipherable black box.
The instructions where at the same time micro managing everything (he gave us frickin variable names to use, and no good ones, no the database connection had to be called datbc, yeah very descriptive) and yet so obfuscated that I'm not completely sure he didn't resurrect Kant himself to ghostwrite for him.
He also didn't like us to use any Java feature that was to 'modern', for example for each loops since "they offer no benefit over normal for loops".
Further, everything we wrote had to be documented with a relationship diagram and a uml. So far no problem if he hadn't invented his own flavor of both (which can be read about in his book).
Oh, and he almost failed me because I used a lambda expression in his 'code on paper' exam and this "arrows are a C command" I "must have been confused"... which is glorious coming from the guy who can't get operators and commands straight.1 -
Let the student use their own laptops. Even buy them one instead of having computers on site that no one uses for coding but only for some multiple choice tests and to browse Facebook.
Teach them 10 finger typing. (Don't be too strict and allow for personal preferences.)
Teach them text navigation and editing shortcuts. They should be able to scroll per page, jump to the beginning or end of the line or jump word by word. (I am not talking vi bindings or emacs magic.) And no, key repeat is an antifeature.
Teach them VCS before their first group assignment. Let's be honest, VCS means git nowadays. Yet teach them git != GitHub.
Teach git through the command line. They are allowed to use a gui once they aren't afraid to resolve a merge conflict or to rebase their feature branch against master. Just committing and pushing is not enough.
Teach them test-driven development ASAP. You can even give them assignments with a codebase of failing tests and their job is to make them pass in the beginning. Later require them to write tests themselves.
Don't teach the language, teach concepts. (No, if else and for loops aren't concepts you god-damn amateur! That's just syntax!)
When teaching object oriented programming, I'd smack you if do inane examples with vehicles, cars, bikes and a Mercedes Benz. Or animal, cat and dog for that matter. (I came from a self-taught imperative background. Those examples obfuscate more than they help.) Also, inheritance is overrated in oop teachings.
Functional programming concepts should be taught earlier as its concepts of avoiding side effects and pure functions can benefit even oop code bases. (Also great way to introduce testing, as pure functions take certain inputs and produce one output.)
Focus on one language in the beginning, it need not be Java, but don't confuse students with Java, Python and Ruby in their first year. (Bonus point if the language supports both oop and functional programming.)
And for the love of gawd: let them have a strictly typed language. Why would you teach with JavaScript!?
Use industry standards. Notepad, atom and eclipse might be open source and free; yet JetBrains community editions still best them.
For grades, don't your dare demand for them to write code on paper. (Pseudocode is fine.)
Don't let your students play compiler in their heads. It's not their job to know exactly what exception will be thrown by your contrived example. That's the compilers job to complain about. Rather teach them how to find solutions to these errors.
Teach them advanced google searches.
Teach them how to write a issue for a library on GitHub and similar sites.
Teach them how to ask a good stackoverflow question :>6 -
TL;DR :
"when i die i want my group project members to lower me into my grave so they can let me down one last time"
STORY TIME
Last year in College, I had two simultaneous projects. Both were semester long projects. One was for a database class an another was for a software engineering class.
As you can guess, the focus of the projects was very different. Databases we made some desktop networked chat application with a user login system and what not in Java. SE we made an app store with an approval system and admin panels and ratings and reviews and all that jazz in Meteor.js.
The DB project we had 4 total people and one of them was someone we'll call Frank. Frank was also in my SE project group. Frank disappeared for several weeks. Not in class, didn't contact us, and at one point the professors didn't know much either. As soon as we noticed it would be an issue, we talked to the professors. Just keeping them in the loop will save you a lot of trouble down the road. I'm assuming there was some medical or family emergency because the professors were very understanding with him once he started coming back to class and they had a chance to talk.
Lesson 1: If you have that guy that doesn't show up or communicate, don't be a jerk to them and communicate with your professor. Also, don't stop trying to contact the rogue partner. Maybe they'll come around sometime.
It sucked to lose 25% of our team for a project, but Frank appreciated that we didn't totally ignore him and throw him under the bus to the point that the last day of class he came up to me and said, "hey, open your book bag and bring it next to mine." He then threw a LARGE bottle of booze in there as a thank you.
Lesson 2: Treat humans as humans. Things go wrong and understanding that will get you a lot farther with people than trying to make them feel terrible about something that may have been out of their control.
Our DB project went really well. We got an A, we demoed, it worked, it was cool. The biggest problem is I was the only person that had taken a networking class so I ended up doing a large portion of the work. I wish I had taken other people's skills into account when we were deciding on a project. Especially because the only requirement was that it needed to have a minimum of 5 tables and we had to use some SQL language (aka, we couldn't use no-SQL).
The SE project had Frank and a music major who wanted to minor in CS (and then 3 other regular CS students aside from me). This assignment was make an app store using any technology you want. But, you had to use agile sprints. So we had weekly meetings with the "customer" (the TA), who would change requirements on us to keep us on our toes and tell us what they wanted done as a priority for the next meeting. Seriously, just like real life. It was so much fun trying to stay ahead of that.
So we met up and tried to decided what to use. One kid said Java because we all had it for school. The big issue is trying to make a Java web app is a pain in the ass. Seriously, there are so many better things to use. Other teams decided to use Django because they all wanted to learn Python. I suggested why not use something with a nice package system to minimize duplicating work that had already been done and tested by someone. Kid 1 didn't like that because he said in the real world you have to make your own software and not use packages. Little did he know that I had worked in SE for a few years already and knew damn well that every good project has code from somewhere else that has already solved a problem you're facing. We went with Java the first week. It failed miserably. Nobody could get the server set up on their computers. Using VCS with it required you to keep the repo outside of the where you wrote code and copy and paste changes in there. It was just a huge flop so everyone else voted to change.
Lesson 3: Be flexible. Be open to learning new things. Don't be afraid to try something new. It'll make you a better developer in the long run.
So we ended up using Meteor. Why? We all figured we could pick up javascript super easy.Two of us already knew it. And the real time thing would make for some cool effects when an app got a approved or a comment was made. We got to work and the one kid was still pissed. I just checked the repo and the only thing he committed was fixing the spelling of on word in the readme.
We sat down one day and worked for 4 straight hours. We finished the whole project in that time. While other teams were figuring out how to layout their homepage, we had a working user system and admin page and everything. Our TA was trying to throw us for loops by asking for crazy things and we still came through. We had tests that ran along side the application as you used it. It was friggin cool.
Lesson 4: If possible, pick the right tool for the job. Not the tool you know. Everything in CS has a purpose. If you use it for its purpose, you will save days off of a project.1 -
WASM was a mistake. I just wanted to learn C++ and have fast code on the web. Everyone praised it. No one mentioned that it would double or quadruple my development time. That it would cause me to curse repeatedly at the screen until I wanted to harm myself.
The problem was never C++, which was a respectable if long-winded language. No no no. The problem was the lack of support for 'objects' or 'arrays' as parameters or return types. Anything of any complexity lives on one giant Float32Array which must surely bring a look of disgust from every programmer on this muddy rock. That is, one single array variable that you re-use for EVERYTHING.
Have a color? Throw it on the array. 10 floats in an object? Push it on the array - and split off the two bools via dependency injection (why do I have 3-4 line function parameter lists?!). Have an image with 1,000,000 floats? Drop it in the array. Want to return an array? Provide a malloc ptr into the code and write to it, then read from that location in JS after running the function, modifying the array as a side effect.
My- hahaha, my web worker has two images it's working with, calculations for all the planets, sun and moon in the solar system, and bunch of other calculations I wanted offloaded from the main thread... they all live in ONE GIANT ARRAY. LMFAO.If I want to find an element? I have to know exactly where to look or else, good luck finding it among the millions of numbers on that thing.
And of course, if you work with these, you put them in loops. Then you can have the joys of off-by-one errors that not only result in bad results in the returned array, but inexplicable errors in which code you haven't even touched suddenly has bad values. I've had entire functions suddenly explode with random errors because I accidentally overwrote the wrong section of that float array. Not like, the variable the function was using was wrong. No. WASM acted like the function didn't even exist and it didn't know why. Because, somehow, the function ALSO lived on that Float32Array.
And because you're using WASM to be fast, you're typically trying to overwrite things that do O(N) operations or more. NO ONE is going to use this return a + b. One off functions just aren't worth programming in WASM. Worst of all, debugging this is often a matter of writing print and console.log statements everywhere, to try and 'eat' the whole array at once to find out what portion got corrupted or is broke. Or comment out your code line by line to see what in forsaken 9 circles of coding hell caused your problem. It's like debugging blind in a strange and overgrown forest of code that you don't even recognize because most of it is there to satisfy the needs of WASM.
And because it takes so long to debug, it takes a massively long time to create things, and by the time you're done, the dependent package you're building for has 'moved on' and find you suddenly need to update a bunch of crap when you're not even finished. All of this, purely because of a horribly designed technology.
And do they have sympathy for you for forcing you to update all this stuff? No. They don't owe you sympathy, and god forbid they give you any. You are a developer and so it is your duty to suffer - for some kind of karma.
I wanted to love WASM, but screw that thing, it's horrible errors and most of all, the WASM heap32.7 -
So this fucktard decided to write the most inefficient way to collect thousands of records.
The system I am working on allows users to book facilities. There is one feature where an admin can generate reports on the bookings made between any two dates. A report for bookings made between January and April generates 7878 records.
So this shithead, after making a call to the server and receiving 7878 records decides to put it through 4 fucking foreach loops (this takes around 44.94 seconds).
After doing that, he passes it to the controller to go through ANOTHER foreach loop to convert those records into a JSON string, using..string..manipulation. (this takes bloody 1 minute and 30 seconds).
Now, my dear, dear supervisor is asking me to fix this saying that there must be a typo somewhere. Typo my arse. This system has been up for more than a year. What have they been doing all this time??? Bloody hell. Fucking idiots everywhere. I now have to refactor
..fucking refactor.2 -
So today I wrote CSS using for loops and if statements in scss.
You could say I was programming in style... -
So a few years ago when I was getting started with programming, I had this idea to create "Steam but for mods". And just think about it - 13 and a half years old me which knew C# not even for a half of a year wanted to create a fairly sizable project. I wasn't even sure how while () or foreach () loops worked back in the day.
So I've made a post on a polish F1 Challenge '99-'02 game forum about this thing. The guy reached out to me and said: "Hey, I could help you out". This is where all started.
I've got in touch with him via Gadu-Gadu (a polish equivalent of ICQ). So I've sent him the source code... Packed in .ZIP file... By Zippyshare… And just think how BAD this code was. Like for instance, to save games data which you were adding they were stored in text files. The game name was stored in one .txt file. The directory in another. The .exe file name in yet another and so on. Back then I thought that was perfectly fine! I couldn't even make the game to start via this program, because I didn't know about Working Directory).
The guy didn't reply to me anymore.
Of course back then it wasn't embarrassing to me at all, but now when I think about it... -
It all started in the year 2013.
I was 13 years old back then. I was a fan of Minecraft and so I learned how to setup a bukkit server and ran it. Installing plugins was fun, because I could be a "hacker" and change the configs.
After a while, (~2014), when I was in the 9th grade of elementary school, I saw Unity. A free game engine. Of course, me being a 14 year old I was intrigued and so I downloaded it, made an account and a new project. I had absolutely ZERO knowledge of programming. Didn't even know what languages existed, so i resorted to presets and poorly put together characters + weapons.
After some time fiddling around with Unity, I've gotten a hang of the basics (not programming related).
My actual programming started when I started High School (year 2016). It's a computer engineering school and for the first part of the year, I've learned from my teacher in C# (Console.WriteLine/ReadLine/Loops/Variables). At the second semester I started to gain interest and motivation to program at home. I did the programs we made in school (random number guessing game) but better. Improved it, added colors.
After that, I started developing in Unity - Actually learning something and having the ability to develop something all by myself. It keeps driving me on. In the second year (the year I'm visiting right now) I tought myself HTML, CSS, JavaScript, jQuery, PHP. I'm very happy and also can't wait to discover and learn new things in these languages!
My latest project was an Android application for my father that he asked for (it calculated the price of the 3D print he would make).
// Sorry for the long post!
EDIT: Forgot to add a fun little detail. All my classmates make fun of me because I program so much !
Also: Tabs > Spaces8 -
After a long time just reading your posts, here's my first post:
Just for clarification: I'm studying electrical engineering in Germany. During your time at university, you have to work half a year as a intern to get some practical experience. So I'm in a position where I mainly have to say "yes" to work that is given to me. Also I'm working with a lot of PLC programmers, so I'm nearly the only one who programs non-PLC stuff at the department.
But now it's time for my rant (and also my most satisfying optimization ever). In the job interview for the internship, my task at the company was described as C# programmer. I only programmed C and Python before, but C# looked interesting and so I learned C# from ground up in the summer before the internship. I quite liked it and I was really happy on my first day of work. Then I was greeted with this message: "I know you are hired as C# programmer, but could you please look into this VBA program, it takes 55 seconds until it finishes its task and that's to slow". So I (midly angry because I had to do VBA and not C#) started the program and it was really horribly slow (it just created a table with certain contents from a very big imported symbol file). I then opened up the source code and immideately saw bad code. The guy who wrote it basically just clicked on the macro recording button and used the recorded mouse clicks in the source code. The code was like: Click on cell A1 -> copy cell A1 -> move to sheet XY -> click on cell A2 -> paste copied stuff and so on... I never 'programmed' in VBA before, so I used my knowledge of 'real' programming languages to do this task. After using some arrays and for-loops, which did not iterate over all the 1.000.000 unused cells after the last used one, the program took only 3 seconds after it finished the new table! Everybody was quite impressed, which led to much more VBA optimization... That was clearly not my goal haha :)9 -
A few years back I worked at a company as their front-end web developer with one other guy who was their "back-end" developer. PHP and MySQL specifically. He was eventually fired and I took over both development roles. When I got around to seeing his source code and the way he had created the databases, I immediately saw why he was fired. This guy did not understand the concept of loops. Instead of separating out tags and categories with a split / loop, he set up database tables for EVERY. SINGLE. TAG.
i.e. tag_1, tag_2, tag_3, etc. And then to top ot off, instead of looping through the tables, he set up huge conditioks for EVER.LY. SINGLE. TAG.
i.e. if(tag_1) else(tag_2) else(tag_3) etc.
That fucking guy...6 -
I am going to create a new language called Yoda that is identical to Java but it has no exception handling and no for loops.6
-
Soooo I think I have finally come to the point that I may have to create a YouTube channel, to teach software engineering from the ground up... and teach it the way the universities and everyone else should be teaching it, so that they have a solid foundation.... throwing hello world, and loops and variables at folks out of the box without any of the environment context or low level embedded register, even logic gate understanding
That lack of understanding is why, soooo many college students and younger folks, are actually pretty shitty engineers. Everything is high level languages and theoretical concepts to them. Nothing practical, that’s why there’s sooo many python and java developers that can’t for the life of them understand memory management, low level hardware interfacing etc, because the colleges don’t teach it the way it use to be taught.
I seriously fear 30 years from now or sooner when there are few embedded engineers only left till retirement, as without those folks the whole pyramid of electronics falls to pieces.
Java, C#, python, all that shit don’t run on the bare metal... there’s this magical layer of C, and assembler that does all the work just so folks can abstract their thoughts.
Either 1 of two situations will happen.. price of electronics will rise because the embedded guys are few and far between therefore salaries skyrocket... OR everything starts running shit like java on the metal, where there are a over abundance of developers, their salaries will be low because there are soo many but the processing power, space, and energy needed to run java natively causes electronics cost to increase
but regardless 30 years from now if those script kiddies are building everything I fear it cuz there’s gonna be memory leaks, and overflow issues everywhere.. shit be blowing up more than 4th of July.. lol
Soooo in effort to prevent that and keep the embedded engineers up, or atleast properly educate the script kiddies, I’m gonna make that YouTube channel.. 1 maybe 2 videos a week, 1-2 hours sessions each.. starting at the fucken ground and building up.39 -
Having to review an offshore C++ codebase made in Romania that the company I worked for they bought to control a wifi module on a complex RF mobile tech device that I can't legally give more details on.
If I could legally post this masterpiece, or should I say masterpiece-of-shit, all of you C++ dev would instantly get AIDS and all the existing types of cancer upon browsing it for 2 minutes.
It's laughably bad and unmaintainable. One of my colleague called it "the perfect example of human obfuscation" and it fits perfectly.
Think of a 100k LoC main function with nested loops and ifs with random sleep values, 1000 values of hardcoded 32 bits arrays declared globally in the first 10k lines for unknown reasons. Comments in Romanian mixed with english. Somehow, this shit works by some miracle.
The worst intern you can think of, while being piss drunk, could do better and it's no joke.5 -
This F***ing government college faculty crossed my complete answer of a F***ing bubble sort in 3rd year of Mathematics & Computing by saying and I quote, " Why is this i loop inside of j loop?" and after getting again on my feet after listening and understanding this absurd statement, I tried to explain to which he asked ne to show any book where it is written like this.
To i loop and j loop he meant the variable name in for loops, 🤬🤬🤬🤬
these f***ing reserved government professors in elite institutions like IITs15 -
How can you defend your ugly unstructured mess of a PR, when every spit-droplet infused spray of words from your mouth is full of syntax errors?
How can you call yourself a developer without being aware of basic logic? I ain't got no tolerance for double negations, not not true is just true, you doltish twat.
WHEN YOU TALK THERE IS A CLOUD OF RED SQUIGGLY LINES IN THE AIR FLOATING AROUND YOUR HEAD.
I mean what the fuck is up with eggcetera? Why are you just swapping out letters? What has the little ligature t in & ever done to you? Do I have to fucking replace & with 🥚 so your word diarrhea makes sense again?
NO. JUST PLEASE... STOP TALKING. YOU'RE RAPING LANGUAGE, AND IT WAS ALREADY BEATEN DEAD.
Unlike me, you have a degree in computer science... but how, how the fuck did you pass? How did neither your tongue nor code get stuck in a linter?
AND YOUR RESPONSE IS STILL: "YOU DON'T NEED TO LEARN WHEN YOU'RE FINISHED WITH SCHOOL" ... "WHAT DOES IT MATTER, IT WORKS, RIGHT?"
NO, IT'S NOT RIGHT.
You're lucky I love refactoring.
I'll start with a medical grade steel scalpel and a long sharp hook. Maybe I can clean up this brain a little. See if the tests turn green if I cut some of this gray matter away... plenty of unreachable statements, so many unnecessary loops...
Might have to start from scratch.8 -
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
-
Loop counter conditions.
10 loops for example in this scenario:
i<=9
OR
i<10
Was arguing with a co-worker all week over this 😂11 -
FUCK LINUX
now that I have your attention, and you’re probably angry, too, please, even if you don’t read this rant, never use code.org again. now, onto the rant…
god dammit, code.org sucks. I mean, anyone who created it or associates with it should, well, be considered a terrorist. they’re bombing students futures in computer science with false, useless, bullshit information. not to mention, their sponsors like bill gates, mark zuckerburg, and other rich asses, talk in a video about some boring ass shit that is hard to understand for anyone who doesn’t program, and not to mention, they use a fucking five dollar microphone. ear rape. even if you look at a textual version of it, then read the information on it, it’s practically useless because it's so terribly explained, and also useless. ironically enough, they focus on their animations more than their actual explinations, or their students for that matter. the fact that we had to encode a picture in binary, made me about 50% dumber, give or take a 0 or 1. then, we had to do it in hex, which wasn’t really much better, although more realistic I supposed. what's really the most depressing thing about this class is its application in the real world. I've learnt nothing whatsoever that will help me in the real world, or in computer science. I suppose there's two things that may be useful (that I already knew): hex, and that TCP doesn't lose packets. that's it. those two things. five seconds worth of knowledge from the first quarter of the year. the ideas just make me want to throw up. teaching the main ideas of computer science without actually teaching it? one of the teachers (probably a good one) enrolled her students in an online programming course just so they could understand, because the explanations are just so terrible. this is the only [high school] computer science course offered by code.org, and I signed up because it's an AP computer science class (tried to get into AP Java, the day I was supposed to take the test to get into an upper level class, I was told it didn't count as a tech credit). seriously, fuck code.org. it makes you dumber. their 'app lab' environment is pointless, just like everything else. the app lab is basically where you have a set of commands and have to make a dog bark() or a storm trooper miss() [and that's hell when they haven't introduced while loops yet]. the app lab is literally code.org going out of their way to make everything that their students are learning pointless in the real world. seriously, why can't we just use a <canvas> like an ACTUAL PROGRAMMER would do if they were to make a browser game, not use an app engine so slow it would be faster to update windows and android studio each time I run an 'app' in their 'environment'. their excuse is that the skills "transfer over" to the real world. BITCH! IF I DIDN'T KNOW JAVA, AND I WANTED TO MAKE A GAME IN JAVA, I'M NOT GOING TO LEARN PYTHON, THEN "TRANSFER" THE SKILLS I LEARNT, I'M GOING TO LEARN FUCKING JAVA. AND THAT GOES FOR EVER OTHER LANGUAGE, PROJECT, ETC.
I'm begging you code.org, stop, get help.9 -
So Friday afternoon is always deployment time at my company. No sure why, but it always fucks us.
Anyways, last Friday, we had this lovely deployment that was missing a key piece. On Wednesday I had tested it, sent out an email(with screenshots) saying "yo, whoever wrote this, this feature is all fucked up." Management said they would handle it.
The response email. 1(out of 20) defects I sent in were not a defect but my error. No further response, so I assume the rest were being looked into.
In a call with bossman, my manager states that the feature is fixed, so I go to check it quickly before the deployment(on Friday).
THERE IS NO FUCKING CODE CHECK-IN. THE DEV BASTARD JUST SAID THAT MY USECASE WAS WRONG, SO MY ENTIRE EMAIL WAS INVALID.
I am currently working on Saturday, as the other guy refuses to see the problem! It is blatant, and I got 3 other people to reproduce to prove I am not crazy!
On top of that, the code makes me want to vomit! I write bad code. This is like a 3rd grader who doesn't know code copy-pasted from stack overflow! There is literally if(A) then B else if(!A) then B! And a for loop which does some shit, and the line after it closes has a second for loop that iterates over the same unaltered set! Why?! On top of that, the second for loop loops until "i" is equal to length-1, then does something! Why loop???
The smartest part of him ran down his Mama's leg when it saw the DNA dad was contributing!
Don't know who is the culprit, and if you happen to see this, I am pissed. I am working on Saturday because you can't check your code or you lied on your resume to get this job, as you are not qualified! Fuck you!15 -
This is one from i was an intern
Me: writes some logic, using
for(String s : something)
Senior: holds a 30 minute talk on why short loops are bad and we should always use the traditional one
Me: ok retard
Me: havent used traditional loops ever since then8 -
EEEEEEEEEEEE Some fAcking languages!! Actually barfs while using this trashdump!
The gist: new job, position required adv C# knowledge (like f yea, one of my fav languages), we are working with RPA (using software robots to automate stuff), and we are using some new robot still in beta phase, but robot has its own prog lang.
The problem:
- this language is kind of like ASM (i think so, I'm venting here, it's ASM OK), with syntax that burns your eyes
- no function return values, but I can live with that, at least they have some sort of functions
- emojies for identifiers (like php's $var, but they only aim for shitty features so you use a heart.. ♥var)
- only jump and jumpif for control flow
- no foopin variable scopes at all (if you run multiple scripts at the same time they even share variables *pukes*)
- weird alt characters everywhere. define strings with regular quotes? nah let's be [some mental illness] and use prime quotes (‴ U+2034), and like ⟦ ⟧ for array indexing, but only sometimes!
- super slow interpreter, ex a regular loop to count to 10 (using jumps because yea no actual loops) takes more than 20 seconds to execute, approx 700ms to run 1 code row.
- it supports c# snippets (defined with these stupid characters: ⊂ ⊃) and I guess that's the only c# I get to write with this job :^}
- on top of that, outdated documentation, because yea it's beta, but so crappin tedious with this trail n error to check how every feature works
The question: why in the living fartfaces yolk would you even make a new language when it's so easy nowadays to embed compilers!?! the robot is apparently made in c#, so it should be no funcking problem at all to add a damn lua compiler or something. having a tcp api would even be easier got dammit!!! And what in the world made our company think this robot was a plausible choice?! Did they do a full fubbing analysis of the different software robots out there and accidentally sorted by ease of use in reverse order?? 'cause that's the only explanation i can imagine
Frillin stupid shitpile of a language!!! AAAAAHHH
see the attached screenshot of production code we've developed at the company for reference.
Disclaimer: I do not stand responsible for any eventual headaches or gauged eyes caused by the named image.
(for those interested, the robot is G1ANT.Robot, https://beta.g1ant.com/)4 -
[long]
When searching for internship via school I found this small startup with this cute project of building a teaching tool for programming. There were back then 2 programmers: the founder and the co-founder.
Then like 1 week before the internship started, the co-founder had a burnout and had to get off the project, while the company was so low on budget the founder, aka my new b0ss, had to work separate jobs to keep the company alive. (quite metal tbh)
It's funny because I'm a junior developer, 100%. I've been coding as a hobby for around 8 years now but I've never worked in a big company before. (No exception to this workplace either)
First project I get: rewrite the compiler. The Python compiler.
"But wait, why not just embed a real compiler from the first case?"
-nanananana it's never simple, as you probably know from your own projects.
The new compiler, as compared to existing embedded compiler solutions out there, needed these prime features:
- Walk through the code (debugger style), but programmatically.
- Show custom exceptions (ex: "A colon is needed at the end of an if-statement" instead of "Syntax error line 3")
- Have a "Did-you-mean this variable?" error for usage of unassigned variables.
- Be able to be embedded in Unity's WebGL build target
All for the use case of being a friendly compiler.
The last dash in the list is actually the biggest bottleneck which excluded all existing open-source projects (i could find). Compliant with WebAssembly I can't use threads among other things, IL2CPP has lots of restrictions, Unity has some as well...
Oh and it should of course be built using test-driven development.
"Good luck!" - said the founder, first day of work as she then traveled to USA for **3 weeks**, leaving me solo with the to-be-made codebase and humongous list of requirements.
---
I just finished the 6th week of internship, boss has been at "HQ" for 3 weeks now, and I just hit the biggest milestone yet for this project.
Yes I've been succeeding! This project has gone so well, and I'm surprising myself how much code I've been pumping out during these weeks.
I'm up now at almost 40'000 lines of source and 30'000 lines of code. ‼
( Biggest project I've ever worked on previously was at 8'000 lines of code )
The milestone (that I finished today) was for loops! As been trying to showcase in the GIF.
---
It's such a giant project and I can honestly say I've done some good work here. Self-five. Over-performing is a thing.
The things that makes me shiver though is that most that use this application will never know the intricates of it's insides, and the brain work put into it.
The project is probably over-engineered. A lot. Having a home-made compiler gives us a lot of flexibility for our product as we're trying to make more of a "pedagogic IDE". But no matter that I reinvented the wheel for the 105Gth time, it's still the most fun I've had with a project to date.
---
Also btw if anyone wants to see source code, please give me good reasons as I'm actively trying to convince my boss to make the compiler open-source.
Cheers!4 -
Another project with legacy code got just dusted off at work. Shits fucked beyond recognition! We got:
- Rando variable names that mean nothing
- Timers running with a cycle time of 2.5ms if you start them with the multiplier 1.
- An Interrupt routine thats 300 lines long.
- Another interrupt thats starting an ADC conversion and waiting for it to complete before returning.
- For loops that start with one and subtract one from the iterator in the loop
- Every value that would normally be expressed as a regular number is written down in Hex. Eg: if(val==0x05)
- State machine built without writing down which state is which. Its just a number. (In hex obviously!)
- All running on a Microcontroller you cant debug on.
- Using a compiler no one has ever heard of before.
- Weird ass Port manipulations
- 15 different .hex and .elf files with no clue whats in them.
- No version control
- We tried explaining the code to a monkey and it hanged itself.10 -
Im learning python(it's my first real programming language) and I finally understood for loops.... yeeeey6
-
Ok, so teacher (which should be something like a professional dev or whatever) assigned us a homework for a Christmas (I dont care, I can complete his assignments in like 10 minutes max). We have to do some simple shit in C++, just some loops and input + output. Nothing hard. He challenged me to write it as short as possible, so I did. My classmates have codes around 60 to 70 lines long (after propper formating). I made it 20 lines long using some pointer magic and stuff like that. I tried my code, it ran fucking perfectly, so I sent that to him. He replied that the code does not work. I tried to recompile it and it ran perfectly. Again, it does not work. Afeter 13 fucking emails he fucking finally sent me the error message. Some fucntion was not found (missing some library but literally everywhere else it works without it...). Thats strange, because it run perfectly on my Fedora with CLion, so I switch to Windows and try to run same code in Visual Studio (which we are using in school btw). Works perfectly. So I start arguing with the teacher more and more. I tried around 10 online compilers. Works fuckng everywhere. Teacher is pissed, me too. So I rewrote my whole code, added comments and shit, reinvented wheel literally everywhere. Now I have C99 standardised code over 370 lines long that run even on a fucking arduino after changing input output methods so it can work with it. It (suprisingly runs) on his PC too.
After a bit more arguing, he said that he is using CodeBlocks from fucking 2015. Wow. Just fucking wow. Even our school has some old Visual Studio (2007 I guess) and it worked there.6 -
!rant
... so... maybe not that much of a thing, but i think it is:
a gal (27 years old) i started teaching programming two weeks ago, who had literally no previous experience with programming, algoritmization nor c#...
... just now, after 3 lessons of 6 hours altogether, and after yesterday when i explained to her what arrays are and reminded her what loops do...
... invented bubble sort. on her own. no googling. on paper. no "trial and error code typing and running".
i'm actually pretty proud of her :)
... putting the algo concept into actual code will still be a bit of a struggle, but yeah, hell, can't help thinking that she's actually pretty smart :)
(p. s. fist lesson was i drew uml of a fibonacci algo and forced her to understand what it does, second lesson was i explained the minimum required c# syntax for her to be able to implement it and forced her to write it (with as little help as i could), third lesson was the concept of array and "okay, now here's array of numbers, make a function that will sort them")
looking forward to what will happen when i explain recursion and nudge her towards quicksort O:-)8 -
Damn, my boss added me to a "almost" complete protect with a bunch of spaghetti code in a language that I don't know more than the syntax of for loops and declaration of variables (swift) ..... I'm really fucked6
-
Been lurking for a while, figured I would give a rant a go now that I have graduated college!
So here we go, this was the only technical question asked on my second co-op interview. Ended up getting it.
Interviewer: "Do you know any loops?"
Me: "Yes....?"
Interviewer: "Which ones, can you name them?"3 -
Worst part of being a dev?
For me it's putting myself into infinite loops wrestling with my own self doubt. Is this really how I want to solve this problem? Could this code be cleaner? Surely there's a better way to do this? Am I adding unnecessary complexity? Is this going to come back and bite me in x months? And so on...
In fact, most days I just feel like an imposter.4 -
When you look back at Code from your 2nd year of university...
Using while loops as if statements to check for vowels... *shudders in fear*5 -
Everyday I change all of my colleague's i++ in ++i in for loops, and he changes my ++i in i++. This goes on forever...11
-
When I just started my software engineering course in college, we had a group project every semester where we would use the skills learned during that semester to make a certain product or program.
For the semester in this story, we were tasked with making a reservation system for a campsite. Visitors would be able to select a free spot, and reserve it.
The spot reservation screen would be a map of the campsite, and visitors would click on the desired site on the map to select it. Sites were neatly laid out in a perfect grid.
My task in the group for this project was my favourite position: yelling at people for poor code quality. And boy did I get to yell.
Any semi competent programmer would probably come up with two simple loops to generate all the buttons (something like 144 buttons), one loop to fill a row, and then another to go down the rows until all were filled. Some other similar functionality in the program was solved this way.
However, my classmate that was responsible for this part of the code wasn't a big fan of concise programming. So instead, he wrote 144 functions aptly called `generateFirstButton()` all the way through `generateHundredFourtyFourthButton()`.
*what*
I called him out on his horribly smelly code, and his retort was "But it works, and now you don't have to think about complicated loop logic".
I rewrote the class and reduced it from ~1150 lines to about 20 lines.
He didn't pass the exam.2 -
I used to prefer, think, and code in loops rather recursion.
Now though somehow it's the other way around...
And I have to assure myself why a piece of code I wrote won't cause a Stack overflow... and that if I really had to I could convert it back to a loop.
Haven't done it though for a awhile tho...7 -
Today's project was answering the question: "Can I update tables in a Microsoft Word document programmatically?"
(spoiler: YES)
My coworker got the ball rolling by showing that the docx file is just a zip archive with a bunch of XML in it.
The thing I needed to update were a pair of tables. Not knowing anything about Word's XML schema, I investigated things like:
- what tag is the table declared with?
- is the table paginated within the table?
- where is the cell background color specified?
Fortunately this wasn't too cumbersome.
For the data, CSV was the obvious choice. And I quickly confirmed that I could use OpenCSV easily within gradle.
The Word XML segments were far too verbose to put into constants, so I made a series of templates with tokens to use for replacement.
In creating the templates, I had to analyze the word xml to see what changed between cells (thankfully, very little). This then informed the design of the CSV parsing loops to make sure the dynamic stuff got injected properly.
I got my proof of concept working in less than a day. Have some more polishing to do, but I'm pretty happy with the initial results!6 -
I started at a company to develop an "uber" clone. Hired by the company's cto. I was happy initially as i had been unemployed for a while but that's because i didn't see the shitstorm coming. The task was build this using php, well 2 weeks later and db locking issues because mysql only allows 100 connections and the website takes over 200mb per request, i tried using the meteor framework, a lil better but the orphaned process would require me to reboot every 2 days. So enter erlang, built in 3 weeks works amazing problems none here... Well in comes the cto (which came in once a week). Apparently he had been reviewing my code and didn't understand it. He couldn't understand no for loops etc and demanded that it be made understandable to a normal dev. Did normal devs write uber no. Anyhow i spent the next 6 Weeks refactoring trying to make elixir looks like imperative programming, he finally gave up, so now I'm deep committed writing an API, finish in a week cto comes in and "why aren't you using patch" i don't need it, well another day implanting a patch api that will never be used. Ok done. Now we have a meeting with the investors who i worked in the same building with and they want a frontend built. I explained i was a backend dev and they needed a uiux expert. Next week cto comes back with this jquery fire pit and stolen bootstrap theme and take me with implementing it. This time we scrap the api change some of the backend logic and implement rest from the 90s one static page per request. After 3 months working with jquery I'm let go because of finical issues. I told them i was a backend dev but they didn't listen if the cto would've gotten a frontend expert things would be different but what to expect from a cto who's coding legacy is creating WordPress plugins.
Hopefully things will be better soon I'm tired of living on the streets.5 -
Developer 1: Stop changing all my loops into switches!
Developer 2: if you'd learn when to use a switch I wouldn't have to change it for you!
-My 2 devs argument today
#officechat #good2betheboss8 -
Two big moments today:
1. Holy hell, how did I ever get on without a proper debugger? Was debugging some old code by eye (following along and keeping track mentally, of what the variables should be and what each step did). That didn't work because the code isn't intuitive. Tried the print() method, old reliable as it were. Kinda worked but didn't give me enough fine-grain control.
Bit the bullet and installed Wing IDE for python. And bam, it hit me. How did I ever live without step-through, and breakpoints before now?
2. Remember that non-sieve prime generator I wrote a while back? (well maybe some of you do). The one that generated quasi lucas carmichael (QLC) numbers? Well thats what I managed to debug. I figured out why it wasn't working. Last time I released it, I included two core methods, genprimes() and nextPrime(). The first generates a list of primes accurately, up to some n, and only needs a small handful of QLC numbers filtered out after the fact (because the set of primes generated and the set of QLC numbers overlap. Well I think they call it an embedding, as in QLC is included in the series generated by genprimes, but not the converse, but I digress).
nextPrime() was supposed to take any arbitrary n above zero, and accurately return the nearest prime number above the argument. But for some reason when it started, it would return 2,3,5,6...but genprimes() would work fine for some reason.
So genprimes loops over an index, i, and tests it for primality. It begins by entering the loop, and doing "result = gffi(i)".
This calls into something a function that runs four tests on the argument passed to it. I won't go into detail here about what those are because I don't even remember how I came up with them (I'll make a separate post when the code is fully fixed).
If the number fails any of these tests then gffi would just return the value of i that was passed to it, unaltered. Otherwise, if it did pass all of them, it would return i+1.
And once back in genPrimes() we would check if the variable 'result' was greater than the loop index. And if it was, then it was either prime (comparatively plentiful) or a QLC number (comparatively rare)--these two types and no others.
nextPrime() was only taking n, and didn't have this index to compare to, so the prior steps in genprimes were acting as a filter that nextPrime() didn't have, while internally gffi() was returning not only primes, and QLCs, but also plenty of composite numbers.
Now *why* that last step in genPrimes() was filtering out all the composites, idk.
But now that I understand whats going on I can fix it and hypothetically it should be possible to enter a positive n of any size, and without additional primality checks (such as is done with sieves, where you have to check off multiples of n), get the nearest prime numbers. Of course I'm not familiar enough with prime number generation to know if thats an achievement or worthwhile mentioning, so if anyone *is* familiar, and how something like that holds up compared to other linear generators (O(n)?), I'd be interested to hear about it.
I also am working on filtering out the intersection of the sets (QLC numbers), which I'm pretty sure I figured out how to incorporate into the prime generator itself.
I also think it may be possible to generator primes even faster, using the carmichael numbers or related set--or even derive a function that maps one set of upper-and-lower bounds around a semiprime, and map those same bounds to carmichael numbers that act as the upper and lower bound numbers on the factors of a semiprime.
Meanwhile I'm also looking into testing the prime generator on a larger set of numbers (to make sure it doesn't fail at large values of n) and so I'm looking for more computing power if anyone has it on hand, or is willing to test it at sufficiently large bit lengths (512, 1024, etc).
Lastly, the earlier work I posted (linked below), I realized could be applied with ECM to greatly reduce the smallest factor of a large number.
If ECM, being one of the best methods available, only handles 50-60 digit numbers, & your factors are 70+ digits, then being able to transform your semiprime product into another product tree thats non-semiprime, with factors that ARE in range of ECM, and which *does* contain either of the original factors, means products that *were not* formally factorable by ECM, *could* be now.
That wouldn't have been possible though withput enormous help from many others such as hitko who took the time to explain the solution was a form of modular exponentiation, Fast-Nop who contributed on other threads, Voxera who did as well, and support from Scor in particular, and many others.
Thank you all. And more to come.
Links mentioned (because DR wouldn't accept them as they were):
https://pastebin.com/MWechZj912 -
So my dear programming teacher really hates break statements... I mean really really really. He thinks it's better for readability if you don't break from any kinds of loops (not even ifs) well then we came across a switch statement in class. He says "breaks only exist because it's needed in switches" well how about returning from a fcking swith? or goto? then you need no break...
Is there anyone who could explain why I should NEVER use breaks and why it's bad in any piece of code? Why is it better to just use whiles because fors are apparently evil again? Srsly I just wanna ask him to show me some big code bases without breaks...8 -
Why do programmers take so long in the shower?
They read the directions on the shampoo bottle and follow them to the letter:
Lather, rinse, and repeat.
If only shampoo used for-loops in their instructions...
while(hair.isDirty){
hair.wash();
hair.rinse ();
}
while(hair.isDirty() && !shampoo.isEmpty()){
hair.wash();
hair.rinse();
}
Come on man, we should still stop if we run out of shampoo even if the hair isn't 100% clean yet.
while(hair.isDirty() && !shampoo.isEmpty() && tap.waterStillHot()){
hair.wash();
hair.rinse();
}
This could go on forever, I mean the adding of special cases.
try {
while(hair.isDirty() && !shampoo.isEmpty() && tap.waterStillHot()){
hair.wash();
hair.rinse();
}}
catch(sexException) { self.f___(spouse); } // spouse showed in in mid-rinse
catch(deathException) { spouse.arrangeForBurial(self); } // user died while showering
More importantly, you also need to catch a hairNotFoundException in the event that the user is bald. Or more properly, wrap the whole thing in "if(hair != null)". You don't want bald users throwing an exception every time they shower.
-- From a reddit feed a while back. -
In my wallowing experience as a freelancer I've noticed that almost all C/C++ clients are perfectionist. You just can't please them by getting the job done quickly.
I got a libcurl job from one the other day to scrape data from a target website and within an hour it was ready. I notified the client and he was both amazed and confused assuming it would take the whole week.
C++Client: The code works but you need to take your time.
Me: Sorry?
C++Client: Yes, it works but you used "string" instead of "wstring"
Me: 😊 Oh okay... *converts strings to wstring*
C++Client: And also variable names should be more descriptive.
Me: 😏 *int foobar => int very_long_descriptive_foobar_01*
C++Client: And also use "shorts" for page nums it'll save some bytes
Me: 😕 *int => short...*
C++Client: And also use forloops instead of whileloops
Me: ☹️ *whileloops => forloops*
C++Client: And also use -- instead of ++ in loops
Me: 😤 *for(... i++) => for(... i--)*
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
C++Client: And also...
===> Seven "and also" days later <===
Me: *completed 10 Java projects behind the scene*
C++Client: And also use pthread instead of thread
Me: 😧 It's day 7 already!
C++Client: Oh I see, great job. You can compile and send me the archived source.
Me: 🤩
C++Client: And also...
Me: 🏃💨11 -
I remember the days when your only problem is creating an asterisk pyramid with for loops. Unlike now when you are thinking how idiotic a user can get.
Good old days1 -
I FINALLY comprehend list comprehensions.
I can write an unlimited amount of nested loops on a single line and make other less experienced people hate me for fun and profit.
Also learned about map() #I hate it#, zip(which is awesome), and the utility of lambdas (they're okay).
Enumerate is pretty nifty too, only thing I lose is setting the initial value of the iterator index.15 -
I’m going through the book automate the boring stuff and I’m working on the chapter with web scraping right.
Well I wanted to just count all of the comic links that are in the xkcd archive as a small exercise to help me get used to and better learn web scraping.
I go through hell trying to do this but after more than a few hours later I finally have done it I returned every link of ONLY the comics, so it was time to start counting them.
I implemented the counting. The total number as of today is 2279 and it my code counted 2278, and I started to lose it.
So I go through this motherfucker manually to see where my loops count and the count on the tags start to differ. I found it, whoever made it went from 403 to 405. The euphoria I felt for this incredibly small task was incredible. (Still haven’t pieced it together yet)
I found the email of the guy who I assume owns the site and I started writing an email that basically said “hey the count of your comics is off by one and you made me rethink existence trying to figure out why, you skipped number 404-”
I look at the gap between 403 and 405 Then the words “Error 404 Not Found” popped into my head. I proceeded to scream for a second and stopped writing the email and now I’m trying to come to terms with this.
TL:DR the guy who runs xkcd comics trolled me with a simple error 404 joke4 -
I taught an intro to programming class today, brought back memories of highschool...
I remember when I started my first IT class in grade 10, it was a 50/50 split between IT theory amd programming. Choices were java or delphi...I made the uninformed choice to do java (thank goodness) and really enjoyed it. For some reason the logic and OOP concepts really made sense to me and i was well ahead of the class. I was always top 5 for maths/physics/chem and english literature but never enjoyed them for a second. On the other hand programming was something i could do for hours and still enjoy. In my final year we had to do a project, most of my class was still struggling with very simple for loops and jframes. The projects were terrible drag and drop NetBeans UIs that would convert meters to feet.
I remember being upset with the quality and ended up writing an entire client/server chat system with file sharing, voice notes, voice streaming, server admin controls, usernames and passwords (plaintext sql of course 😂), admins/mods/guests etc...
Got 100% and a personal recognition from the headmaster...found out yesterday the staff at the college have actually been using it since the time I left.
I don't know why i typed this whole story, something about teaching the kids where i was myself made me feel warm and fuzzy inside1 -
If this isn't the worst thing.
I was asked to develop a WordPress plugin as an intern developer and I've been on it since last week. I got stuck when i finally had the loops running but couldn't find a way to format the output without overwriting the existing values on each iteration.
For the last one week I've been showing the progress on my code to the CTO and this is how it has been.
Me: Hello. Everything is coming along fine, I have most of the functions running properly, do you mind looking into the algorithm?
CTO: Oh not at all, let's see what you got. Omg great code for an intern. I think you should add a new variable there and maybe clean up that function over there because it's deprecated now and yeah HaHa, Great work.
Me: Thanks xD I'll have it finished latest next week.
CTO: Oh great. I can't wait to see what you'd have by next week so we can install it on our WordPress.
*Next finally week comes and I'm done with the code.
Me: Hello, I'm done with the entire code! Want to take a look? The plugin works just exactly as described.
*CTO takes a look
CTO: Omg?
Me: Omg?
CTO: This is completely bad programming practice, so you are running 4 nested loops that all send queries to our data base and make changes to data. This would have a very drastic effect on the server considering the traffic we get.
Me: But you saw this exact code last week and said it was okay, I only changed some CSS since the last time.
CTO: Omg, we can't accept this, you have to develop it again from the scratch without using those loops and queries.
Me: What? Okay, fine. Any hints?
CTO: Yes.
Me: What?
CTO: Just start. That's the greatest hint I could ever give. And also, always have a plan before you begin.
Me: Yeah, thanks for those. It's the first time I'm hearing them and they would totally be applicable to building this thing.2 -
A rather happy/neutral post this time for a change. Lol
Firstly the good news: I have successfully recovered from the emotional/mental abuse and have been doing really well. My faith in myself has been slowly restored.
Secondly, I have started to pursue my hobbies again and find joy in them. I spend more and more time listening to music and play video games (CS:GO and AoM).
I have started getting more sun and also spend time outside socialising.
I can sense my happiness and joy get restored in my life.
Now on career front, I have started job hunting again as you all know. The interview process for Product Management is absolutely broken and taxing to go through all the loops.
During all my previous job hunts (three times), I was able to nail down at least one offer in a quarter.
This time, I started in October 2021 and still no success. I have much more experience and skill-set this time yet failures.
Fear not. My optimism is back this time. I am aware of where I am going wrong and sometimes I feel the situation is truly out of my control. The two major reasons I forsee are:
1. Relocation: it can take few months for me to relocate to UK/EU and hence, companies are preferring local candidates.
2. My duration with current employer is just 8 months which could be a potential turn off for many HMs. They might think I am a job hopper and maybe one of the reasons why I got so many calls and opportunities at my previous employer (I was stable with them for 7.5 years).
I feel it's just the matter of time for me now where I must hold my horses and keep the momentum without losing hope.
I will win.9 -
I don't like interview coding challenges. At the same time, given the skill level of some developers I've worked with who work for a contracting firm and presumably didn't get a coding test in their intervies...I understand the necessity. Some people are so bad at coding that even the simplest of coding tests can show how bad they are.
I think my favorite is being given a simple task to write code for. And that's it. No "use this specific language feature to do this specific thing". Just a task and that's it.
I got a really simple coding test once. I had to reverse a string. I could choose any language. Presumably they wanted to see loops or something, but I just used Python and did this: string[::-1]
I got the job.3 -
!dev (?)
Ughhh
I hate fucking school books,
My students get their books from the school, they got a 2014 edition, I got them from my employer, I got the 2019 edition.
"How different could they be?"
Totally different, the chapters are in a different order(Who learns classes before loops and conditions???) everything is different. "Okay", you might say, "surely it's just just a few pages prior or later right?"
No!
"So open your books on page 69(lol)" *Starts explaining*
Students: *Look confused* "ehm, Soldier? Are you sure that's the right page? I don't see the table"
Me: "Lemme check I'm not wrong" *Looks at the book* "Yeah, page 69, you see the table at the bottom?"
Student: "No?" *Shows me book*
Me: "Wait, that's not what I have, can you show me the book?"
*Looks at book, it's a completely different subject and chapter*
*Goes to ToC, finds the place where the table is*
It's on page fucking 98, this happens for a few more times.
"Okay forget the book, I guess I'l just draw everything on the board for now."
Fuck you book publishers or whoever is responsible for this cashgrab of planned obsolescence.5 -
Spending a few hours messing around with regex and for loops to parse HTML just to SO and learn about BeautifulSoup. Why was my life wasted so!2
-
Writing a brainfuck interpreter is a lot fun: Mine does recursion within loops. I also added functions: strings, you can cheat. Stackdump(!), Exit script(*) , go to first cell (^), go to last cell(?), nulling cell (0) It parses this for example: "retoor" ^[.>]. It will dump string retoor. Explanation: the string moves ptr to sixth place. ^ will reset pointer to first. [] is a loop that executes as long there's data in current cell. The "." prints char of current cell (Number if not alpha etc). ">" moves a cell to right. [.>] will thus print until it moved to an empty cell. To move to first, I could've also used my repeater function by adding times to repeat after command: <6 moves six places to left. .>.>.>.>.>.> is also a way to print six chars. +[,.] works as the Linux program "cat". , is one char keyboard input.
Thanks for listening to my tedtalk8 -
Julia is a smelly pile of steaming shit.
https://discourse.julialang.org/t/...
Jesus fucking christ would you look at that pile of pure utter shit. The dumbfuck dev somehow managed to break WHILE loops for devs coming from python, and I speak for myself and probably others when I write most of us python developers are functionally braindead. If you can somehow fuck it up for python devs, a significant portion of the people you're trying to attract (owing by the syntax), then you should probably just go head and delete your whole git repo now.
Julia is a prime example of why you don't listen to your users on fucking github about the direction of language development.
What a bunch of fucking booger eating retards.33 -
When I was really new to JavaScript, I wanted to create an image gallery with images which I stored in a MySQL database. Well, I did not really had a clue how to load all the image sources into my JavaScript to load the images. I also didn't know much about fetching an endpoint of my website to get the data asynchronously.
I also wasn't a good database architect at that time and my database had an image table wich was for the gallery. Within this table there were multiple columns for one image slider (there should be multiple sliders on one page in the gallery (I know... 🤢)).
So I ended up writing an PHP loop wich printed Javascript loops for each row in my images table. Within my JavaScript loop I created the sliders and set the images.
In my defense I can say: It worked. 😅
It hurts to remember this. And I hope you won't judge me.2 -
Ok, here goes...
I was once asked to evaluate upgrade options for an online shop platform.
The thing was built on Zend 1, but that's not the problem.
The geniuses that worked on it before didn't have any clue about best practices, framework convention, modular thinking, testing, security issues...nothing!
There were some instances when querying was done using a rudimentary excuse for a model layer. Other times, they would just use raw queries and just ignore the previous method. Sometimes the database calls were made in strange function calls inside randomly loaded PHP files from different folders from all over the place. Sometimes they used JOINs to get the data from multiple tables, sometimes they would do a bunch of single table queries and just loop every data set to format it using multiple for loops.
And, best of all, there were some parts of the app that would just ignore any ideea of frameworks, conventions and all that and would be just a huge PHP file full of spagetti code just spalshed around, sometimes with no apparent logic to it. Queries, processing, HTML...everything crammed in one file...
The most amazing thing was that this code base somehow managed to function in production for more than 5 years and people actualy used it...
Imagine the reaction I got from the client the moment I said we should burn it to the ground and rebuild the whole thing from scratch...
Good thing my boss trusted me and backed me up (he is a great guy by the way) and we never had to go along with that Frankenstein monster... -
It was my thesis defense and I've made a pretty complex algorithm of sorting out data to their respective tables. One panelist told me that it is not an algorithm but just a collection of for loops and if statements. An algorithm should contain mathematical equations he said. I facepalmed during the course of interrogation.
-
Somebody pays for this domain 👍
Translation: www.if-loop.de
There are no if-loops, just if-statements! -
Need to rant. I am doing programming 2 at university with java and the assessment is to make a card game. The subject is shit and is basically going over loops, variables, conditionals ect which we learned in introduction to programming and programming 1.
This leaves little time for oop principles, design patterns inherentance and all other useful stuff.
I am dedicated to making a career in programming and want to do my assessment the correct oop way. Although the lecturer doesn't care and is instructing the class to do it procedurally and shit.
I could do the program really quickly the shit procedural way and still get full marks but I feel dirty as hell coding like a scrub. So I'm 60 hours in on this assessment and there are so many classes and even more because of unit testing (we don't have to unit test) and I am spending way too much time.
My code is beautiful, my classes are tiny and maintainable, easy to modify and I'm learning so much about how to code oop the correct way with the help of a mentor and someone I look up to. But god does it take forever to code this way. And soo many iterations and redesigns because I'm still learning.
It's almost done but now I have another programming assessment for another class I'll have to do the dirty way because of time restraints and other assessments.
Sorry for wall of text but this is stressing me out 😛4 -
I am currently refactoring some code which exists before my time in this company.
The code was so inefficient before. To put into perspective for every function call it used to loop through some data 100+ times .
I replaced it with a map and voila, no more loops anymore.
The person who wrote this code don't even realise how bad his code was. He sits besides me writing more stupid hacky code for other parts of the app.3 -
Should I be excited or concerned?
Newbie dev(babydev) who just learned string vs int and the word "boolean", is SUPER into data parsing, extrapolation and recursion... without knowing what any of those terms.
2 ½ hrs later. still nothing... assuming he was confused, I set up a 'quick' call...near 3 hrs later I think he got that it was only meant so I could see if/where he didnt understand... not dive into building extensive data arch... hopefully.
So, we need some basic af PHP forms for some public-provided input into a mySQL db. I figured I'd have him look up mySQL variables/fields, teach him a bit about proper db/field setup and give him something to practice on his currently untouched linux container I just set up so he could have a static ipv4 and cli on our new block (yea... he's spoiled, but has no clue).
I asked him to list some traits of X that he thinks could be relevant. Then to essentially briefly explain the logic to deciding/returning the values/how to store in the db... essentially basic conditionals and for loops... which is also quite new to him.
I love databases; I know I'm not in the majority... I assumed he'd get a couple traits in his mind and exhaust himself breaking them down. I was wrong. He was/likely is in his sleep now, over complicating something that was just meant as a basic af.
Fyi, the company is currently weighted towards more autistics (him and myself included) than neurotypicals.
I know I was(still am) extremely abnormal, especially when it comes to things like data.
So, should I be concerned/have him focus elsewhere for a bit?... I dont want to have him burnout before he even gets to installing mySQL44 -
So now Microsoft is suddenly deciding devices that "weren't" compatible are now perfectly compatible with Windows 11, and they're rolling this out in bunches at a time.
I still get "This device can not support Windows 11" but my coworkers are starting to see "Upgrade NOW!" and it's honestly gotten a bit sour seeing as I may be next. They're bypassing those who're editing the registry to stop this, too.
If I have to start diving into the deep ends of Windows and find out what IP Windows gets it's updates just to slap it into my HOSTS file, we're already in the apocalypse.
This upgrade is not bad for common people, but upon seeing that the Start menu GUI and taskbar got butchered horribly (I place my taskbar on top of the screen, Windows 11 doesn't allow for that) I myself absolutely want as much distance between me and that shit as possible.
In college, I've been hearing my fellow classmates having issues with Windows 11 left and right, including with how hard it is to get another browser to even work, to the Windows Store not even downloading Microsoft's own apps, to endless update loops, to the infamous "Update of Death"
Keep in mind, they got computers with better specs than mine, and they're having a worse experience. A lot of them just got refunds to the very last issue I just mentioned, all within August, day of purchase to day of return.
Microsoft, I am begging you for mercy, I'm so close to just getting up, finding out where you are, and blocking you from my network at all network and device levels.11 -
Handed over my first client's project today.
It was revamp for an internet radio site and also the first project that I used Bootstrap 4 in. On top of that, it was the first time I have to deal with PHP and its loops.
Despite audio player errors (somehow, they lost access to the streaming host and hence no audio source), I'm more or less satisfied with the final outcome.
But wait, why that stupid icon is not vertically centered? -
The more I work with performance, the less I like generated queries (incl. ORM-driven generators).
Like this other team came to me complaining that some query takes >3minutes to execute (an OLTP qry) and the HTTP timeout is 60 seconds, so.... there's a problem.
Sure, a simple explain analyze suggests that some UIDPK index is queried repeatedly for ~1M times (the qry plan was generated for 300k expected invocations), each Index Scan lasts for 0.15ms. So there you go.. Ofc I'd really like to see more decimal zeroes, rather than just 0.15, but still..
Rewriting the query with a CTE cut down the execution time to pathetic 0.04sec (40ms) w/o any loops in the plan.
I suggest that change to the team and I am responded a big fat NO - they cannot make any query changes since they don't have any control on their queries
....
*sigh*
....
*sigh*
but down to 0.04sec from 3+ minutes....
*sigh*
alright, let's try to VACUUM ANALYZE, although I doubt this will be of any help. IDK what I'll do if that doesn't change the execution plan :/ Prolly suggest finding a DBA (which they won't, as the client has no € for a DBA).
All this because developers, the very people sho should have COMPLETE control over the product's code, have no control over the SQLs.
This sucks!27 -
i was hired to join a team of old devs (40+) in an unnamed European country "yay goodbye 3rd world it's time to enjoy the quality of life" assist with enhancing already existing software and creating new solutions.
prior to my arrival most things were slow and super buggy, looking at the code base it shouldn't be a surprise, amateur hour everyone, logic implemented that is not needed, comment driven development, last time code review was done back in 1996. lots of anti patterns.
i swear there is a for loop that does nothing but it loops through a 100+ elements list, trunk based development with tfs since git is "not really needed"
test projects are not there.
>enter me an educated fool, with genuine passion for the craft and somehow a decent amount of knowledge.
>spent the last year fixing stuff educating people on principles and qualities.
> countless hours of training and explaining. team is showing cooperation, a new requirement comes in to develop with react.
> tear my ass creating reusable shit and self explanatory code with proper naming etc using git with feature branching, monday is first deployment day.
> today a colleague was working on an item submit a pull request and self approve it
> look at the code..... WTF the dumb fuck copied and pasted the whole code from different kendo components but somehow managed to refractor the name to test component, commented out all the code that he didn't use did the api call directly from the component, has 2 useeffects that depends on the a fucking text box changes for no reason, no redux implementation, the acceptance criteria is not achieved, and it doesn't work it just look right.
> first world country shit cannot scold, cannot complain, lead by example.
>asked him why you did this, the response was yeah probably i shouldn't have done that, i really didn't understand anything in the training but didn't want to waste time!!!!
> rest of the team created a different styled disaster with different flavors they don't even name their shit the same way.
fellow developers I'm stuck in a spaceship with a bunch of imposters, seriously i never cried in my entire life now I'm teary and on the verge of a break down.
talk with management "improving needs time" and offers me to join a yoga session to release the stress as if reaching nirvana would deliver shit on monday.
i really don't know what do is this a rant, is this a cry for help, I'm not sure, any advice is welcomed.7 -
I had the oppertunity to join a non profit organization to help them automate stuff instead of serving the army. One of their core applications got rewritten like a year ago from a terrible and very old Symfony stack to Laravel / React.
The guys who were in charge for the rewrite didn't really adapt the mindset of either MVC for Laravel nor the component idea behind React. There are a few controllers in the backend, but they sometimes have functions defined which would clearly belong in a model or service class. They rarely defined relationships on models, instead they're joining the tables together for the same effect. The frontend rendering mostly happens in for loops over the returned array from the API instead of breaking things down into little components. This ends in components which have sometimes over 1000 lines with super-nested logic in it.
But I did find my favorite piece of code today in of the controllers. Some many questions ...6 -
For robotics I decided to write a program that would automatically tune a PID loop (a loop with three magic constants that tells you how much power to give the motors).
Being a high school student who hasn't been taught anything about the theory of PID loops or the right way to tune them, I had no clue what I was doing. So instead of actually learning the calculus to do it, I just made an evolutionary tuner that keeps guessing slight variations of the last-best three constants.
Basically, you press start and the robot spins in circles until you come back in 15 minutes.3 -
I'm getting to the point where every time I encounter a new bug to fix I die a little inside. So tired of stuff not working and as soon as I get one thing fixed another blows up. Unresolved problems and open loops keep me awake all night. I sometimes want to switch careers but what else is there for me after more than 2 decades of this? I guess I could flip burgers and mow lawns. The burger flippers make about what I made in my last job and the guy who mows my lawn makes twice that much.4
-
Proudest bug squash experience?
Fixed a N+1 pattern bug on our web site. Wasn't a deeply technical problem, but I was proud to shove the fix up the arse of the developer who blamed me (and even got a VP involved) for the web site crashes (the N+1 involved his code calling a service I wrote) and none of the half-dozen other devs found it.
I really wanted to make a t-shirt with his initial 'blame' email outlining all the 'technical problems' with my service, and the fix was literally moving the service call outside 5 (yes 5) level deep for..each loops.2 -
I always thought the hate on senior developers doing stupid stuff was exaggerated... Mine just pulled an entire table, then used 4 for loops to reduce the records by criteria... I don't think he knows what the where statement is in SQL!1
-
A long long time ago ( 2007 I think ) I worked for a company that made landing sites, so basically an email campaign would go out, users would be sent to a 1 page website with a form to capture their data, ready to be spammed even more. You know how it was back then.
So I worked with a guy who we had just hired, I didn't do the hiring but his CV checked out, so I gave him one of my tasks. Now most pages were made with js and html, with a PHP backend ( called with Ajax). Now this guy didn't know PHP so I was like all good, ASP works too at the end of the day we don't judge, we do like 2 or 3 of these a day and never look at them again. So he goes of and does is thing.
3 weeks later, the customer calls up to me they still haven't received their landing page. Ok so he probably forgot to email the customer np, I tell him to double check he has emailed the customer. Another week goes by end the customer calls back, same problem. At this point I'm getting worried, because we're days away from the deadline and it was originally my task.
So I go back to the guy and I tell him I want that landing page so I can send it myself, half thinking to myself that we had a freeloader, that guy that comes in to companies for 3 weeks, doesn't work, but still cashes his pay. But no, this was much worse.
So he tells me he has finished yet. I ask him why, what's the blocker ? You had 4 weeks to tell me you were blocked and couldn't progress. And his answer was simply, because I wasn't blocked I have been working on it this whole time. So I tell him to zip his project up and email it to me. We didn't do SVN or git back then, simply wasn't worth it. So he comes back to me and says the email server is telling him attachments can't be bigger then 50mb. At this point I'm thinking he didn't properly sized the art or something, so I give him a flash drive to put it on.
When I then open the flash drive, the archive is 300mb, thinking to myself, the images weren't even that big to begin with.
So I open it up, and I don't even find any images, just a single asp page. About 500mb. When I opened that up and it finally loaded, I saw the most horrendous things ever.
The first 500 lines was just initializing empty vars. Then there was some code that created an empty form with an onChange event that submits the form. After that.. it was just non stop nested if's. No loops, no while, for, foreach, NO elseif's, just nested if's, for every possible combination of the state the form could be in. Abou 5000 of them, in a single file. To make matters worse, all the form ( and page ) layout was hardcoded in the if's. Includes inline css, base64 encoded images, nothing but as dynamic, based on the length of the form he changes the layout, added more background etc. He cut the images up for every possible size of the page and included them in the code.
I showed it to my boss, he fired the guy on the spot. I redid the work from scratch, in under 4 hours. Send it to the client. they had no ammends to make, happy as Larry. Whish I kept the code somewhere.
Morale of the story, allways do a coding test on interviews, even if small things just to sanity check.3 -
Kubernetes is a breeze they said. Now I‘m sitting here for several hours trying to find out why my pods randomly fail to resolve domain names.
Coming along my adventure: broken systemd configs, systemd-resolved stub causing loops, broken k3s modules and finding out that busybox‘s nslookup is broken for versions greater than v1.28.4.
50 issues later, I figured out that the dude who setup the corporate network (where the machine in question is located) uses two nameservers: one to resolve the internal routes and one for all the external domains. Luckily, coredns randomly picks a nameserver for each request. Therefore, sometimes queries for external domains reach the nameserver dedicated to the internal network which then answers with NXDOMAIN.
I hate networking so so much...4 -
give up on working hard
doesn't mean shit in the long run
it only matters who you can bullshit and how much money they have
*really* i mean this
at this point i've seen it so many times, and i thought the world couldn't be this dumb... but somehow that's really how it all works, there's really no secret
much better to just have had internship at some silicon valley company - their for loops, functional code, and abstracted classes are far better than the ones anywhere else, don't you know?
just wish the world would grow the fuck up, but alas, they have to remain wimpy kiddy caveman mentality style5 -
uni prof: "you can't make an infinite for loop. Infinite loopsnare only possible with while loops"....
I think it's not what he meant, but it was a while ago and I forgot the context, but multiple students made a 'what the fuck?' noise.5 -
As I already said on devrant, I'm a freelance web developer and I also often sell my services for teaching, loving that. Currently I'm teaching PHP with 30 students and it's going very well.
But yesterday, I received an offer for giving another course next month, this time on HTML and CSS, for a company I don't know yet. Almost every line of this email is wrong, outdated by 20 years, or just basically meaningless...
So I thought I could do my best to translate this as close as possible to the original, preserving the wrong formulations too, just for you devranters fellas.
"Hello,
I have an offer for a 2 days course for 5 people (level 1+ and/or 2), on HTML5 and CSS3. Below, the program :
1. XHTML AND CSS2 INTRODUCTION
Advantages and benefits of change
Understanding compatibility for different versions of browsers
HTML, XHTML, CSS edition tools : presentation of the different tools
The CSS language : different types of selectors : class of selector, identifier of selector, contextual selectors, grouped selectors
Blocks of text, boxes of text
The CSS1, CSSP, CSS2 properties
Relative and absolute measures units
2. LAYOUT TECHNIQUES
Full CSS, XHTML websites demo
Positioning with the position property, positioning with the float property
Columns creation
Layout for forms
Layout for data tables
Layout for menus
3. INTRODUCTION TO SVG (SCALABLE VECTOR GRAPHICS)
Role and importance of SVG
Using SVG on client side : basic shapes
SVG structure of document, tags examples
Using CSS styles with SVG
Different integration methods for SVG in a XHTML document
4. OPTIMISATION OF JAVASCRIPT CODE
Introduction to DOM and Javascript
Access to document objects : different access techniques, using this keyword, create elements dynamically
Positioning elements with the help of Javascript : positionning elements relatively to the mouse, move elements
Show/hide elements for creating hierarchical menus
Code optimisation techniques : using objects, objects litterals, loops optimisation
Can you please give me your availability ?"
Seriously...
CSS-fucking-1 ! Is it a course for dinosaurs ?
...And if only my rant was just about the program...
It's totally impossible to cover all these subjects in only 2 days with people of different levels and experience.
The guy exactly said to me : "don't worry about the program, it's an old text but they agreed to it anyway. They just want to learn HTML and CSS, some of them already know it but want to learn more, and the others are total beginers.".
And here is the meaning for the "(level 1+ and/or 2)" part in the email.
So... Surprizingly, I accepted the offer, but asked for at least a 3rd day. I'm waiting for their answer, but I'll do it anyway, adapting the course content to the actual students knowledge. I need the money, after all.
Wish me luck...
It's just sad that these formation companies are selling bullshit to clients that just want to learn something useful. It's too often like that, they sell shitty/useless programs and we have to catch up in real time with students that don't understand why they don't learn what was told to them.3 -
My first dev project. That is a toughie. Years ago (1998) I did some BASIC programming in HS. Then a few years after that (somwhere between 2002 and 2006) I did a lot of video game editing with hex editors and other tools to replace dialog to translate video games from Japanese to English, but there was not much coding there.
The first one I remember in recent times that involved any kind of coding was back in 2012/2013, there was a save state editor for Final Fantasy III on android (it didn't work for the iOS saves) but the editor was in Chinese. I ended up working with someone else to change it to English, so that others could use it easier. After that, I decided to code one from scratch for a different game.
I spent weeks working on it, and finally released a save editor for Final Fantasy Dimensions (I made sure it worked for both iOS and Android save files). It was my first great achievement, however it was way to many lines of code (I didn't know about loops or arrays back then, so I had a lot of repeating code). I eventually ended up making ones for Final Fantasy IV and VI, however those were never released to the public, as I had trouble getting the CRC to calculate properly every time.
This led me down the path I am now, going for my Bachelor's in IST with a specialization in Programming.1 -
*Not a rant, but a very long vent*
I'm 20 and facing the worst dilemma I ever experienced.
Been working at a company for more than half a year, got the job thru a friend and started as an intern to take care of customer problems, crap they do to PC's, printers that wouldn't work, answer emails and phone calls about our point-of-sale software.
Soon everything started to change, on one day my boss asked my what I knew about coding, all I could answer was about some really basic stuff that I learnt on a previous semester at college, just some very basic coding stuff we got for C, how for loops works, conditions, that kind of thing. Soon I was being asked to code a client management software for our company, I was starting to grasp a little of this wonderful world, soon I could write some more complex code in C#, even did a program that in 30 seconds did a 3 day's worth of work, and then I got assigned to develop a mobile POS application, earned a raise, and man, is this wonderful.
I feel that I really found my place in life, found something that makes me jump out of bed every morning.
But here comes the dilemma part: I'm enrolled in a mechanical engineering school for two years now, and it's my second place already (been enrolled at a agronomy school before that) and I'm starting to feel out of place, in all the classes I'm taking, I cant help but feel that this isn't for me, I don't see myself doing that for a future, but I don't know if jumping to another boat would make it any better or just worse, I don't know how good are my odds at a tech oriented course are, I don't really know what to do with the rest of my life.
Guess I'm just afraid of doing something stupid and regret it later, don't know if I should listen to the voice that shouts to me to do whatever I want to with my life or the one that assures me of a stable path... Don't know if anyone will read this much, but if so, thanks a lot, just wanted to put it out of my shoulders and maybe get to know anyone that has been here. I'm new here, but I feel already at home. ☺8 -
we had that one teacher in the apprenticeship in the first year who taught us C. There were some people who already knew the language but most of us didn't and we had this one horrible test where we had to do some for and while loops with stars... Like generating something like this:
********
*******
******
*****
****
***
**
*
so most of rhat stuff we never learnt and he couldn't explain to us why our code wasn't correct and we all ended up getting really bad grades in that subject for something really basic -_- just because he couldn't explain it to us and test things we never had -
Work on a product to categorize text… previous guy implemented an NLP solution that took 20 per body of text (500 words or so) in a $400/mo AWS instance, was about 80% accurate and needed “more data for training” 🤦♂️
I thought (and still think) that for some use cases AI is straight up snake oil. Decided instead to make an implementation with a word list and a bunch of if statements in Go… no performance considerations, loops within loops reading every single word… I just wanted to see if it worked and maybe later I could write it more optimized in Rust or something…
first time I ran it it took so little that I thought it had a bug… threw more of the test data we had for the NLP, 94% accuracy, 50 flipping milliseconds per body of text in a $5/mo AWS instance!!!
Now, that felt good!!
(The other guy… errr… left, that code is still the core of product of the company I built it for, I got bored and moved to another company :)3 -
OpenCL...
Okay so I'm completely new to OpenCL and I just put some stuff together to get a simple GPU Kernel running. Well that worked pretty good.
The reason I got into OpenCL was because I wanted to do some simple SHA1 cracking on my GPU. What I did was, I got a fast implementation of SHA1 from the internet, which works perfect in normal C++, but for OpenCL I have to rewrite some things. So I replaced all the memset and memcpy and so on with simple for loops and it still worked. Now, this should work on OpenCL, too, I thaught. God I was wrong!
Somehow the clBuildKernel got executed normally, but when I try to access the returned value (the error code) I get an Access Violation? It just doesn't make any sense to me?
Well I will try some stuff tomorrow again and I will find a solution for sure, but still, until now I just don't understand it. -
I'm really not sure. When I was 7-8 years old, I liked to view source in IE, then I somehow managed to use Javascript in the browser. First only some dumb opening of windows. And I liked Batch, so I made some files for copying, backup and stuff.
Then I got to PHP during the years from some online tutorial about making dynamic websites. My website was more static than stone, but yeah, I did page loading with PHP! Awful experience anyway, because I had to install Xampp, get it work and other stuff. 11 years old or so. (and I used Xampp only as a fileserver between laptop and desktop later, because.. PHP4... just no.)
As 12 years old or so I experienced my first World of Warcraft (vanilla) on a custom server in an internet cafe and I thought it's a singleplayer game. When I found out that no, I googled how to make my own server (hated multiplayer back then and loved good games with huge storylines). Failed miserably with ManGOS, got something to work with ArcEMU. There I learned some C++ basic stuff, which I hoped would helped me to fix some bugs. When I opened the code I was like: "Suuure." and left it like that. I learned what a MySQL database is, broke it like four times when I forgot WHERE and still rather played with websites i.e. html, css, js and optionally php when I wanted to repair a webpage for the server. With a friend we managed to get the server work via Hamachi, was fun, the server died too soon. Then I got ManGOS to work, but there wasn't really any interest to make a server anymore, just singleplayer for the lore. (big warcraft fan, don't kick me :D )
I think it was when I was 13y.o. I went to Delphi/Pascal course, which I liked a lot from the beginning, even managed to use my code on old Knoppix via Lazarus(Pascal). At this age I really liked thoae Flash games which were still common to see everywhere. So I downloaded .swfs, opened and tried to understand it. Managed to pull some stuff from it and rewrite in Pascal. Nope, never again that crap.
About the same time I got to Flash files I discovered Java. It was kind of popular back then, so I thought let's give it a try. I liked Flash more. Seriously. I've never seen so much repetitiveness and stupid styling of a code. I had either IDE for compiling C++ or Pascal or notepad! You think I wanted my code kicked all over the place in multiple folders and files? No.
So back to Pascal. I made some apps for my old hobby, was quite satisfied with the result (quiz like app), but it still wasn't the thing. And I really thought I'd like to study CS.
I started to love PHP because of phpBB forums I worked on as 15 y.o. I guess. At the same time I think there was an optional subject at school, again with Pascal. I hated the subject, teacher spoke some kind of gibberish I didn't really understand back then at all and now I find it only as a really stupid explanation of loops and strings.
So I started to hate Pascal subject, but not really the lang itself. Still I wanted something simpler and more portable. Then I got to Python as hm, 17y.o. I think and at the same time to C++ with DevC++. That was time when I was still deciding which lang to choose as my main one (still playing with website, database and js).
Then I decided that learning language from some teacher in a class seriously pisses me off and I don't want to experience it again. I choose Python, but still made some little scripts in C++, which is funny, because Python was considered only as a scripting lang back then.
I haven't really find a cross-platform framework for C++, which would: a) be easy to install b) not require VisualStudio PayForMe 20xy c) have nice license if I managed to make something nice and distribute it. I found Unity3D though, so I played with Blender for models, Audacity for music and C# for code. Only beautiful memories with Unity. I still haven't thought I'm a programmer back then.
For Python however I found Kivy and I was playing with it on a phone for about a year. Still I haven't really know what to do back then, so I thought... I like math, numbers, coding, but I want to avoid studying physics. Economics here I go!
Now I'm in my third year at Uni, should be writing thesis, study hard and what I do? Code like never before, contribute, work on a 3D tutorial and play with Blender. Still I don't really think about myself as a programmer, rather hobby-coder.
So, to answer the question: how did I learn to program? Bashing to shit until it behaved like I desired i.e. try-fail learning. I wouldn't choose a different path.2 -
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 -
I want to fully understand the use of JS. I know the fundamentals like creating for loops and making objects (which I finally understood last week!). Now, I want to make small-large scale projects.
I finally understand that I have to make HTML semantically and have a specific structure and let the css design the page the way I want it. Still a little iffy on positioning, but I am starting to understand it. I am going to starting cloning existing sites and make sure to practice my web development skill.4 -
This is so annoying, I had 9 diff. jobs the past 2 years and this is my 10th and if this doesn't change I might reconsider my options again.
I came to work at a company that pays me like a Junior and treats me as an intern. My 20yo "boss" who acts as a project owner/lead dev doesn't want to learn anything new and sees any improvement as a waste of money. The problem is he thinks hes a great programmer but he doesn't know shit. Im mainly working on the Laravel installation because "I claimed I know Laravel". And its absolute garbage. They haven't used a single Laravel features besides routes and everything else is vanilla PHP. They write for loops that loop through $_REQUEST to remove a single character. Write 100 deep nested ifs and they abuse Elasticsearch to the point ES crashes because the program is using 1000 deep multidimensional arrays. Its only a webshop...
Everytime I try to make a suggestion like making the master branch protected, doing code reviews etc etc I get shut down because they are autistic and don't want anything to change.9 -
I've spent many years in a bubble of 1 backend lang.. but when i started checking out other langs, I got very annoyed that each one has same basic stuff but with different syntax... Can we just agree on something? Ffs!
We really couldnt come up with unified syntax for -
false, False FALSE
OR or ||
def func function
And dont get me started on all the variations of for loops... Its like we are trying make our life hard
Looking at new versions of some langs, looks like they are copying new stuff from one another.. with different syntax.. thanks!
Nodejs trying to look more like she doesnt have callbacks.. while other langs adding callback functionality... Why why why?!2 -
rant.
i'm graduating uni and I have to say, my school sucks. they dont teach us how to be developers, they're teaching us how to be tools.
half the subjects could easily have descriptions like how to be employee of the month. I know social and management skills are important in the workplace but by god if I knew that that's the only thing they'll be teaching then I shouldnt have enrolled. for fuck's sake this is IT not HRM.
it doesnt help that most of the professors cant even code beyond printing statements and loops. they didnt even teach object-oriented programming. I had to study that shit myself, so mind you i'm probably not good at it.
though I've had my share of wonderful professors who have taught me so much, a handful of them isnt enough to salvage the incompetence of the whole faculty.
end rant.5 -
Browsing Reddit for weird porn back stories and you stumble upon the efficiency regarding loops
P.S. - the comments has more9 -
How are Coding Bootcamps and what are they like?
A little background:
I’ve been going to a University (have a year left for a CS degree) and I am so EXTREMELY frustrated. I thought I would get an education but it’s so underwhelming. 95% of it doesn’t involve programming and the classes that do are so elementary that I know more than the professors. By the end of my web design course we had been taught to center text, insert images, insert links, and how to use tables with a single day on CSS using colors.
The OOP courses are all the same, learn variables, types, conditionals, loops, classes, functions, and so forth. Python, C++, and Java. I taught all this to myself when I was 15, I’m 29 now.
I’ve recently gotten extremely interested into full stack web development. .NET Core, React, Typescript. I’m also working with Electron. I’m basically 100% self taught and spend almost every waking moment trying to learn more and apply it.
There’s only one person at my school who has the same passion as me and he’s the president at the coding club but is going into machine learning and big data (I’m the Secretary) and I just wish I could interact with more people who have the same passion. I would love to be challenged. I feel as if I spend more time trying to learn and diagnose problems then applying my knowledge because web development is so complicated when it comes to connecting everything together and I’m still relatively new to it (started like 4 months ago). I’m an extremely fast learner and extremely dedicated so I’m not worried about that being an issue.
I just really want to be a part of a community where I have people who can answer my questions and I don’t have to spend hours or days on google finding a solution to integrating Webpack or using typescript with react, and more. I want to feel challenged.
Can I get this from a boot camp? I recently listened to a podcast from Syntax and it really excited me but I don’t want to be let down again. Either way I’m finishing my degree to get that bullshit $60000 piece of paper but I wouldn’t mind taking a couple months off for something like this if it’s worth it.
I live in CO so if you have any Bootcamps in CO that you recommend, I’d love to hear it and take a trip to check it out in person.
Thanks a bunch!10 -
Spent all morning debugging a script I wrote to compare 2 CSVs of tables from 2 different dbs.
It generates a unique key for each row using the data.
For some reason couldn't match 1 in each...
After all morning of debugging and scrutinizing the data in the dbs itself... I found the root cause....
One for loops in the program skips the first entry... -
Somebody ranted about his teacher showing windows presentation and teaching nothing. I wanted to comment that post but i have enough material to make the whole rant out of it.
Well at least you have those presentations! In my school we have 2 IT classrooms one with win xp, 1ghz cpu, 0,5gb ram computers and one with win vista, 2 core 2ghz cpu and 2gb of ram PCs.
Guess what room our teacher is using... of course the worse one! The second one is fine, few years ago another theacher had been using it!
I tried to convince him to change rooms but he is coming up with silly exciuses! (like "server is not working here!", well i fixed it with my friend but why are you even talking about it when you are not using yours in old class!)
PS. That server is useless anyway, every pc is connected to router that is connected to internet so supervisor pc is not mandatory, only acces restriction is enforced by win accounts.
I heard from students from my class (that picked that optional IT course) (i'm in high school) that gimp is not working because pc's are so bad!
Sometimes even notepad frezzes.🤔
Not only class is shite but teacher clearly has no idea what is he doing. (in order to pass the final from IT you need to learn simple C++, up to simple foo objects) and of course he isn not even talking about that! On one lesson about sorting algorithms he gave everybody 10 small pieces of paper with numbers on them and told everybody to sort them manualy, because he didnt know how to do it himself! So there is no doubt they wont be able code it.
I need to mention that i volontered to "clean, fix" that classroom (in order to convince teacher to move). And in that class i saw programms written in c++ on every computer! That means somebody was teaching propely before! 😣
I feel sorry for those guys, they are just waisting time. I would fall for it as well but i decided i can learn coding in home ;).
Well, results are shocking, after 1 month of coding i learned C# and i can basicly make any algorithm i ever wish. I learned about computer operation so well that i can nearly teach computer science. (i helped my friend in usa that is a electronic student with that and i'm very proud of it 😁) and it class still can't even use all 3 loops correctly... 😥 Ok i must admit i have been coding for a looooong while so i had time to learn basic c,c++ and pc operations before, but point still stands.
Why the hell are you wasting life of those studends? Why are you giving them a choice to learn coding WHEN YOU CANT EVEN USE PC YOURSELF?! (that it course is optional so you can apply if you want so)
I dont regret not bothering about it.1 -
What are the things in computer science do I need to learn?
So yeah, I'm still in high school and will be entering IT in a few years, but I am willing to learn now. I already have a good grasp of programming and can create good desktop apps and basic web apps, so teaching basic concepts such as variables, loops, functions is done for me.. But what computer science concepts should I learn next?18 -
I absolutely hate software to the point where I started converting from sysadmin to becoming more like a dev. That way I could just write my own implementations at will. Easier said than done, that's for sure. And it goes both ways.
I think that in order to be a good dev, you need these skills the most:
- Problem solving skills
- Creativity, you're making stuff
- Logical reasoning
- Connecting the dots
- Reading complex documentation
- Breaking down said documentation
- A strong desire to create order and patterns
- ...
If you don't have the above, you may still be able to become a dev.. but it would be harder for sure, and in some cases acceptance will be lower (seriously, learn to Google!)
One thing I don't think you need in development is mathematics. Sure there's a correlation between it and logic reasoning, but you're not solving big mathematical monsters here. At most you'd probably be dealing with arrays and loops (well.. program logic).
Also, written and spoken English! The language of the internet must be known. If it's not your first language, learn it. All the good (and crucial) documentation out there is in English after all.
One final thing would be security in my opinion, since you're releasing your application to the internet and may even run certain services, and deal with a lot of user data. Making those things secure takes some effort and knowledge on security, but it's so worth it. At the most basic level, it requires a certain mindset: "how would I break this thing I just made?"4 -
I am a Technical Lead in the department in my company that writes code for our clients that have money but doesn't have the technical expertise to handle the complexities of our own software.
Part of my tasks involve taking care of a few projects written by employees that have left after using third-party tools rather than using our own software. No one else in this department knows these third-party tools, they only know our own, and my *still limited* web development experience means I get dumped these things in my lap.
And I'm SO pissed at these projects and their authors and the manager that let these ex-employees write these things. There is this one project that was managed by two different "developers" (I don't know they deserve this title) at two different times, and it is so riddled with different technologies it makes me want to throw up almost daily.
Don't believe me? Here is a complete list of the dependencies listed in the package.json of this project: babel-polyfill, body-parser, cookie-parser, debug, edge, edge-sql, excel-to-json, exceljs, express, html-inline, jade, morgan, mssql, mysql, pug, ramda, request, rotating-file-stream, serve-favicon, webpack, xlsx, xml2js
What this doesn't even show, is that one part of this project (literally one page) is made using react, react-dom, react-redux, and jade. The other part (again literally one page) is made using Angular and Pug. In case you missed it while picking up your jaw, there's also mssql, mysql, edge and edge-sql. excel-to-json, exceljs, xlsx.
Oh you want *more* juicy details? This project takes the entire data object used by the front-end, stringifies it into JSON, and shoves it into the database *as a single field*. And instead of doing WHERE clauses in the SQL queries, it grabs the entire table, loops, parses the json, and does a condition on it. If even one of those JSON entries gets corrupted, the entire solution breaks because these "developers" don't know what try/catch is.
The client asked for a very simple change in their app, which was to add a button that queries the back-end for a URL, shows it in a modal dialog, after which a button is clicked to verify the link by doing a second query to the back-end before modifying a couple of fields in the page.
This. Took. Me. Two. Months*. Save me. Please, save me.
*between constant context switches between this and other projects that were continuously failing because of their mistakes.4 -
This is gonna get someone illogically upset, but idc about that.
I know it's ignorance of semantics but I'm tired of propagated ignorance changing the meaning of things.
Non-binary is NOT a legitimate term for whatever 'gender' you are!
I get what *whoever-started-it* was going for, but it's NOT valid. If you want to say that youre not male or female, fine... just don't abuse binary systems to do it. Just say youre non-bool/anti-boolean or identify with one of the, apparently 50, shades of gray.
I keep getting into logical loops to nowhere about this nonsense. No one is even defining what's supposed to be the 1 vs the 0. Which then makes me think '1 must be male... genitalia=1 in many ways...' which then sources back to the historic validity of males vs undervalued/less than human interpretations of females...
Then <brake>.
Ofc these people aren't going into the historical significance... they don't even realise how binary works! Ofc they'd have no clue that all 0s= no data... and 0s only have significance when viewed in placement to the 1s.
Let's all start using proper terminologies, like non-boolean. Maybe i can start a trend by paying people pennies to learn/teach wtf a boolean value is, and that binary can represent anything. With proper encoding the array is limitless... so being binary is actually a giant spectrum... therefore makes no sense to be "non-binary".
Ok... im done. It had to be said.
Who wants to start identifying as non, or educating wtf is, boolean with me???42 -
Configuring apache is so fucking repetitive and inefficient. No for loops. No arrays. Just repeating damn near the same lines over and over and over again.
Oh you want to listen to 20 ports? I hope you like copying and pasting.4 -
According to people here, ternary operators. I don't care what I'm doing, if I can use a ternary operator instead of an if, get ready for it!
I guess implicit brackets on conditionals and for loops if it's a single line. Anything that saves me typing boilerplate, but it's still readable, I'm gonna do it.1 -
There's always been the debate about omitting braces for single line if's and loops, but today I learned the C compiler actually allows you to do this:
for (i = 0; i < x; i++)
for (j = 0; j < y; j++) {
do_something(i, j);
something_else();
}32 -
My whole workflow for HTML is frustrating. I rather write pug, because it has mixins, includes and isn't that fucking repetitive. But to write pug within Laravel blade views, I have to preprocess it too blade. Then sometimes the syntax gets crazy because of escaping blade loops like an insane guy ('| @foreach($foo as $bar)'), but you get used to it after time.3
-
So I made my first rust program with just a quick look at the docs on for loops. 20 minutes from nothing to exe. Just fizz buzz but still. Took me 4 hours to get C++ compiling.3
-
So i have been learning c++ for more than 2 years now and i the most useful thing that i have ever created is command rine program in Windows that iterates over all the files on a drive and deletes those with a specified extension. So yeah life is pretty bummed up right now.
So i was thinking why not start by contributing to some of the open source projects.
Therefore i went onto github to find something to work with. However the list gontained either projects in languages other than c++ ( i have been trying to learn those) or based on machine learning.
So i thought why not get on devrant and find some people who are willing to work on some projects with me and in the process teach me some stuff. Therefore here i am asking you guys to collaborate with me as i am now sick and tired of making stupid patterns using nested loops.
PS: I am now 18 and in second semester of college pursuing a b.tech in cse5 -
Just learned how to write a for loop in kotlin and I now want to burn Java to the ground. When I first learned for loops in Java my brain almost imploded.2
-
Disclaimer - Day in the life of a whitehat student.
Whitehat Whitehat Whitehat
What is this????
When I attended my first white hat jr online free trial class, I got to know that the teachers does not know the difference between java and javascript. Infact they were saying blockly as javascript. I was knowing the difference between the same. There were 3 types of courses -
***Note : - This information is taken from the whitehat official website***
1.) Introduction to Coding :-
Sequence, Fundamentals Coding Blocks, Loops
(Teach us to drag and drop blocks of code.org(blockly))
2.) App Developer Certificate:-
Events / UI,Conditionals, Complex Loop, Logic Structures, Turtle Coding
(Advanced drag and drop(blockly))
3.) Advance Coding with Space Tech -
Extended UI/UX, Rich GUI app, Space Tech simulation in Space Lab / Game Lab, Professional Game Design.
(GUI - with tkinter(python), Game Design - Blockly(code.org))
These things are rubbish ......making GUI's is simplest with tkinter and the students who make games (with code.org) submit their codes to the whitehat community (because the teacher says "they will compile it to an android app, then you can publish it to playstore" --- this is for 1% students who are able to design their own games).
The thing whitehat do with code given by 1% best students:-
Export to HTML from code.org
Download HTML to APK Convertor
Setup SDK
Successfully converted to APK!
Publish it to Whitehat Jr console account
Credits of the students
Income of the exporters
Rest all students will only think to be the CEO of google one day.
My Opinion - StackOverflow, Unity for Game Development, Android Studio, Dart, Flutter and Kivy (using google colab for compiling the python code to an apk) for app development and Flask, HTML, CSS for web development.7 -
Here's my idea. In light of all the efforts to teach kids how to do programming, why not start with an introduction to discrete mathematics instead? From a lot of the programs I've seen, the kids are taught different structures such as if else, while, and for loops, but they don't attempt to start teaching them about recursive methods or even other structures such as linked lists, queues, dequeues, binary trees, heaps, different sorts, and other things. Am I just not looking deep enough into those programs? Or are the creators of these programs not wishing to cover those things because they feel like children wouldn't be able to comprehend such things?4
-
I went down a rabbit hole of code changes to try and delete a stupid for loop with a break in it.
It was super stupid and I gave up and submitted to the fact that some battles are not worth the time and stress.
OK... But seriously, It was returning multiple entities from the database, but we only always want the first one. My logic is that we should just go in there and fix the LINQ so we are explicitly getting one entity out.
But fuck that logic. No I'll have to change fucking everything that's tied to that method and expects a list from it. Every fucking thing. That includes error handling, parsing, for loops..... Nevermind...
You can have your foreach and your break. I'm taking mine, now.rant break my back on this stupid code what do you want on the frontend last minute changes did this to me they couldn't decide1 -
Should I be ashamed?
I hardly ever use "i" as a counter in for loops
I most likely use "k" and "j"; "i" stands for "index"23 -
So I do not get why people use ReactJS. I hate it. for 3 years passionately. And I have to work with it every day.
- one-way data binding
this makes you write twice as much code, which will have twice as much bugs, you need to read through twice as much code from other devs.
- mixing html and JS
after all I like to pour my coffee on my omlette so I can eat and drink at the same time in the morning. This kills productivity and ugly AF
- not unified
Every dev uses their own special snowflake framework with React there is no unified way of doing things and you cannot use your familiar tools. Every project you need to start over from zero.
- Bugs bugs bugs
infinite loops, max update depth reached, key not present on list element. Let me ask you something dear ReactJS. If you know that there should be a unique key on that element. Why cannot you just put it there and shut the f up?
- works reeaally slow when compiled with TS
ReactJS was never designed to work with TS and now the tools for it are really slow. And why TS? Explicit contract is always better than an implicit contract. TS helps you in coding time, but for some reason React devs decided to worth 3 seconds to wait for compile and then realize you mad an error. ReactJS is bad and inefficient so stop making projects with it please.9 -
Why some single letter variable names looks ugly to me, for example: c, i and j (and even k) are the most used (mostly in for loops) but does not look ugly.. why?
Ugly
for (int a = 0; a < 10; ++a)
Not ugly
for (int i = 0; i < 10; ++i)24 -
My love for you I can't describe it,
so I dont't even try and hide it.
Dev. you are my one true passion
you are always there to teach me a new lesson.
Some missing semicolon;
I have searched for you soo long.
Or was it a wrong indent,
ah f**k it was the missing increment.
Thinking through endless loops
in while, for and even do form,
just that my programs do a little better perform.
You give me the possibility to express myself as who I am and who I want to be,
in so many languages, from java, JS, GO, python and even C.
You give me bugs and issues that I track,
from motivation for you I never lack.
There are projects out there, where I contribute to
oh what a beauty are you.
And now you even bring fun into my life
with devrant, I now know how to survive.
How to survive client meetings and non devs around me,
oh how much stupidity I there see.
Let's exit this small programm of mine, this so called rime,
where I an immutable statement define:
I think about you even when we are not together,
My dearest DEV I will love you forever. -
I wanna make a c+friends language and it'd be dev friendly and will throw lots of errors on compile to show love. Also it'll compile slower with each newline so you can always say "it's compiling" there will be classes but people instead and then instead of new I'll have create. As for loops let's go with a friendly do while loop and dontdo while as normal while or dowith i while to have a friendly for loop. Instead of ifs let's say decide() and instead of else let's have or. Instead of functions I'll have well you need no functions you'll have jumps and tests before jumps just like assembly has. Oh and everything will be a pointer because then it runs nicer. To create a variable you can't use = because that's the equal sign in decide you need to use "var int myint is 69" because why not. Then to print to the console "console.outputstream.out(myint)" instead of threads I'll have please like "please work" where work is a jump target. I hope you'll enjoy this language ^^
-
Stack Overflow people have profound buffallo bullcrap on their skulls, they are some software engineers who have fucked COBOL and BASIC, probably somewhere like NASA, just pondering out where someone post a question. They're probably some etilist cult banging a prostitute while delivering that awful downvote imitating the slap they give the chick during sex. They desire questions such as
"RANDOM_fuck_module_Abdul.method() not working in python" or "how to dock the dock by undocking" (tagged: AWS). Not things like "why does the audio tag not work in a PC but works in w3school tester?" or a genuine programming question. Fuck.
We don't tail recurse or loop abc for k in godfuck loops, huh? We make simple things as: a form, a http request to dell.
I hope there penises get rotten in the hell. Period.
this is just a part of SO.13 -
Colleague (Lead Engineer): Hey, check my code. I'm trying to group a list of Request objects by their id. Something is not working here
Me: * saw his code, had a lot of shitty loops, called all for a quick meet, changed his shitty mess to one liner
list.stream()
.collect(Collectors.groupingBy(Request::getId))
Walked out like a boss*
😎 -
So I promised a post after work last night, discussing the new factorization technique.
As before, I use a method called decon() that takes any number, like 697 for example, and first breaks it down into the respective digits and magnitudes.
697 becomes -> 600, 90, and 7.
It then factors *those* to give a decomposition matrix that looks something like the following when printed out:
offset: 3, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('2')]]
offset: 2, exp: [[Decimal('2'), Decimal('1')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('1')]]
offset: 1, exp: [[Decimal('7'), Decimal('1')]]
Each entry is a pair of numbers representing a prime base and an exponent.
Now the idea was that, in theory, at each magnitude of a product, we could actually search through the *range* of the product of these exponents.
So for offset three (600) here, we're looking at
2^3 * 3 ^ 1 * 5 ^ 2.
But actually we're searching
2^3 * 3 ^ 1 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
2^3 * 3 ^ 1 * 5 ^ 0
2^3 * 3 ^ 0 * 5 ^ 2.
2^3 * 3 ^ 1 * 5 ^ 1
etc..
On the basis that whatever it generates may be the digits of another magnitude in one of our target product's factors.
And the first optimization or filter we can apply is to notice that assuming our factors pq=n,
and where p <= q, it will always be more efficient to search for the digits of p (because its under n^0.5 or the square root), than the larger factor q.
So by implication we can filter out any product of this exponent search that is greater than the square root of n.
Writing this code was a bit of a headache because I had to deal with potentially very large lists of bases and exponents, so I couldn't just use loops within loops.
Instead I resorted to writing a three state state machine that 'counted down' across these exponents, and it just works.
And now, in practice this doesn't immediately give us anything useful. And I had hoped this would at least give us *upperbounds* to start our search from, for any particular digit of a product's factors at a given magnitude. So the 12 digit (or pick a magnitude out of a hat) of an example product might give us an upperbound on the 2's exponent for that same digit in our lowest factor q of n.
It didn't work out that way. Sometimes there would be 'inversions', where the exponent of a factor on a magnitude of n, would be *lower* than the exponent of that factor on the same digit of q.
But when I started tearing into examples and generating test data I started to see certain patterns emerge, and immediately I found a way to not just pin down these inversions, but get *tight* bounds on the 2's exponents in the corresponding digit for our product's factor itself. It was like the complications I initially saw actually became a means to *tighten* the bounds.
For example, for one particular semiprime n=pq, this was some of the data:
n - offset: 6, exp: [[Decimal('2'), Decimal('5')], [Decimal('5'), Decimal('5')]]
q - offset: 6, exp: [[Decimal('2'), Decimal('6')], [Decimal('3'), Decimal('1')], [Decimal('5'), Decimal('5')]]
It's almost like the base 3 exponent in [n:7] gives away the presence of 3^1 in [q:6], even
though theres no subsequent presence of 3^n in [n:6] itself.
And I found this rule held each time I tested it.
Other rules, not so much, and other rules still would fail in the presence of yet other rules, almost like a giant switchboard.
I immediately realized the implications: rules had precedence, acted predictable when in isolated instances, and changed in specific instances in combination with other rules.
This was ripe for a decision tree generated through random search.
Another product n=pq, with mroe data
q(4)
offset: 4, exp: [[Decimal('2'), Decimal('4')], [Decimal('5'), Decimal('3')]]
n(4)
offset: 4, exp: [[Decimal('2'), Decimal('3')], [Decimal('3'), Decimal('2')], [Decimal('5'), Decimal('3')]]
Suggesting that a nontrivial base 3 exponent (**2 rather than **1) suggests the exponent on the 2 in the relevant
digit of [n], is one less than the same base 2 digital exponent at the same digit on [q]
And so it was clear from the get go that this approach held promise.
From there I discovered a bunch more rules and made some observations.
The bulk of the patterns, regardless of how large the product grows, should be present in the smaller bases (some bound of primes, say the first dozen), because the bulk of exponents for the factorization of any magnitude of a number, overwhelming lean heavily in the lower prime bases.
It was if the entire vulnerability was hiding in plain sight for four+ years, and we'd been approaching factorization all wrong from the beginning, by trying to factor a number, and all its digits at all its magnitudes, all at once, when like addition or multiplication, factorization could be done piecemeal if we knew the patterns to look for.7 -
I remember the day when I was in first year college. We were tasked to make a c++ program that will print a diamond pattern. Didn't know that you could achieve that with for loops.
What I did?
A hard coded one.
What I got?
An F -
I'm developing a new (just for fun) programming language and I'm wondering what features I should add next? These features are already implemented:
- Printing text
- Variables
- user-input
- Datatype conversion (String, Int, Float, Bool, List, Dictionary)
- lists/arrays
- dictionaries
- Sorting
- Shuffling
- random numbers & choices
- Math stuff like: log, abs, floor, ceiling, sin, etc...
- Time & Date
- Working with files
- If-else statements
- Ternary operators
- Loops (for & while)
- Functions
- Classes
- Error handling
- Importing libraries & other scripts
- Arrow/callback functions
- Escaping (\)
is there anything you often use missing?11 -
So, there was an Internship and Recruitment training seminar held in my college yesterday, by a firm that's very well known apparently. Some wonderful new things that we learned:
*There are 4 types of loops, not 2. (Okay, maybe on a technicality, but still not conventionally)
*You aren't asked to write code when interviewing for a programming job. (Well, what?)
*A rolling stone has no mass. (Probably the worst mutated proverb I've ever heard)
I'm not going to sign up for this program.20 -
during a programming introduction course on loops my pals started writing `for` loops instead of `while` loops like so:
`for (;expression;) {}`
spent weeks explaining why it's wrong. needless to say, they still do it. had to hinder myself from ripping my hair off my head11 -
I once saw a DBA using two for loops in PL/SQL to join two tables. I wonder if he knew about the "alternative" way to do that...2
-
So I'm writing a function in Unity3D that walks a rectangular grid. At one place in the code, I got the x+y coordinates backwards, which caused the function to infinitely loop between two coordinates.
Not seeing a way to kill the loop, I looked it up on Google. The suggestions I get are. . .
1. You need to kill the Unity3D task and lose your edits because the environment and the player run on the same thread.
2. You can pay ten bucks for an extension that lets you break out of infinite loops.
3. You should really avoid writing infinite loops. That's just bad form.
SERIOUSLY?1 -
How do I become good with functional features(map,reduce,filter,zip,flatmap) in Javascript and Python?
It feels so alien. I'm so used to writing plain old loops.
Reading and undersranding this kind of style in other people's code is really hard for me, especially if all this is happeining on the same line.4 -
This is probably a standard pattern/algorithm, but I feel pretty good about myself figuring this out.
I was doing a programming challenge and found myself with 2 lists of integer points (x,y). I needed to see where the points converged and identify those locations. Of course I started with a brute force approach and did nested loops to find these locations. This was taking WAY TOO LONG. These lists were 200K each. So checking with naive looping is 200K * 200K operations. Which is a lot.
Then I thought, well I am checking equality, so I will create a third map. The index to the map will be the point, and the data will be an integer. I then go through each list once incrementing the integer for each point that exists in each respective list. Any point with a value greater than 1 is a point convergence.
Like I said, this has got to be a standard thing, so can someone tell me what algorithm this is? I am not sure how to search for this.
I am fuzzy on complexity notation but I think the complexity started at n^2 and was reduced to n. Each list is cycled over once.4 -
Once again lost source of retoorscript. Wasn't that mad about it, there was some stuff that could've been better anyway.
I wrote a whole new interpreter in 48 hours or so.
It supports user defined functions and native functions that you can add to the VM yourself.
I did spend extra effort to make it faster than python. Who says python is slow never wrote a language.
It has garbage collection and it doesn't contain leaks.
Sad thing is that I have to write the string manipulation functions again. That's a lot of effort.
In the screenshot, obj is not existing, this is how you declare vars, just using it. Works directly as an object. It does keep all his properties if I would assign a value later to obj. Numbers can be property names for some reason.
It would be possible to write a webapplication with it. This requires a decent stdlib. A lot of work.
Other stuff that I'll still have to add:
- loops
- arrays
- if / else
The goal is to make the most easy understandable and easy to extend interpreter ever.
You can just do VM_register(vm, "name", ptr_to_your_function) to add any methods.
Ideas are very welcome17 -
I can now appreciate some design decisions behind react-redux after witnessing some angular OOP clusterfuck.
I am sure there is some clean/correct way to code in angular, but everyone is treating angular as java.
Some angular application (the one I have to work with) is littered with network calls. It's difficult to spot duplicates. People usually resolve promises everywhere. In services, in a top-level component, or in for loops. In react, people use apollo/redux-query or redux-saga to handle network calls. Since these libraries prevent duplicate network calls internally and reassigning apollo network call function or redux action function is always useless, it's easy to spot all network calls in a component tree.
In angular, it's difficult to trace data mutations when data can be updated everywhere. In react, you can easily find UI state updates by tracing state hooks/dispatch/apollo usages.
In angular, it's difficult to trace data pipeline. Since everything is imperative by default, people need to add update functions in data subscriptions. With all the littered mutations. Soon you will lose track of what the fuck is going on.
I hope angular get the agonizing death it deserves and fuck everyone who codes JS OOP clusterfuck UI.8 -
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. -
Fuck you MATLAB and your shitty inefficient for loops. Now I have to rewrite most of my code to use matrices instead of structures cause you take so long. Fuck you and your stupid ability to scale my neural network.....who needed sleep anyway6
-
Other build tools:
Here is a plugin, use it . Be done.
Scala Build Tool aka SBT:
Build your own plugin.
Everything is scala...
You can create by the way funny endless loops when using the wrong syntax - yet it might compile successfully. And then when you load the plugin, it works. Till it is evaluated - lazy evaluation for the fun.
Error messages are at best cryptic.
*If* you manage to get a working plugin and *if* it runs...
Surprise. Surprise.
You might need to parse the log output of SBT.
Another funny surprise: Log output isn't configurable. You can configure the log level. That's it.
So after a lot of pain stakingly putting together a fucking shitty plugin, you can now grind the rest of your brain with ...
sed.
Cause yeah. You can now use regex to parse an sbt build log and extract the necessary information.
:)
...
So....
Are we there?
Mwahahahhaa.
Only if you haven't forgotten to either disable colored output for SBT... Or take an extra mile with e.g. less -R.
Otherwise you have ASCII control characters in your file. :-)
After getting that shit to work, you now have finally a parseable build log.
Just took days instead of hours.
But that's SBT. :-)6 -
Why is vectorization library faster than hand-written for loops ? I mean, somewhere down the line, the matrices/vectors must be multiplied (or any other operation) and thus be one-by-one (for loop??) calculated and stored.
Why is it then faster to use these libraries than just manually writing for loops all over the place ?
I guess some low level magic (OpenBLAS ?) goes on there but I just don't see it..
P.S. [Would have posted it on stack overflow but I'd be ripped apart so I'm pioneering new ways]8 -
Recalling the the time I was discussing a web dev based assignment with a classmate( And I wouldn't even go as far as to call it web dev, it was just making connect 4 using js and node).
Me: so did you get to implementing your game with firebase.
Classmate: no, but hey did you use loops for making the board?
Me: ?? There were like 50 elements ofc what did you do.
( Sigh* to think it's going to this)
Classmate: copy pasted
Yup 50 elements copy and paste. like the person I was talking to wasn't even incompetent I mean he had like a 3.5 gpa, how is there any correlation between this stupid number and how they actually code if you can't even code loops. The dude was a 2nd year student. And this wasn't even the only person I heard this from.
Apparently the TAs had to post about how to use loops in Js before we had our lab exam cause so many people copy pasted instead of loops, to think that would ever have to be the case.
The future is not bright. -
Exercise do the pyramid of * and I looked up how to do it but so many people are able to do it without looking it up I dont know why shit to do with nested for loops makes me feel so dumb.
I know it's not a big deal to not know how to do every single thing but I'm always even stuck on the smallest exercises that apparently more people can do than not. Like how am I supposed to have thought about that or figured that out. How am I supposed to learn all this shit. Like for example just look up a list of basic exercises and I cant do any of them. I'm not good at this and its stressing me out because how will I get better or hell even a job if I cant solve these simple problems? How am I supposed to get better at solving these simple problems? I cant just keep looking at the fucking solution because that wont stick or teach me anything
Most stupid thing to rant about by far4 -
Pretty tired, plus working on something that at some point needs 4 or 5 for loops inside each other
End result: for (i=0; k<=Nspecies; ++j)
Mhkay time for coffe -
Had to do the FizzBuzz test in PHP. Proceeded to creat a range(1, 100) before the for loop instead of using the loops own index #. Worst part is I realized what I had done in the parking lot after I left. They asked me multiple times how I could optimize the code too lol.
-
React, it's declarative way of doing things, and the functional programming methodology it prefers.
Realized how much I've moved on from for-loops and class/object instance to maps, filters and immutability/observers when I worked on a Laravel project after so long and found myself forced to do things in the, erm, "PHP" way, despite spending my initial year and a half of programming working exclusively in PHP.
Sure, there's Class Components and imperative techniques in React but I had blissfully settled into using the flexible nature of doing things enabled by both native JS and React, with hooks, Lodash/Ramda and (almost fanatically) pure functions1 -
that moment when a fellow dev asks you a web dev ( PHP ) for help and you see
... -03 -0fast & funroll fruity loops ...
im not surprised that Gentoo box died ... -
This SocketIO method emits a message to all users who have joined the same room (conversation ID).
This works if it's a 1-to-1 chat or a group chat with infinite users in the group.
The thing that bothers me is this enhanced for loop. It loops through ALL currently connected users.
- If theres 10 users, sure no big deal
- if theres 1000 users, it has to loop 1000 times
- for N users it loops N times
What if N = 10000? God what if it's 100,000 or 1,000,000.
Imagine having to loop that many times every time you want to send just 1 message.
OR wait i just realized. This shit grabs ALL users -- but within the room ID. Right? Am i trippin balls here
Im now confused (excuse my confusion i coded till 3am last night and im still fried). Is my logic flawed? Have i written this piece of code with good performance or not?38 -
Don’t fall for the “language A is better than language B” -it’s all just syntax (within the same paradigm). Learn higher concepts such as: data structures, abstraction, loops, variables, conditionals, functions.
Only then can you decide that your favourite language is better than anyone else’s...5 -
I prefer starting from theory and then proceed with practicing. For example, to learn haskell and deeply understand it, I started by taking a course in category theory and I already have a degree in computer science and then start writing actual code. The same with JS. I started with theory for JIT compilers and studied how V8 works, how it utilizes event loops and how they are implemented in the kernel. Then I started experimenting with code and demos. It's a success path for me, that has worked every time with every new technology.2
-
That moment you find out that python is very sloppy when it comes to scopes. It seems that variables declared in loops are callable in function scopes. So this code actually does not give any errors:
for i in range(6):
print i
print(“out of loop scope”, i)
Now I’m just like: WTF! That can cause some serious errors when you’re not aware of this thing. I don’t know any other language that has this property...4 -
If only more devs would use short, yet concise, modern constructs instead of archaic ones.
For example in C#: using lambdas, extension methods, LinQ,.. much easier to read through if you know how these work, rather than having to spend all day scanning tedious for-loops and over-engineered classes your colleagues wrote who don't know any better.
Examples:
vs.foreach(v => console.write(v));
initialList = secondList.Where(p => initialList.Contains(p, valueComparer))
.Concat(initialList.Where(p => !secondList.Contains(p, valueComparer))).ToList(); -
Things I say to my clients when I know that a reboot is required to fix their issue but I don't have enough evidence to prove it to them :
"... On any computing platform, we noted that the only solution to infinite loops (and similar behaviors) under cooperative preemption is to reboot the machine. While you may scoff at this hack, researchers have shown that reboot (or in general, starting over some piece of software) can be a hugely useful tool in building robust systems.
Specifically, reboot is useful because it moves software back to a known and likely more tested state. Reboots also reclaim stale or leaked resources (e.g., memory) which may otherwise be hard to handle. Finally, reboots are easy to automate. For all of these reasons, it is not uncommon in large-scale cluster Internet services for system management software to periodically reboot sets of machines in order to reset them and thus obtain the advantages listed above.
Thus, when you indeed perform a reboot, you are not just enacting some ugly hack. Rather, you are using a time-tested approach to improving the behavior of a computer system."
😎1 -
Ugh, fuck man. I had planned an extremely general function for printing a truth table for a given proposition for a course, with a little functional programming thrown in. Instead, we are just supposed to show all 2^8 possible truth tables for 3 variables. That's eight nested loops with a hardcoded string that you inject the 8 values in.
I feel so disappointed1 -
I've been helping a friend of mine with his postgraduate project the last 3 months.
It was a Java based program made in Processing. Though I am not a Java developer and I never used processing before, it wasn't that hard to write the logic of the program.
I noticed that sometimes Java made me use loops for almost everything.
Also I had to communicate between server and client via JSON but I had to write it manually as string due to the lack of keys in Java.
The main trial though was with the logic of the project. It was supposed to be made as a framework to be extended from custom user classes. I had to change the core classes I made many times because the user class had methods that should run while the parent class didn't have them declared. That could be my fault for not knowing how to write desktop application framework but you can't expect a framework to be extended in a compiled state, or so I think. Processing on the other hand doesn't seem to like the idea of an external java library. At least it didn't workout for me, it should be able to work normally.
In the end the project was never as completed as we wanted. It could rum a basic sim but we hadn't the time to test other possibilities. -
First development job I had, I wasn't allowed to use LINQ. According to my boss, it was the "lazy" way. So many for loops :(1
-
I'm still a beginner for programming, I got the basics (for JavaScript) down but I don't really know how or where to use it, like loops(for, do while), return, and stuff like that.
Going through the books and online exercises they just make you do the basics like loop a number 10 times to print out 0-9 or something like that. And the return keyword I usually forget about because I've never been told how I can actually use it for something.
I want to learn how I can use all of these and when I can use them, is there any books, videos, or courses I can look into? I'm sorry, this is probably a Sinbad question but I am just trying to get as much help as I can2 -
Did an assignment where we had to emulate deadlock using C and openMPI, I wanted to make a generalised resource manager process and create deadlock by locking some resources using the other processes, but my teammate said that would be too hard and instead the resource manager was hardcode with for loops for the number of transactions we were gonna make cause it was just a proof of concept.
Then my marker literally leads with, let me tell you the story of a good programmer, and a better programmer. The good programmer writes a function called destroy_earth(), but the better programmer writes a function called destroy_planet(earth) and passes in earth. I sighed so fuckin hard, I should have spoken up. -
While learning Java back in campus and you were the only one who could nest some for loops and create some pyramid stars and the lecturer was on you to(Java Ninja) explain it to fellow classmates that felt good.
-
First assignment after I learned about if-else-then and for loops: draw swastika with modifiable width variable2
-
I have no specific story to tell (for now. Will post ke if i remember one) but i have had tons of CS teachers that are shit. From ones who don't know shit to ones who are so bad as a human being i am sure thrte are hundreds of people out there to kill them. I have had multiple teachers where all they did was read out a book and we'd have o site everything they read. Whole fucking semester. And not just one person or once. M-U-L-T-I-P-L-E TIMES AND TEACHERS. then I ve had ones who would rejection my code even if it's better, is right, can andle more edge cases, most likely magnitfrs of times faster and isn an eye sore with just effig if-else on op of if-else nested within if-else with many for loops. Then there are those who want you to do just what they want and expect you to not have a life of your own. Those who blatantly abuse their powers. Those who couldn't care less. Those who are not that bad a teacher but their attitude and style just makes you want to leave. There's one currently who wants a group of 4 people in second year to develop a full blown industry level application in mere 3 weeks. AND WE ARE HAVING OUR THEORY PAPRRS INBETWEEN FOR 2 EFFING WEEKS. So that's just like a month. Fortunately I have a group that's good enough that I can have them do the testing and filling up the documentation (did I mention that he needs full documentatiin for software plus a report on how our development process) and have them work on presentation (yup. We need to present this thing) all for just 50 marks. 1 uni credit. Our system still gives 80% weightage to pure theory. Plus the practical part is somewhat theory too.
Our HOD wants us *insists*forces** to stay back at college and work on projects (which is nice but what he ments is use the shitty outdated books from early 2000s to study something). Now I'd be happy to stay back if college provided decent internet (I am not asking for gigabit speeds. Even 1-2Mbps would work) and place to sit. But nope, our college non-teaching staff is eager to send us out of their department and by extention college building. There is literally nowhere you can sit. Plus yup, there is no internet and nowhere for you to plug your laptop in. That's a moot point anyway because they don't want you to use your laptop in college library or anywhere anyways. Plus you don't get much of mobile data too because of the building design. Those work only near windows. Why would I be at college if I can get a 50+Mbps down, area to sit, snacks, port to charge all at home. And you'd say we should talk with him about this – well it's not his issue is all he has to say.
Well, such is life in Indian colleges. And my college/uni is one of the better ones.1 -
Okay so update/JS pt2
This is just me throwing my thoughts down and some questions
I've been practicing arrays/objects and loops more and I'm getting more understanding it helps that you can do them both at the same time. But like I need more looping techniques (if that makes sense) like instead of always using for(let i = 0; i <= x.length; i++) and I havent completely learned how or when I use for(x in y)
Questions.
• what's the difference between class objects and objects that look like a python dictionary
• when should I use classes over the other kind of classes
• any good resources and projects I can practice with loops cause I'm kind of running dry on ideas
and I dont wanna google cause I barely already have no social interaction2 -
Entropy wins. More useless accumulated historical nonsense in each programming language. Complex software stacks impossible to reach the bottom. However C and C++ still there possibly even some Cobol and Fortran zombies. And we devs still writing our ifs and loops for that kind of legacy stuff.
-
Why I love to code?
1. The only thing I feel like I have control over (thanks to control loops XD).
2. Feeling like god when my code works.
3. I just love it, no reason needed, just pure love for it.1 -
Let's start by saying that I fucken know nothing.
Not even how to fucken start this rant.
I have to build a simple game for a university project.
In Java.
Since everyone in my team chose plain swing/awt, and for many other reasons, I jumped on that band wagon.
Knowing myself and that I quit the project last year, I chose an extremely simple type of game with very simple goals and Use-cases.
So far so good.
Logic, layer, and nearly everything else is nearly finished.
Since about 3 month.
Friends helped me restructure my game for better layer separation and I couldn't be happier with how that turned out.
But all those 3 month, my main problem has persisted.
I can't get it to draw a thing on the jframe.
For 3 month.
3 fucken month.
And now I don't even get a jFrame anymore.
WHAT THE FUCK
Git, tell me, what have I changed?
...
Nothing related to construction of the frame?
Ok, I removed a call to repaint there.
Let's putt it back.
NOPE, no JFrame.
What the actual fucken hell?
This is where you can stop reading, after this there will only be me crying about everything.
Sweet tears. 😭
In-between I got a frame, and something was drawn onto it.
But only on construction.
I couldn't get the paint chain to run a single time after that.
I have a nice thread with some loops that is supposed to update the logic and make a call to repaint/ update/ refresh the frame so that the game runs nicely with 60fps.
Logic works fine, but no call to what ever does anything related to painting.
This morning I had the idea that it might be because of the thread.
Refactored that the game loop runs in the main thread and here I now am without a jFrame.
And still 3255 letters to go.
I don't even even even even even..,...rant wtf fuck fucking fuck fuck! java nojframe jframe wth what the fuck pls kill me java swing java awt5 -
Does anyone here know how to set up windows 10 bootloader files?
So I wiped my laptop clean, installed windows, installed manjaro, and deleted window's ESP for shits and giggles. Then I tried using bcdboot to restore bootloader files in the ESP I put GRUB in, which got windows 10 on the GRUB but selecting it loops me back to it. Whatdoido.6 -
I saw some game maker software (Klik & Play for the nerds), in a super market budget section and pestered my mum to buy it for weeks, got it, after a year of playing about started to read and found out about for loops & functions..... My software didn't have these as it was just creating actions for game events, very limited... Realised my games (if you could call them that) could be so much better with more control and started to look into languages like BASIC, the rest is my history :)
-
Just spent 30 minutes trying to work out how to do my dev terminals rendering in it's main for loop...
Only now just realised I should probably use 2 seperate for loops and rendering layers for the background and text... Well done dickhead -
A v dumb C language question....
Consider this code snippet:
{
while( getchar() != EOF )
printf("a");
while( getchar() != EOF )
printf("b");
}
Is there some way to get inside the second loop? After I input some text, ctrl+D sends in the text stream and loop 1 executes, then the control waits at the test for loop 1 again, pressing ctrl+D again triggers EOF, but it ends up skipping all loops after24 -
jinja templates make me look towards html in a whole new light. are we 'inserting' data to an already rendered page? am i really mixing server code with ui ? It doesn't feel so. there are if else and loops being executed for html code, like wtf?
I don't know but everything feels so good. like i was literally hating every piece of website i was writing in php. everytime i wrote <div>....</div> followed by <?php ... ?> followed by another html tag /php tag in a fuckin php file, i wanted to kill someone from w3c.
WHY THE FUCK ARE WE ALLOWING THE MIXUP ?WHY IS PHP FILE HOLDING HTM TAGS? WHY?WHY?WHY?
But this... this is beauty. their is separation of concerns. jinja has some big powers, we can loop, repeat, make clauses, inherit other html classes, load html content into blocks, set variables,
but main concepts like file handling, response/request handling,calculations,etc are all being done in separate python files. I know that these jinja templates also might be running python in background, but atleast a developer cannot fuck up that code.
we can be sure that if correct jinja codes are written in html, then it would load correctly. And wherever devs doesn't fuck up, the output is better to understand and more maintainable/scaleable3 -
Had a new assignment(in liberty basic) in my computer studies course:
Ask user for the name of their favourite cartoon character. Then have the name move across the terminal screen with a once second delay.
So I spent about 30 minutes trying to find some sort of delay function in liberty basic. Finally I stopped using a for loop and instead move that code into a subroutine and tried to use the timer to run it every second.
Didn’t work.
So I finally gave in and asked the teacher. He explains for loops to me(after thoroughly investigating my keyboard(which is the same as his) for the cap locks key) and then use a incrementing for loop to 500000 as the delay. Next he told me that it felt like a second and he left.
Later he checked up on me making sure I understood. -
What things do you keep in mind when learning a new language, when your main goal is to use it in building projects in a framework?
For eg i am beginning to learn flutter and i am finding a need to learn basic dart things like creating variables, loops, classes, functions, constructors, etc...
What are the most important "language concepts" if you may say it that?1 -
TL;DR I just recently started my apprenticeship, it's horrible so far, I want to quit, but don't know what to do next...
Okay, first of all, hey there! My name is Cave and I haven't been on here for a while, so I hope the majority of you is doing rather okay. I'm programming for 6 years now, have some work experience already, since I used to volunteer for a company for half a year, in which I discovered my love for integrations and stuff. These background information will probably be necessary to understand my agony in full extend.
So, okay, this is about my apprenticeship. Generally speaking, I was expecting to work, and to learn something, gaining experience. So far, it only involved me, reading through horrible code, fixing and replacing stuff for them, I didn't learn a thing yet, and we are already a month in.
When I said the code is horrible, well, it is the worst I have ever seen since I started programming. Little documentation - if any -, everywhere you look there is deprecated code, which may or may not been commented out, often loops or simply methods seem to be foreign for them, as the code is cluttered with copy paste code everywhere and on top of that all, the code is slow as heck, like wtf.
I spent my past month with reading their code, trying to understand what most of this nonsense is for, and then just deleting and rewriting it entirely. My code suddenly is only 5% or their size and about 1000 times faster. Did I mention I am new to this programming language yet? That I have absolutely no experience in that programming language? Because well I am new and don't have any experience, yet, I have little to no struggle doing it better.
Okay, so, imagine, you started programming like 20 years ago, you were able to found your own business, you are getting paid a decent amount of money, sounds alright, right? Here comes the twist: you have been neglecting every advancement made in developing software for the past 20 years, yup, that's what it feels like to work here.
At this point I don't even know, like is this normal? Did git, VSCode and co. spoil me? Am I supposed to use ancient software with ancient programming languages to make my life hell? Is programming supposed to be like this? I have no clue, you tell me, I always thought I was doing stuff right.
Well, this company is not using git, infact, they have every of their project in a single folder and deleting it by accident is not that hard, I almost did once, that was scary. I started out working locally, just copying files, so shit like that won't happen, they told me to work directly in the source. They said it's fine, that's why you can see 20 copies of the folder, in the same folder... Yes, right, whatever.
I work using a remote desktop, the server I work on is Windows server 2008, you want to make icons using gimp? Too bad, Gimp doesn't support windows server 2008, I don't think anything does anymore, at least I haven't found anything, lol.
They asked me to integrate Google Maps into their projects, I thought it is gonna be fun, well, turns out their software uses internet explorer 9.. and Google maps api does not support internet explorer 9... I ended up somehow installing CEF3 on that shit and wrote an API for it in JS. Writing the API was actually kind of fun, but integrating it in their software sucked and they told me I will never integrate stuff ever again, since they usually don't do that. I mean, they don't have a Backend as far as I can tell, it looks like stuff directly connects with their database, so I believe them, but you know... I love integrating stuff..
So at this point you might be thinking, then why don't you just quit? Well I would, definitely. I'm lucky that till December I can quit without prior notice, just need a resignation as far as I can tell, but when I quit, what do I do next? Like, I volunteered for a company for half a year and I'd argue I did a good job, but with this apprenticeship it only adds up to about 7 months of actual work experience. Would anybody hire somebody with this much actual work experience? I also consider doing freelancing, making a living out of just integrating stuff, but would people pay for that? And then again, would they hire somebody with this much experience? I don't want to quit without a plan on what to do next, but I have no clue.
Am I just spoiled, is programming really just like that, using ancient tools and stuff? Let me know. Advice is welcomed as well, because I'm at a loss. Thanks for reading.10 -
The Code Abyss Beckons! 🤯
Hey fellow devs, brace yourselves for a wild ride into the chaotic realm of code confessions and debugging dramas! 🎢💻
So, here I am, standing at the precipice of my latest coding adventure, armed with a keyboard and a questionable amount of caffeine. 🚨☕
Today's quest involves unraveling the mysteries of a legacy code that seems to have been written in a language only decipherable by ancient coding sages. 😱📜
As I navigate through the nested loops of confusion and dance with the dragons of runtime errors, I can't help but wonder: Is this what the Matrix feels like for developers? 🕵️♂️💊
In the midst of my debugging odyssey, I stumbled upon a comment in the code that simply said, "// Abandon hope, all ye who enter here." 🏴☠️📛 Well, isn't that reassuring?
And then there's the moment when you finally fix that elusive bug, and you feel like you've just tamed a mythical creature. 🦄✨ Victory dance, anyone? 💃🕺
But let's not forget the rubber duck sitting on my desk, patiently listening to my monologues about algorithms and existential coding crises. 🦆🗣️
So, dear coding comrades, how's your journey through the code abyss going? Any epic wins or facepalming fails to share? Let the rants flow like a river of improperly closed tags! 🌊🚫
May your semicolons be where they should and your documentation be ever truthful. Happy coding, and may your merge conflicts be swift and painless! 🌈🤞
#CodeOdyssey #DebuggingDrama #DevRantChronicles9 -
Could it be, that we use i for incremental loops because it's an abbreviation for iterator (or increment)? 🤔 Why haven't I though of this sooner?!8
-
MySejahtera is not a good appliaction at all! They just use Sqlite or Shared Preferences in the app for keeping the data local. (Just local?) As soon as you clear cache or data, The user no longer exist! Like wtf ?
So I decompile the app and review the source code, the code is not even properly obfuscated(That's why I can read it). There's a part of the code on a for loop went
```
for (int i = 3; i < array.length(); i++)
{
for (int j = 2; i > array.length() *2; j ++ )
{
onScan();
}
}
```
Which is unacceptable!
First , why nested for loops?
Second, instead of declare 'array.length()' multiple times why not declared it global for once?
No wonder the initial state of the app is buggy as hell.8 -
Be me.
Writing a java class for uni work, that'll eventually run on android.
I get kicks from making functions work using as few steps as possible, using minimal code.
Explain to someone how I'm doing it.
I learn that loops and the rest of it generate more code and take longer than unwrapping the loop and writing every case manually.
Shit ffs I spend hours making my code more concise :(
Then, I'm told the recursive method I'm using for checking for a win is too complicated, that I shouldn't start looking for a win from the last counter I placed, but should scan the WHOLE board for a win in every angle.
Eat my food, open my beer, pet my dog, trundle off back to work. -
Ok. I GIVE UP! ...for at least a couple hours...
I'm not a big believer in... well anything suitable to the literal definition of believe. But there's only so much 'wtf? How is this even possible?' and any answer u can come up with is nearly statistically impossible...
I am a neuro-atypical (and just extremely atypical even if i somehkw was neurotypical) being, based on logic, finely calculated statistical probability and the most raw data and as unbiased as realistically possible, algorithms and interpretation (usually recursive pattern recognition with several highly detailed historical sources.
...but at some point statistical improbability and a collation of separate, yet relatively closely occuring events/circumstances makes logic, itself a primary suspect of corruption.
What was the breaking point that caused me to (temporarily) give up and tell logic to f off for a bit cuz maybe the illogical and mythical is the real logic, leaving me in a losing battle with 'the' fates?
Trying to get all my sourcing/purchase orders in/paid for/on the literal boats b4 end of the workday/week in china...
1st, had to drop a supplier cuz they have limited reps. When the one ive had 7+ years left, i got the aloof blonde girl societal trope of a rep... who for the 2nd time (despite the several very blunt complaints above her, incl me) she sent out a promotional update to the entire client list (ie, inherently competitors) as CC not BCC... over 200 business email accounts with tailored info of their sourcing.
2- totally diff company/ industry a former rep i was glad be rid of apparently just sfarted back for "awhile" as i needrf to restock/scale...apparently she forgot everything we discussed at length... lke if you want a chance on my business im not gonna be wasting time looking through your gui "mini store to then inquire about everything individually insead of a simple spreadsheet(which i print and put in a 3-ring binder rotating current catalogues in the same format i require everywhere)
3.dog was an ahole, my packed schedule got delayed and morphed.. a bunch of little bs thatd normally have no extra thought impact, hyperfocused forgetting one of my alarms til i realised my idiopathic fever was back and i didnt take/apply meds (pain/muscle relaxers mainly so despite this odd free time and needing to shower. I gotta sit on my rear, leg elevated/non-productive far 40min b4 i can shower (as functional legs and lack of syncope is almost a req to shower)
4. A new-ish rep of a company/factory i like/respect enough to not mention in relation... he makes invoice 1.. slight error thst was easily resolved...#2 was flawless... he goes to officially generate the contract(alibaba... verrrry simple with lots of extra explanation buttons). Price and all items match, its near workweek end so i was waiting for it so i could quickly pay/have it on the boat b4 it left and few fdav days are behind...
I put in card info, get to the 2 cbeck boxes (imo should be only 1 but whatever) asking if billing address is same ss delivery(its always default yes)... then i see a few lines in chinese (i can read enough for business negotiations... typical words/sentences innately look different than things like individual letters/address and postal indicators.) After a few loops of double checking, mentally trying to dismiss my i Intial judgement cuz it'd be too ridiculous... even resorted to google .... nope... initial wtf was spot on... recipient name/address was indeed the company(multi factory producer)i was purchasing a wholesale, via sea freight, bulk of products from.
Im pretty sure the system would've flagged it as an invalid contract within an hr... but seriously... ive been handling alibaba (and other) international sourcing since before high school(mainly small businesses i made sites/little tools for that found anything with a light up screen intimidating) and a purchase then shipment to the originating company/factory actually entered into a contract(the form is sooo simple)... im faced with ridiculously improbable obstacles actually existing and changing in such nonsensical statistically improbable ways so often that 1. I wouldn't trust a dr (or most humans) that didnt 1st assume i was crazy of some form...unfortunately im not, despite hkw much simpler and probable itd be 2. Id be super suspicious/converned if statistic norms were my norm for over a day.
But seriously wtf???
Someone give me some wisps of a frame of ref here... where's a typical 'fuck this, im out!' Breaking point?1 -
It's so easy to use for-each loops instead of if-else chains, yet when I write a system in for the first time, I always find myself doing the latter.
"It's placeholder code" saves me every time as long as I rewrite it later.6 -
You know how the machine learning systems are in the news (and Ted talks, tech blogs, etc.) lately over how they're becoming blackbox logic machines, creating feedback loops that amply things like racism on YouTube, for example. Well, what might the ML/AI systems be doing with our code repositories? Maybe not so much yet, I don't know. But let's imagine. Do you think it's probably less worrisome? At first I didn't see as much harm potential, there's not really racist code, terrorist code, or code that makes people violence prone (okay, not entirely true...), but if you imagine the possibility that someone might use code repositories to create applications that modify code, or is capable of making new programs, or just finding and squishing bugs in code algorithmically, well then you have a system that could arguably start to get a little out of control! What if in squashing code bugs it decides the most prevalent bugs are from code that takes user input (just one of potentially infinite examples). Remember though, it's a blackbox of sorts and this is just one of possibly millions of code patterns it's finding troublesome, and most importantly it's happening slowly (at first). Just like how these ML forces are changing Google and YouTube algorithms so slowly that many don't notice the changes; this would presumably be similar and so it may not be as obvious as one would think. So anyways, 'it' starts refactoring code that takes user input into something 'safer'. Great! But what does this mean? Not for this specific example really, but this concept of blackbox ML/AI solutions to problems we didn't realize we had, what does a future with this stuff look like (Matrix jokes aside)? Well, I could go on all day with imaginative ideas... But talking to myself isn't so productive, let's start a fun community discussion here! Join in if you find this topic as interesting as I do! :)
Note: if you decide to post something like "SNN have made this problem...", or other technical jargan please explain it as clearly as possible. As the great Richard Feynman once said, the best way to show you understand a thing is to be able to explain it clearly to others who don't understand it... Or something like that ;)3 -
Just something I've been thinking on for a while:
How could programming be done if we couldn't use ordinary if-statements (but functional set operations such as map, filter, with an if- in the lambda function etc. is alright).
Could it work? Also would it be possible to reduce the amount of while loops by using functions for most of the "loop situations" as well?4 -
when manager recommends you use the wrong role for a job and then it loops all the way back they give you feedback when fixing it that they thought you were using the correct role1
-
Why are there so many template languages? Do people enjoy them? I certainly don't.
What is the problem with just using functions? E.g. using https://j2html.com/ or http://www.lihaoyi.com/scalatags/
You can do code reuse with functions, for-loops, classes, interfaces etc.
Why are they avoided in Spring, PlayFramework and similar? -
I got to a point where I have a multi-level recursive promises within loops and my mental map is by far not enough to process this. I wish there were some visualisation tools for this - though I don't even know how it could look like. All I know is that at some point I'm returning a wrong promise and the recursion is not correctly handled.7
-
We had to choose a workshop class for middle school and I chose computing because I was already familiar with all the components, but the last year we learned QuickBasic so that's where I learned programming logic. Later in highschool we had a bit of Visual Basic and HTML. Then learned some C and Java in college.
The truth is that I never learned any language in-depth and I've been winging it with the basics for longer than I should. A good understanding of loops and control flow lets you get away with a lot of things. -
I took a career transition last year and I'm starting to question my decision. I'm stuck.
I've only learned to hack shit together in my past jobs (except one freelance project where I pretty much learned most of what I now properly know), exposing me to bad practices. To make it worse, I lack fundamentals and basics so can't even write JavaScript beyond for loops without documentations.
Lately I've been pushed to take charge in structuring a project from scratch. I failed at understanding what exactly Webpack does mainly because it required knowledge of web modules which I still find elusive. I make time to learn basics in the evening or weekends but most of the time I'm taking home the internship work project that I, again, just need to hack shit together, depleting my energy by the end of day.
Now I'm at the stage where I need money, for which I'm thinking of applying for waitressing or entry-level marketing jobs. I'm shit scared that I'll never break into the industry and will just end up living day by day feeling unfulfilled.
I'm so tired of trying.2 -
!rant
You know, for the first time, I have had issues diagnosing an error (due to not having slept in about 75 hours due to the CEO slamming down on me to finish a project), and I posted on a forum. First time doing that, and they are fucking useless.
I may as well have delved into google and tries to diagnose the error. Done so, but you now what I find? People with the same fucking error, but no fucking resolution.
Stupid issue is a desktop support one, bloody Ubuntu won't install (gives me a shitty error and then loops back to installation post restart of my laptop. More than sure it has something to do with my graphics card).
Laptop decided to crash at the last moment, hence me installing Ubuntu again. Fucking errors, fucking help forums not helping, and fucking tiredness. On the plus side, coffee has kept me going longer than I thought. -
What's it called when you count down to 0 for your versioning instead of up. Once you get to 0 your software updates freezes. I tried searching online but I keep getting counting for "for loops." This is eating at me lol.
-
me vs my job at mnc laggard part 9/n . previous @ https://devrant.com/rants/6602068/...
====
I think i have now realised why working at corporate MNC sucks: they are reluctant to make a good product for their end users.
- they first come up with feature without a proper planning and research.
- then they are in a rush to release it to live audience by ignoring the possible issues that could arise
- when they see it fail, they are like, okay with that and blame it as a failed experiment
- instead of removing/disabling it, they are okay to keep it remain alive in the app, even if it causes customer inconveneience.
- meanwhile, they put false reports for their higher managers as a success and when an enhancement/modification comes for that feature from the higher up, they again start the loop by pushing a new feature without proper planning and a rush
as a dev, it fuckin kills me. I joined in the middle of one of these ugly loops. The app has a camera feature where the camera will generate voices to take pictures and record video , like "goto next car view" , "close the bonnet and focus", etc while the user follows instructions.
the ticket for me was to just add a flash button to this camera. But the more i dive into it, the more i hate it:
- the existing camera implementation provides api for toggling a camera flash, but when i attached it with a ui button, it would not work
- the existing implementation will send images /videos as direct payload data, resulting in generating very large payload curls . our app has a curl logger and it starts crashing.
- the existing implementation also crashes at uploading videos.
So where does it trouble me?well, I have a ticket to add just a fucking button, but i will have to replace the whole camera module and start from scratch. also the crash causing loggers will need some workarounds, otherwise i could not check the apis. and my manager will be like "why are you taking so long to add a flashlight?" and i would be like "coz i wanna put this flashlight up your -2 -
Why does every programming language have to have so many different ways of doing the same thing? I mean, come on, do we really need both for and foreach loops? And why do we have to choose between switch and if-else? Can't we all just get along and use the same damn structure? #FirstWorldProblems30
-
I am a student from IADT and I do not understand for loops and think that I failed my programming test7
-
so.
i had a stupid idea that'd let me do a project i had planned and abandoned a while back after getting experience with the new project.
problem: detect and manage empty space in a massive file, allow adding data to those empty spaces from files, and fill in a table in a designated empty space with where dynamically-loaded things are. In Python.
I tried JUST detecting empty space, and Python would break out of loops for no reason at all just at random. "run bottom to top through this file until a non-00h byte is found" would either break out of the loop way earlier than should be possible (8 or 9 bytes into a 32KB empty file) or run way into non-zerofill areas before breaking the loop.
Am I just retarded? Is this more Python conditional fuckery? i'm so lost that it's just on hold for now (and i think i lost that script too) -
Whenever I rant about JavaScript and it's terrible way of doing things differently and totally illogical in the way real programmers would do things versus webdev-scriptkiddies...
Whenever I laugh about these engineers who can only 'code' in Matlab...
Whenever I hear people consider configuring (of stuff like WordPress or RGB-Keyboard-Lights etc.) as 'programming'...
I wonder, if I'm just like the 'Real Programmers' back in 1983 who truly considered Fortran or Assembly to be much more superior than Pascal and someone who coded in the latter or even used a simple OS like UNIX couldn't get accepted as a programmer.
Found that old article about "Real Programmers".
It's worth a read.
http://pbm.com/~lindahl/...
Just consider someone writing modern computer programs without libraries, ifs, for loops and only gotos by hand from top to bottom...
Some day I want to start some modern project everyone else would do in some random modern scripting language and hack it down in assembly just for fun and to tell people, I did it. So I could call myself a Real Programmer too.2 -
Being new to NodeJS, I wanted to use the framework for a small script that involved connecting to a MySQL database and updating 1500+ records.
With NodeJS's preference towards functional programming over sequential, I wanted to do things the NodeJS way with callback functions instead how I'm used to doing it, using loops (and all the MySQL functions were async).
I couldn't update all the rows at once, so I wrote a callback function that calls back itself after the SQL statement is executed. A recursive callback function... am I doing this right?7