Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "code coding problem help"
-
Worst thing you've seen another dev do? Long one, but has a happy ending.
Classic 'Dev deploys to production at 5:00PM on a Friday, and goes home.' story.
The web department was managed under the the Marketing department, so they were not required to adhere to any type of coding standards and for months we fought with them on logging. Pre-Splunk, we rolled our own logging/alerting solution and they hated being the #1 reason for phone calls/texts/emails every night.
Wanting to "get it done", 'Tony' decided to bypass the default logging and send himself an email if an exception occurred in his code.
At 5:00PM on a Friday, deploys, goes home.
Around 11:00AM on Sunday (a lot folks are still in church at this time), the VP of IS gets a call from the CEO (who does not go to church) about unable to log into his email. VP has to leave church..drive home and find out he cannot remote access the exchange server. He starts making other phone calls..forcing the entire networking department to drive in and get email back up (you can imagine not a group of happy people)
After some network-admin voodoo, by 12:00, they discover/fix the issue (know it was Tony's email that was the problem)
We find out Monday that not only did Tony deploy at 5:00 on a Friday, the deployment wasn't approved, had features no one asked for, wasn't checked into version control, and the exception during checkout cost the company over $50,000 in lost sales.
Was Tony fired? Noooo. The web is our cash cow and Tony was considered a top web developer (and he knew that), Tony decided to blame logging. While in the discovery meeting, Tony told the bosses that it wasn't his fault logging was so buggy and caused so many phone calls/texts/emails every night, if he had been trained properly, this problem could have been avoided.
Well, since I was responsible for logging, I was next in the hot seat.
For almost 30 minutes I listened to every terrible thing I had done to Tony ever since he started. I was a terrible mentor, I was mean, I was degrading, etc..etc.
Me: "Where is this coming from? I barely know Tony. We're not even in the same building. I met him once when he started, maybe saw him a couple of times in meetings."
Andrew: "Aren't you responsible for this logging fiasco?"
Me: "Good Lord no, why am I here?"
Andrew: "I'll rephrase so you'll understand, aren't you are responsible for the proper training of how developers log errors in their code? This disaster is clearly a consequence of your failure. What do you have to say for yourself?"
Me: "Nothing. Developers are responsible for their own choices. Tony made the choice to bypass our logging and send errors to himself, causing Exchange to lockup and losing sales."
Andrew: "A choice he made because he was not properly informed of the consequences? Again, that is a failure in the proper use of logging, and why you are here."
Me: "I'm done with this. Does John know I'm in here? How about you get John and you talk to him like that."
'John' was the department head at the time.
Andrew:"John, have you spoken to Tony?"
John: "Yes, and I'm very sorry and very disappointed. This won't happen again."
Me: "Um...What?"
John: "You know what. Did you even fucking talk to Tony? You just sit in your ivory tower and think your actions don't matter?"
Me: "Whoa!! What are you talking about!? My responsibility for logging stops with the work instructions. After that if Tony decides to do something else, that is on him."
John: "That is not how Tony tells it. He said he's been struggling with your logging system everyday since he's started and you've done nothing to help. This behavior ends today. We're a fucking team. Get off your damn high horse and help the little guy every once in a while."
Me: "I don't know what Tony has been telling you, but I barely know the guy. If he has been having trouble with the one line of code to log, this is the first I've heard of it."
John: "Like I said, this ends today. You are going to come up with a proper training class and learn to get out and talk to other people."
Over the next couple of weeks I become a powerpoint wizard and 'train' anyone/everyone on the proper use of logging. The one line of code to log. One line of code.
A friend 'Scott' sits close to Tony (I mean I do get out and know people) told me that Tony poured out the crocodile tears. Like cried and cried, apologizing, calling me everything but a kitchen sink,...etc. It was so bad, his manager 'Sally' was crying, her boss 'Andrew', was red in the face, when 'John' heard 'Sally' was crying, you can imagine the high levels of alpha-male 'gotta look like I'm protecting the females' hormones flowing.
Took almost another year, Tony released a change on a Friday, went home, web site crashed (losses were in the thousands of $ per minute this time), and Tony was not let back into the building on Monday (one of the best days of my life).10 -
TLDR: I wrote one of my firsts codes to help my father. Was really excited after it worked, nobody cared. F*ck them (not really).
So my father comes and says he needs me to help making a simple presentation. Just a title and slides with images. It seemed to be an easy task so I'm like "sure, why not?". So I told him to email the images and I would have the presentation made in no time. The next day I recieve like 30 mails containing from 4 to 10 photos of boats (yes, boats). I stay chill and have the brilliant idea of automating the process with python, just to learn a bit more.
I took some to read the documentation of the modules I was going to use, then write a simple code and bam! In 3 hours I have a presentation with images in it. I open it, every image was 4 times the actual slide and all of the images were randomly rotated, it still was the most rewarding moment I've had in months :') I wanted to show it off to my brothers, so they came to my desktop, saw it and all I recieve was a "cool". Not a good "cool", a "meh" kind of "cool". So I thought it was because of the size bug.
Fastfoward some hours, now every image gets scaled into the slides prefectly, in the correct angle, etc. I tell my dad what I made and he says "yeah sure, the problem is that I need you to give them to have subtitles". He wasn't even impressed. My heart hurt a bit.
I could totally automate the subtitles too (and did it), but what hurt the most is that nobody cared for what I was so pationate about. I'm so fascinated with coding that it replaced all my gaming habits, and now all I do is learn. I want to dedicate a good portion of my life to this but at that moment it seemed nobody in my family cared about it. So this rant is for all those f*ckers that I love but don't know how much my code means to me.21 -
I recalled a seemingly simple task I took on.
We were building a booking system, and I had to figure out how to retrieve bookings by a certain date range.
Upfront, the tasked seemed simple until I realised I had to both figure out the logic and the SQL statements needed to retrieve all bookings within a certain date range in one query.
I ended up drawing a model to help me visualise the various date-range criteria to be satisfied. And used unit tests to help me think through each date range criterion and make sure they were accurate. Some were obviously from paranoia, but better to be safe than sorry...
After that, I had wrote down raw SQL directly into Sequel Pro first to make sure my query logic was accurate too, before translating into something the ORM equivalent. This was when I learned how to define and use variables in SQL. The variables were throw-away code; I just didn't want to have to hard-code the test date-ranges over and over again; minimise chances of spelling errors.
Needless to say, felt my problem-solving skills went up one level after this task. Saw my coding style and unit tests improve. And also the thought processes that go into how to maintain code quality...4 -
Story Time. Inspired by another rant.
Context: I'm In a coding camp years ago, it's the first day.
We're doing introductions (name, why you're here, etc). Always fun to do that....
The folks running the camp are excited to introduce a student who also at one point was a teacher for some sort of girl power coding organization. So this raises questions, why would someone who teaches be a student in this camp?? And even a bigger question is raised when this person introduces themselves for a long time, and as an aside puts down the girls she taught in this program they taught ... like who does that?
horribleLady does that ...
A few hours later horribleLady asks her 12th question of the day (we haven't even started talking about code). Before she asks her question actually says:
“I know, I’m going to be a problem.” -laugh-
🚨🚨🚨 ヽ ( ꒪д꒪ )ノ 🚨🚨🚨
Fast forward to group projects and she's this sort of emotional storm, tears, and a sort of angry shouting that isn't angry enough for some folks to say she's yelling at people ... but she is. Fortunately I'm not in the first group project with her, but because we're all working in the same room we all get to see the train-wreck unfold.
The moment she doesn't get something (all the time) everyone in her group has to STOP and figure out what they're going to do about it, then again STOP because she thinks someone is doing something different than what was planned. STOP STOP STOP STOP STOP.
In a way, everything had to go through her, she didn’t declare it that way, she didn't present herself as any sort of authority, she would just stop everyone the moment she thought anything was wrong, or she didn't understand it (all the time), and either inject herself or demand help from her team. Everyone around her had to be drawn into whatever problem she had. It was horrific to watch.
Private slack channels would light up like crazy with "OMG", "WTF", "I DON'T UNDERSTAND HER", "FUCK" and "SHE"S HOW OLD!?!?"
So finally it happens to me and guyWhoDoesPotConstantly (capable guy, nice dude, pretty sure he was high all the time).... we're teamed up to work with horribleLady. Thankfully for just one day. I accept this because I figure one day with her is enough penance to try to avoid any further contact later on.
My approach is straight stone face. I refuse to respond to her sulking, or sighing, or general emotional bait she throws out constantly. I saw other students unwittingly take her bait (they were trying to be helpful) only to have her crap all over them with her frustrations or whatever it is is going on.
Still we're teamed up with her her for the day so I'm going to be a good team member and I explain what guyWhoDoesPotConstantly and I are doing / trying.... and so forth. But she's just too upset that she's even assigned to work with us, and tells me I'm just not doing it right, and her explanations about how we're not doing it right makes less than 0 sense. I ask her to show me what she means but she won't type anything on her keyboard, she'd just talk about how she’s thinking conceptually in circles and sulk about it rather than listen. I don't respond to any of her shit and say "I'm going to try this." and guyWhoDoesPotConstantly and I just keep working.
She would later call the instructor over and complain to him for a while and say: "These guys just get it, they're not helping me, I want to be assigned to another group." She doesn't get her way so she just moves to another table in front of us.
After that day I figured it was a great time to ask .... to NEVER be assigned to anything with her because "If I told her what I thought it would just get a lot worse." I got my way ;)
Other students weren't so lucky. Tears, sulking, her special way of yelling at people that somehow never got her in trouble (she should have been kicked out of the program) just kept going on. She refused to even present one group project she deemed not good enough despite the fact that she contributed nothing functional to the project that the TA's didn't write for her...
Amidst the stories she would tell to students was one of how she sued her totally sexist/racist/evil former employer. She never said what came of it, but that combined with her inability to do things reminded me of a rant I read on here.
I sometimes fear being hired someplace and walking in my first day to find I'm assigned to work with .... horribleLady. In this scenario she managed to get hired and they're too afraid to fire her so they assign the new guy to work with horribleLady...
I've no idea what happened to her after the camp.
(I rewrote this rant a few times because it kept circling back to a larger story about the coding camp I wrote about a few years ago, so if this seemed sort of broken up and wonky, yeah it was / is / yeah)4 -
!rant
Let's take a moment to appreciate interested and enthousiastic non-developers who really want to learn a programming language.
I am studying Medical IT at my college and most of my classmates aren't coming from an IT background.
We're currently working with Java, PHP, JavaScript and some require Node for their semester projects.
Some of my classmates approach me when they're stuck while coding and I try to teach them as much as possible so they understand what they are doing wrong and how to fix it.
I also show them how they can optimise their code step by step and they love it!
As a classmate told me yesterday:
"It's always so much fun working with you. I come up with a small problem, but I end up learning so much more about programming when solving a problem with you. I appreciate that."
It's a mindset I've learned when I was doing my developer apprenticeship back in the day. One of my colleagues told me: "if they want your help because they need a quick fix, tell them to kiss your ass. If you know they've already tried everything they could and ask you specifically because they want to understand what they are doing wrong, they are future developers with great potential, so go teach them."
May the force be with you, my enthousiastic little non-devs ❤️6 -
This just makes me mad every time.
I have a friend who asks for help in coding and just reads and copies my whole code, doesn't even understand what's going on and just copies the whole damn thing (the variable names too). Also, says I don't know how to do it properly because I indent the code and he wants it all in a single line.
If there is any error in the code, just tells me that there is a problem and does nothing and keeps nagging me if I solved the problem every 2 minutes.
Once I solve the problem, just copies the stuff again and then brags to others about the code and takes all the credit.
After bragging, if someone asks him for help he just tried to match the code line by line and worry by word. And tells them their code is wrong if they are using a different method of solving the problem and asks them to do it like him.
Being an introvert, I don't go shoving my stuff in others faces and criticising their code.
But the professor knows I am good, so that works for me. :)17 -
It was friday evening and almost everyone in office had left. I was assigned a bug related to some of my code changes. I called my senior to help me debug (has three years of experience, whereas me having only one year exp, who is also a very good friend of mine *always helps in debugging*).
So the code goes
switch (someEnum) {
case One:
doSomething()
// no break
case Two:
t.x = someEnum
break
case Three:
.....
}
I had recently added new enun One and was reciting the code logic to him as we were looking through code.
Him: Hey you haven't set t.x in case One. How did you miss that?
Me: No look, I haven't but a break on it. It will go ahead and set it in next case.
Him: What are you talking about? if the someEnun is One why would it execute Two case. Lets copy that line up there and try it locally.
Me: No no no wait. Are you saying that groovy doesn't need breaks in switch (Me being new to groovy but good with Java).
Him: Why would you need break in switch case even in Java?
Me: *stares at him*
Him: I'm going to execute a psvm right freaking now.
Me: *while he writes the psvm* Why did you think there were breaks in switch in any code?
Him: Shut up. *writes psvm code cursing me everywhere*
*executes code*
No way. Really??
Me: Tell me why do you think are there breaks in switch.
Him: I though they were to get you out of switch block and not execute the default block.
Me: So were you coding switch until now without breaks?
Him: I don't know man. I'm starting to doubt all the switches I have ever written.
Me: Anyway that's not the problem, so moving on.
*a while later*
Him: If a interviewer would ask me how would you rate yourself in Java. I would be like "Well I worked on various projects for 3 years in Java, but didnt know why we put breaks in switch. So you figure it out yourself."
One of the best moments in office.8 -
About 18 months ago my non-technical Manager of Applications Development asked me to do the technical interviews for a .NET web developer position that needed to be filled. Because I don't believe in white board interviewing (that's another rant), but I do need to see if the prospective dev can actually code, for the initial interview I prepare a couple of coding problems on paper and ask that they solve them using any language or pseudo code they want. I tell them that after they're done we'll discuss their thought process. While they work the other interviewing dev and I silently do our own stuff.
About half way through the first round of technical interviews the aforementioned manager insisted we interview a dev from his previous company. This guy was top notch. Excellent. Will fit right in.
The manager's applicant comes in to interview and after some initial questions about his resume and experience I give him the first programming problem: a straightforward fizzbuzz (http://wiki.c2.com/?FizzBuzzTest). He looked as if the gamesters of Triskelion had dropped him into the arena. He demurs. Comments on the unexpectedness of the request. Explains that he has a little book he usually refers to to help him with such problems (can't make this stuff up). I again offer that he could use any language or pseudo code. We just want to see how he thinks. He decides he will do the fizzbuzz problem in SQL. My co-interviewer and I are surprised at this choice, but recover quickly and tell him to go ahead. Twenty minutes later he hands me a blank piece of paper. Of the 18 or so candidates we interview, he is the only one who cannot write a single line of code or pseudo code.
I receive an email from this applicant a couple of weeks after his interview. He has given the fizzbuzz problem some more thought. He writes that it occurs to him that the code could be placed into a function. That is the culmination of his cogitation over two weeks. We shake our heads and shortly thereafter attend the scheduled meeting to discuss the applicants.
At the meeting the manager asks about his former co-worker. I inartfully, though accurately, tell him that his candidate does not know how to code. He calls me irrational. After the requisite shocked silence of five people not knowing how to respond to this outburst we all sing Kumbaya and elect to hire someone else.
Interviews are fraught for both sides of the table. I use Fizzbuzz because if the applicant knows how to code it's an early win in the process and we all need that. And if the applicant can't solve it, cut bait and go home.
Fizzbuzz. Best. Interview. Question. Ever.6 -
Okay guys, this is it!
Today was my final day at my current employer. I am on vacation next week, and will return to my previous employer on January the 2nd.
So I am going back to full time C/C++ coding on Linux. My machines will, once again, all have Gentoo Linux on them, while the servers run Debian. (Or Devuan if I can help it.)
----------------------------------------------------------------
So what have I learned in my 15 months stint as a C++ Qt5 developer on Windows 10 using Visual Studio 2017?
1. VS2017 is the best ever.
Although I am a Linux guy, I have owned all Visual C++/Studio versions since Visual C++ 6 (1999) - if only to use for cross-platform projects in a Windows VM.
2. I love Qt5, even on Windows!
And QtDesigner is a far better tool than I thought. On Linux I rarely had to design GUIs, so I was happily surprised.
3. GUI apps are always inferior to CLI.
Whenever a collegue of mine and me had worked on the same parts in the same libraries, and hit the inevitable merge conflict resolving session, we played a game: Who would push first? Him, with TortoiseGit and BeyondCompare? Or me, with MinTTY and kdiff3?
Surprise! I always won! 😁
4. Only shortly into Application Development for Windows with Visual Studio, I started to miss the fun it is to code on Linux for Linux.
No matter how much I like VS2017, I really miss Code::Blocks!
5. Big software suites (2,792 files) are interesting, but I prefer libraries and frameworks to work on.
----------------------------------------------------------------
For future reference, I'll answer a possible question I may have in the future about Windows 10: What did I use to mod/pimp it?
1. 7+ Taskbar Tweaker
https://rammichael.com/7-taskbar-tw...
2. AeroGlass
http://www.glass8.eu/
3. Classic Start (Now: Open-Shell-Menu)
https://github.com/Open-Shell/...
4. f.lux
https://justgetflux.com/
5. ImDisk
https://sourceforge.net/projects/...
6. Kate
Enhanced text editor I like a lot more than notepad++. Aaaand it has a "vim-mode". 👍
https://kate-editor.org/
7. kdiff3
Three way diff viewer, that can resolve most merge conflicts on its own. Its keyboard shortcuts (ctrl-1|2|3 ; ctrl-PgDn) let you fly through your files.
http://kdiff3.sourceforge.net/
8. Link Shell Extensions
Support hard links, symbolic links, junctions and much more right from the explorer via right-click-menu.
http://schinagl.priv.at/nt/...
9. Rainmeter
Neither as beautiful as Conky, nor as easy to configure or flexible. But it does its job.
https://www.rainmeter.net/
10 WinAeroTweaker
https://winaero.com/comment.php/...
Of course this wasn't everything. I also pimped Visual Studio quite heavily. Sam question from my future self: What did I do?
1 AStyle Extension
https://marketplace.visualstudio.com/...
2 Better Comments
Simple patche to make different comment styles look different. Like obsolete ones being showed striked through, or important ones in bold red and such stuff.
https://marketplace.visualstudio.com/...
3 CodeMaid
Open Source AddOn to clean up source code. Supports C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript.
http://www.codemaid.net/
4 Atomineer Pro Documentation
Alright, it is commercial. But there is not another tool that can keep doxygen style comments updated. Without this, you have to do it by hand.
https://www.atomineerutils.com/
5 Highlight all occurrences of selected word++
Select a word, and all similar get highlighted. VS could do this on its own, but is restricted to keywords.
https://marketplace.visualstudio.com/...
6 Hot Commands for Visual Studio
https://marketplace.visualstudio.com/...
7 Viasfora
This ingenious invention colorizes brackets (aka "Rainbow brackets") and makes their inner space visible on demand. Very useful if you have to deal with complex flows.
https://viasfora.com/
8 VSColorOutput
Come on! 2018 and Visual Studio still outputs monochromatically?
http://mike-ward.net/vscoloroutput/
That's it, folks.
----------------------------------------------------------------
No matter how much fun it will be to do full time Linux C/C++ coding, and reverse engineering of WORM file systems and proprietary containers and databases, the thing I am most looking forward to is quite mundane: I can do what the fuck I want!
Being stuck in a project? No problem, any of my own projects is just a 'git clone' away. (Or fetch/pull more likely... 😜)
Here I am leaving a place where gitlab.com, github.com and sourceforge.net are blocked.
But I will also miss my collegues here. I know it.
Well, part of the game I guess?7 -
Yesterday, I tried to code without googling to see how far I can go. After 20 minutes of coding I run into a problem. I just couldn't make my angularjs app to work with ASP.Net MVC antiforgerytoken. I tried my best to solve it but no luck.
After 2 hours I finally gave up and connect my laptop to network and search for answer, within a few seconds. Google give my this link: http://ojdevelops.com/2016/01/....
After only few minutes I finally make my code to work. And I realized that there is no way I can figure this things out using only my head. I still need the help of community to get things done.
So my question is. During the 80's and 90's how did the old programmers get themselves unstuck when problem like this arrive?8 -
Manager: Hey software engineer, how's the project going?
Software Engineer: Good, just debugging my code.
Manager: Debugging? What kind of bug are you trying to fix?
Software Engineer: The ones that make my computer turn into a lava lamp.
Manager: Ha ha, very funny. But seriously, how can I help?
Software Engineer: Well, I need a bigger monitor. My current one doesn't have enough real estate to display all the errors.
Manager: How about a second monitor?
Software Engineer: No, I need a bigger universe.
Manager: I'll see what I can do. In the meantime, keep coding. We have a deadline to meet.
Software Engineer: No problem, I have all the time in the world. I just need to find a way to slow down time.
Manager: I wish I had your optimism. Just let me know if you need anything else.
Software Engineer: How about a unicorn? I heard they're good at coding.
Manager: I'll see what I can do, but in the meantime, stick to using a keyboard.3 -
Anybody's a father here? My 10 months kid is giving me hard times waking at 2am and not going to sleep till 4am (it is 4 now, here). That's a really repeating problem. I'm loosing my focus at work, tired after few hours of coding, couldnt mange to learn after hours. Makes me frustrated. My PM understands situation (actually he have 5 kids!), tries to help. But can't figure it out how to overcome this. Any ideas fellow dads in code? To make it clear - I really love my son, but if I'll fail to keep my level at job I could loose it one day, don't feel like beeing able to find new decent job with current exhaust level. Also I'm the only one who makes money in our lil family, loosing job for too long means loosing the roof under the head for all three of us. My wife is barely living after beeing there for son whole day, so please dont point at her. Our kid is really demanding on attention and love, and thats like a sweet poison. Love kills.22
-
No one will understand me but you Devs.
I am a self taught developer who works in a digital marketing agency, when I was learning to code I wanted that the code I will produce will help people and make me happy, the only job i got is in digital marketing agency, because no one in my country will recrute a self taught bald ugly mid thirty fucker, then want them young and fresh, anyway, I proved that I can handle the job, so that I became the only dev in the agency.
the problem is that I reached a that checkpoint where I have to choose a path:
- I learned Node and React but I can't use them in my agency
- I work with wordpress and prestashop but I don't code, I use fucking theme forest templates
the only way to work with MERN is through remote, but I am not a senior yet, I only have to keep learning PHP but I can't advance in my current job since the projects don't require coding, and I feel that my agency will close the dev department because they put me in the designers office.
I don't want to reach 40 with nothing in my portfolio but shitty theme forest template rape, the stress from my current situation is killing me, I can't even start working on my portfolio website and blog because I can't think straight, my mind jump from "today I will build an api" to "no I need to build a custom wordpress theme" each 3 minutes, I don't sleep, the futur is dark, I am afraid that if I focus on wordpress and shit I will miss working in interesting projects, and if I focus on MERN I will never gain experience localy to become a full remote later.
many will agree with me that PHP is shitty but gets the work done, and I hate PHP because of prestashop, and we only live once, the only other job I found require wordpress and fucking prestashop, imagine living a live doing something you don't like, then die regretting every decision you make.
I might sound crazy for you, but I don't have many friends and I am an introvert working with designers and community managers ... so this is the only place I can write what I want.
if you reached here, I thank you for your time4 -
The convo between my friend and me back then
He: dude I heard you can code can you help me with this coding challenge on codechef
Me: bro, I try to let's check the problem
After 15-30 min we solve the question together
Then after 3 days or so he again meets me
He: do you know about Kali Linux
Me: no man not heard of Linux but what is Kali seems interesting
He: trying to hack WiFi
Me: *getting excited* bro teach me
He: I'm learning too
That day he got to know he can't hack WiFi and I got to know that my friend doesn't know jack shit about Linux, also Linux is awesome
But that moment changed my whole engineering life, I got to learn about Linux and I'm getting good at it every single day since then.
It's been 3 year since I met that fucker.
Tagging my amigo @ashwini0529 -
If you've ever tried using Go plugins raise your hand.
If you've ever tried doing plugins in Go, raise your hand.
If you think that the following rant will be interesting, raise your hand.
If you raised your hand, press [Read More]:
This is a tale of pain and sorrow, the sorrow of discovering that what could be a wonderful feature is woefully incomplete, and won't be for a very long time...
Go plugins are a cool feature: dynamically load pre-compiled code, and interact with it in a useful and relatively performant way (e.g. for dynamically extending the capabilities of your program). So far it sounds great, I know right?
Now let me list off some issues (in order of me remembering them):
1. You can't unload them (due to some bs about dlopen), so you need to restart the application...
2. They bundle the stdlib like a regular Go binary, despite the fact that they're meant to be dynamic!
3. #2 wouldn't be so bad if they didn't also require identical versions of all dependencies in both binaries (meaning you'd need to vendor the dependencies, and also hope you are using the right Go version).
4. You need to use -trimpath or everything dies...
All in all, they are broken and no one is rushing to fix it (literally, the Go team said they aren't really supporting it currently...).
So what other options are there for making plugins in Go?
There's the Hashicorp method of using RPC, where you have two separate applications one the plugin, one the plugin server, and they communicate over RPC. I don't like it. Why? Because it feels like a hack, it's not really efficient and it carries a fear of a limitation that I don't like...
Then we come to a somewhat more clever approach: using Lua (or any other scripting language), it's well known, it's what everyone uses (at least in games...). But, it simply is too hard to use, all the Go Lua VMs I could find were simply too hard to set up...
Now we come to the most creative option I've seen yet: WASM. Now you ask "WASM!? But that's a web thing, how are you gonna make that work?" Indeed, my son, it is a web thing, but that doesn't mean I can't use it! Someone made a WASM VM for Go, and the pros are that you can use any WASM supporting language (i.e. any/all of them). Problem inefficient, PITA to use, and also suffers from the same issues that were preventing me from using Lua.
Enter Yaegi, a Go interpreter created by the same guys who made (and named) Traefik. Yes, you heard me right, an INTERPRETER (i.e. like python) so while it's not super performant (and possibly suffering from large inefficiency issues), it's very easy to set up, and it means that my plugins can still be written in Go (yay)! However, don't think this method doesn't have its own issues, there's still the problem of effectively abstracting different types of plugins without requiring too much boilerplate (a hard problem that I'm actively working on, commits coming soon). However, this still feels to be the best option.
As you can see, doing plugins in Go is a very hard problem. In the coming weeks (hopefully), I'm going to (attempt to at least) benchmark all the different options, as well as publish a library that should help make using Yaegi based plugins easier. All of this stuff will go (see what I did there 😉) in a nice blog post that better explains the issues and solutions. But until then I have some coding to do...
Have a good night(/day)!13 -
Help. I work with a guy who really wants to learn programming (he’s sales/support rn) and is even taking some courses on it. He seems eager enough to learn, the problem is he is just so fucking stupid I don’t know whether to encourage him or level with him.
He somehow managed to pass a course on Java (which I still don’t believe since I had to help him put his lines of code in the right order ffs), but now he’s signed up for C++ and data structures and I honestly don’t know how he’s going to do it.
This is the type of guy who loves “coding” but thinks debugging is a waste of time.
Normally I encourage anyone who wants to learn programming do so, but let’s be honest it does take a modicum of intelligence and this guy has zero common sense at all. We’re talking about a guy who sent me a *screenshot* of an Excel file that I needed to copy some activation codes from. And then had absolutely no idea what was wrong when I replied “are you fucking with me right now?”
*sigh*
And that’s not even scratching the surface. I sent him a zip file containing some updated code and walked him through how to update them on Slack (really basic, copy/replace files stuff). Then the VERY next day when I sent him a second update he asks “is there something you want me to do with this?”
The instructions were literally the last thing we talked about in the chat log.
I actually fear the stuff this guy would unleash upon the world if someone were actually able to teach him how to write a whole program.
What should I do? Right now my plan is to be vaguely supportive but secretly hope he will realize he’s in over his head and drop out before any damage is done. But my worry is he may just be SO dumb that he actually thinks he can do it. At that point I guess I just have to put my faith in his school and pray that they aren’t just giving degrees away to whoever can afford them. Because fear the day this guy ever gets a degree in programming.9 -
Yet another day at my company, Im rewriting some old code for client (rewriting old, php 4 system for vindications managment) and you know the moment when you are focused and someone comes to you to absolutely ruin your focus. Fine, whatever. Oh, for fuck sake. Again dev is doing as support becouse one moron with second can't login into zimbra admin panel and add fucking mailbox. I show them exacly how they login, remind them they are admins too, slowly show them, so you click "manage" than you click that gear icon and than you click "new", fill in email address and password. As simple as 1-2-3. Okay, fuck it, time to go for a cig. I just finish up few lines and stand, grab my vape and start walking towards door. In door I find my buddy with 2 random people. He told me that they are interns and that I should show them some basics and stuff around that. Oh god, fuck my life. If anything, Im definitely very bad teacher, mainly becouse I often have problems with saying what I mean in the way that somebody actually understans and knows what I am trying to say. Whatever. Fuck it all. I grab two of our old laptops that nobody used in like a year or so, and first thing I quickly figure out, is that one day for some what the fuck reason I dont even dont bothered to remember I installed Arch on both while I dont usually use Arch. I just needed it for some specific reason. Whatever. So I guess I will need to upgrade fucking system. Our network isn't really great so that was like... hour or so. In the meantime I figured what they know about coding in general etc, and holly shit. One of them (there was boy and girl), girl, apparently never ever in her life even touched code. Well... fuck. Why am I wasting my time? Becouse there was some programme or some shit like that... Someone could tell me before so I could mentally prepare.. fuck it. whatever. So while laptops are doing their pacman thing, I sit with them and slowly start to explain based on my machine some really basic concepts. Second guy actually had some expirience, he knew how to make some really really basic logic and stuff, so he had another world of problems, becouse it was PHP and, as we all know, everyone hates PHP, and... yeah.. You can probably imagine his approach. Yes, you get user input in super global array. I really wanted to say "Now shut the fuck up and write that fucking $_POST".
hour or so passed, I was close to giving up to not let my anger rise (im not really good teacher... I mentioned it. I suck at teaching others) but luckly machines upgraded. He wanted to use visual studio code, she didnt care too much, so I installed phpstorm in trial mode. whatever. Since that's linux and they were not comfortable with that, I walked them through installing LAMP stack, and when finally it started to look like LAMP stack, I requested them to google how to install xdebug, becouse xdebug is very usefull and googling skill is your best weapon on that field. I go for cig, come back and what I see boiled me a little bit. The girl was stuck looking at github page randomly looking through xdebug source code and idk... hoping for miracle (she admited she thought there will be instructions somewhere) and the guy was in good place, xdebug has a place to paste your phpinfo() for custom instructions. But it didn't work for him, he claims that wizzard told him it cant help him.. hmm intresting, you are sure you pasted in phpinfo? yes, he is sure. Okay, show me.
Again mindblown how someone can have problems with reading.
so his phpinfo() looked like that:
```<?php
phpinfo();```
I highlighted on the page the words "output of phpinfo". He somehow didn't see it or something. He didnt know, he thought that he needs to put in phpinfo so he did. OMG.
Finally, I figured out I can workaround my intern problem, and I just briefly shown them php.net, how documentation looks, said to allways google in english, if he uses tutorial to read whole fucking thing, not just some parts of it, and left them with simple task, that took them whole day and at which they ultimately failed.
To make 3 buttons labeled "1" "2" "3" and if someone presses one of them, remember in session that they pressed it and disallow pressing other ones.
Never fucking again interns. Especially those who randomly without apparent reason almost literally just spawn in front of you and here, its your fucking problem now.
Fuck it, I have some time to get back to my stuff. Time is running so lets not waste it.
After around 15 minutes my one of my superiors comes in and asks me if I can go on meeting with him and other superior. My buddy goes with us, and next 3 hours I was basically explaining that you cannot do some things (ie. know XYZ happened without any source of information) in code, and I can't listen for callbacks from ABC becouse it wont send anyc cuz in their fucking brilliant idea ABC can't even know that this script would even exist, not to mention it wants callbacks.
Sometimes I hate my job.4 -
Unpopular opinion:
Coding on paper exams actually do help at beginner stages of learning to code.
It makes you at least think how to write things simply, without overthinking the problem, makes you familiar with semicolons (so all you stupid fks wont complain that it has taken you 2 hours to find missing semicolon (actually, who has ever encountered that problem, besides memes?)), makes you learn the syntax, just many benefits that spoiled OOP/FP starting kids cant see, because they relied on autocomplete so much.
God, I hate people who are trying to render things stupid just because they can't see the fking point -.-'
Losing my mind about who goes into "programming" and who calls himself "developer" is just fueled by that.8 -
I am 21 years old and I work on Machine Learning and deep learning. I have this problem and any advice on this is highly appreciated:
Whenever I sit to code, I put on some light music over the headphones. As soon as I sit, my parents think that I am wasting my time on YouTube or watching a movie. It is not easy to convince Indian parents. What should I do to get into coding without being interrupted or being falsely accused of enjoying in front of the computer? (Locking the room with be disastrous and I have tried it 😅)
Please help 🙏7 -
How do I get gud? Been coding in Python for a while now and I still have a little bit of a problem figuring out where to go. I can read the docs and generally construct a decent program if it's fairly simple. Go anywhere beyond what I know I end up having to google for examples. Not sure if that's how many people do it but I feel like it's cheap. I feel like I'm taking bits of code, modifying it, and slapping part of my own code to it. I'm trying to teach myself how to make my own program without any major help from Google.
I'm still new so I think it's okay for the most part but I don't want to be a half ass programmer who more or less just googles and slaps things together. I want to sit there, think of a problem, and think "Oh I can use this module to help me with this and I can create this function using xyz and that should solve it!" I'm sure part of that comes with practice, but what else can I do to get gud and not be a lousy coder?4 -
Can anyone tell how you yourself to start coding please 😢especially when you you have alot alot alooot of coding that waiting you and you being lazy about it!😢4
-
A bit late.. and not much about how to learn to code..but more of a figuring out if the kid has a right mind set to do so..
If the kid is not the type to question everything, not resourceful, not a logical/critical thinker, gives up easily and especially if not interested in how things work then being a dev is most probably not for them.. they can still persue coding, but it will end badly..
From my experience, people who have a better education than me, but lack those skills turned out to be a crappy dev.. not interested in the best tool to complete the tasks, just making 'something', adding more shit to the already shitty stack.. and being happy with that.. which of course is not the best way to do things around here..or in life!!
Soo.. if the kid shows all that and most importantly shows interest in learning to code.. throw him the java ultimate edition book and see what happens.. joke!
There are plenty of apps thath can get you started (tried mimo, but being devs yourself it's probably not so hard to check some out and weed out the bad ones) that explain simple logic and syntax.. there is w3schools that explains basics quite well and lets you tinker online with js and python..
so maybe show them these and see what happens.. If it will pick their interest, they will soon start to ask the right questions.. and you can go from there..
If the kids are not the 'evil spawns' of already dev parents or don't have crazy dev aunties and uncles, then they will have to work things out themselves or ask friends... or seek help online (the resourceful part comes here).. so google or any flavour of search engines is their friend..
Just hope they don't venture to stack overflow too soon or they will want to kill themselves /* a little joke, but also a bit true.. */
Anyhow, if the kid is exhibiting 'dev traits' it is not even a question how to introduce it to the coding.. they will find a way.. if not, do not force them to learn coding "because it's in and makes you a lot of moneyz"..
As with other things in life, do not force kids to do anything that you think will be best for them.. Point them in direction, show them how it might be fun and usefull, a little nudge in the right direction.. but do not force.. ever!!!
And also another thing to consider.. most of the documentation and code is written in english.. If they are not proficient, they will have a hard time learning, checking docs, finding answers.. so make sure they learn english first!!
Not just for coding, knowing english will help them in life in general. So maaaaybe force them to learn this a bit..
One day my husband came to me and asked me how he can learn.. and if it's too late for him to learn coding.. that he found some app and if I can take a look and tell him what I think, if it is an ok app to learn..
I was both flattered and stumped at the same time..
Explained to him that in my view, he is a bit old to start now, at least to be competitive on the market and to do this for a living, but if it interests him for som personal projects, why not.. you're never too old to start learning and finding a new hobby..
Anyhow, I've pointed out to him that he will have to better his english in order to be able to find the answers to questions and potential problems.. and that I'm happy to help where and when I can, but most of the job will be on him.
So yeah, showed him some tutorials, explained things a bit.. he soon lost interest after a week and was mindblown how I can do this every day..
And I think this is really how you should introduce coding to kids.. show them some easy tutorials, explain simple logic to them.. see how they react.. if they pick it up easily, show them something more advanced.. if they lose interest, let them be.
To sum up:
- check first if they really want to learn this or this is something they're forced to do (if latter everything you say is a waste of everybodys time)
- english is important
- asking questions (& questioning the code) is mandatory so don't be afraid to ask for help
- admitting not knowing something is the first step to learning
- learn to 'google' & weed out the crap
- documentation is your friend
- comments & docs sometimes lie, so use the force (go check the source)
- once you learn the basics its just a matter of language flavour..adjust some logic here, some sintax there..
- if you're stuck with a problem, try to see it from a different angle
- debugging is part of coder life, learn to 'love' it4 -
So I am a Ruby guy since I don't now when. Probably forever. Lately I have to code Groovy. People are telling me all the time that Groovy is like Ruby. Let me tell you: No! Groovy is not like Ruby. Groovy is shitty Java with a slightly more usable syntax. Nothing more. It is so so tedious to code and reminds me why I stopped coding Java like 8 years ago. The fact that some features resemble Ruby syntax makes it even harder for me because I cannot code and facepalm at the same time. And I automatically type Ruby code all the time because it looks so similar in some places. I don't have that problem with other languages. Just Groovy. And the fact that Java people like it tells me how bad Java really is. It's just dirty. Guys, I feel so dirty now. And showering this morning didn't help. Had to get that off my chest. Thanks for "listening"9
-
Junior Dev about 18months in my current job and I've got a problem
Started to feel not wanting to code at work, despite working on a greenfield project thats critical and using new tech. I get a little defensive about PR's over stupid small things (PR was once rejected due to auto indentation "not to standard").
Talked with boss (who I get on well with and like) and thinks my problem is I've lost confidence coding. Trys to get more senior Dev to on side to help me out more.
Same senior Dev is really close with other junior on my team - pair on alot of stuff all the time, have lunch and spend free time together, and will work way past working hours just to try and finish something that day (even though it's not due that day).
(Probs working ~60h weeks, where as I'm ~42h and contracted for 37h. I'll work on if I need to but tries to have balance)
Senior and other junior tend to ignore tickets on the board, do the work and then when I pick it up they say "I did that last night". No docs, no PR for me to ask about how it was done (as they merged it themselves). (They have previously completely refactored my branch in the past overnight then not told me atall)
I'm not saying its favouritism here, but I'm not happy with the situation. I feel I can't ask questions as they are always together or they discuss the problem themselves and just give me the answer (not really acknowledging my points). I dont tend to ask for help from this senior Dev now as I don't feel it's worthwhile learning wise for me.
Other people in the team are great but working on other aspects so not a direct one-to-one alignment (others are DB Dev & principal senior dev)
Furthermore I'm wanting to possibly work on full stack web or more architecture stuff, both which are not in my current teams remit (backend up to API).
So - what do I do? Try and remedy the situation in the current team as best as or look for a new teams as cut my losses.
I'm torn between the 2 and I'm unsure how to get out this rut. I feel I need to find a solution to this soon though
(Sorry for the long rant folks)4 -
I have struggled with leet code two years ago when I started university and was learning programming.
Now I am finally set to have a leet code interview at a large company, followed by a take home problem and a system design problem.
I started looking into leet code again today and I feel like I could had done so much more back then if I just had some help.
Back then I made the mistake of doing leet code problems in Java since that's all I knew and it used to make many simple problems last for hours.
I want to try it out using Python this time around since I don't have to focus on every little detail when I solve the problem. The company focuses on Python, Go and JS but I don't know Go and JS well enough.
What do you think? Is it a good idea or not? Should I just try JavaScript?
Also do you have any advice for this kinds of interviews?
i think the leet code one will be the toughest.
Some suggest I should read Cracking the coding interview, but I don't see the point of doing that
Good thing is all interviews are through Zoom since it's coronavirus season.2 -
Compromise.
I think that sums up development pretty much.
Take for example coding patterns: Most of them *could* be applied on a global scale (all products)… But that doesn't mean you *should* apply them. :-)
Find a matching **compromise** that makes specific sense for the product you develop.
Small example: SOLID / DRY are good practices. But breaking these principles by for example introducing redundant code could be a very wise design decision - an example would be if you know full ahead that the redundancy is needed for further changes ahead. Going full DRY only to add the redundancy later is time spent better elsewhere.
The principle of compromise applies to other things, too.
Take for example architecture design.
Instead of trying to enforce your whole vision of a product, focus on key areas that you really think must be done.
Don't waste your breath on small stuff - cause then you probably lack the strength for focusing on the important things.
Compromise - choose what is *truly* important and make sure that gets integrated vs trying to "get your will done".
Small example: It doesn't really matter if a function is called myDingDong or myDingDongWithBells - one is longer, other shorter. Refactoring tools make renaming a function an easy task. What matters is what this function does and that it does this efficiently and precise. Instead of discussing the *name* of the function, focus on what the function *does*.
If you've read so far and think this example is dumb: Nope... I've seen PR reports where people struggled for hours with lil shit while the elephant in the room like an N+1 problem / database query or other fundamental things completely drowned in the small shit discussion noise.
We had code design, we had architecture... Same goes for people, debugging, and everything else.
Just because you don't like what weird person A does, doesn't mean it's shit.
Compromise. You don't have to like them. Just tolerate them. Listen. Then try to process their feedback unbiased. Simple as that. Don't make discussions personal - and don't isolate yourself by just working with specific persons. Cause living in such a bubble means you miss out a lot of knowledge and insight… or in short: You suck because of your own choices. :-)
Debugging... Again compromise: instead of wasting hours on debugging a problem, ASK for help. A simple: Has anyone done debugging this before or has some input for how to debug this problem efficiently?... Can sometimes work wonders. Don't start debugging without looking into alternative solutions like telemetry, metrics, known problems etc.
It could be a viable, better long term solution to add metrics to a product than to debug for hours ... Compromise. Find a fitting approach to analyze a problem instead of just starting a brute force approach.
....
Et cetera et cetera. -
I can work productively and for very long hours with a lot of stuff which many dev considers productivity hurdles:
- single small monitor? No problem (in fact in one occasion in which my roommate accidentally broke my laptop charghing port and I couldn't get a spare I worked on an iPad connected trough SSH to a Linux machine completing one of the hardest tasks I ever did without significant loss of productivity)
- old machine? That's ok as long as I can run a minimal Linux and not struggle with Windows
- noise and chatter around me? A 10€ pair of earbuds are enough for me, no noise cancelling needed
- "legacy" stack/programming language? I'd rather spend my days coding in Swift or Rust but in the end I believe which is the dev and its skill which gets the job done not fancy language features so Java 8 will be fine
- no JetBrains or other fancy IDE? Altough some refactoring and code generation stuff is amazing Neovim or VS Code, maybe with the help of some UNIX CLI tools here and there are more than enough
despite this I found out there is a single thing which is like kryptonite for my productivity bringing it from above average* to dangerously low and it's the lack of a quick feedback loop.
For programming tasks that's not a problem because it doesn't matter the language there's always a compiler/interpreter I can use to quickly check what I did and this helps to get quickly in a good work flow but since I went to work with a customer which wants everything deployed on a lazily put together "private cloud" which needs configurations in non-standard and badly documented file formats, has a lot of stuff which instead of being automated gets done trough slowly processed tickets, sometimes things breaks and may take MONTHS to see them fixed... my productivity took a big hit since while I'm still quick at the dev stuff (if I'm able to put together a decent local environment and I don't depend on the cloud of nightmares, something which isn't always warranted) my productivity plummets when I have to integrate what I did or what someone else did in this "cloud" since lacking decent documentation everything has do be done trough a lot of manual tasks and most importantly slow iterations of trial and error. When I have to do that kind stuff (sadly quite often) my brain feels like stuck on "1st gear": I get slow, quickly tired and often I procrastinate a lot even if I force myself out of non work related internet stuff.
*I don't want this to sound braggy but being a passionate developer which breathes computers since childhood and dedicating part of my freetime on continuously improving my skill I have an edge over who do this without much passion or even reluctantly and I say this without wanting to be an èlitist gatekeeper, everyone has to work and tot everybody as the privilege of being passionate in a skill which nowadays has so much market2 -
I am not so sure about what I am going to do after high school.
I have been working part time as a backend web developer, and I think that the experience combined with my profound interest in the subject has made me quite good for my age.
I also took part in national and international coding competitions.
I am writing all this to prove that, although I am no genius, I have a decent enough curriculum to get a job as soon as I am out.
The problem is, (please save your insults for later) I want to be a Java developer. I just love the syntax, the and the code just forms in my head better than the other languages.
Up until a few years ago I wanted to go to uni and get a 5 year degree in computer science - and I would still like to do so if it is going to help me get away from web development, and I would get lear lots of cool stuff in the mean time.
My question is: should I study computer science?
If I don't get, I could go choose engineering with computer science focus in another uni, but should I? Should I just get my job to full time and wait the next year?
Will studying in uni get me a better paying job, or some sort of tangible improvement over just working right away?
I am very interested to hear your opinions, and sorry for the long post :)2