I'm a Professional Dev - And I Write Broken Code

I professionally write code for supercomputers, and I write broken, buggy code all of the time! My first attempt at any new code always has errors in it!

I mention this because I see a lot of folks saying “my code is right, but the tests aren’t passing!!”. I totally have been there, but realizing that your code is probably broken is part of becoming a professional dev!

All of us developers make broken code, and sometimes we need an extra set of eyes to help us figure it out. Coding is hard and debugging is hard, but we’re here to help!

You’ve got this!

22 Likes

13 minutes ago, the following conversation between senior developers at my company took place on the developer chat:

Dev1: BTW, I found yesterday that our angular.js tests have not always been properly failing when there is an error.
I found this as I’m updating (minor) karma modules and these tests now fully fail as the should have.

I just have to fix the broken test too…

Dev2: Yeah, Dev3 mentioned that he thinks things have been passing when they should not have.

Writing code is completely a process of Try, Fail, Try Again, Fail Better.

2 Likes

At least when code blows up you have something to go on. I love a good error, it gives me something to investigate. Silent failing is the worst.

7 Likes

Stack traces, good error messages, and print statements are my favorite debugging tools.

Been a full time Web Dev for almost 4 years now and still Google several things EVERY time I use them.

4 Likes

What you said motivates me a bit since I m searching for jobs, entry level since I got no experience, but I learned stuff from tutorials and from my demo apps, however in all those job posts even for entry / mid level they require you to be the perfect developer. Some job posts even having something like: “you need to write perfect code and solve possible bugs before they might occur” and I m like woow so experience devs are really that good or what lol. It actually made me think that experienced devs barely have bugs or something like that.

May I know what technologies are you working with in general? Are you full stack or something like that or do you have a computer science background if I m not asking too much?

When I submit code for review, I try to make it as bug free as I can, but my first draft always has bugs. Nobody can write perfect code on the first try.

My process usually involves alternating between writing my code, writing tests, and writing fixing my code, and fixing my tests.

That s what I was thinking too about writing perfect code. Your process sounds quite focused especially about testing. I haven t learned about testing yet, I mainly focused on Javascript, React JS so far and some Node JS. I saw that on job posts some companies require you to know some testing tho, I guess I have to jump on that too but there are so many testing tools out there.

For me, I write little chucks of code to explore how the stuff I am writing is supposed to work and those chucks become the format tests. When I find a problem in my code, I try to make the smallest case that reproduces it and then turn that into a test.

I do mostly HTML/CSS and Node tools (JSON configs + command line) for my current role. As far as my background goes I have a degree in IT, focused mostly on networking and system architecture courses.

I ve learned Javascript, React and I know a little bit of Node JS too and some CSS but when I search for jobs I see that most of the companies require strong skills in CSS, but I can t say I have that I mostly focused on functionality and less on design. Do you think I should focus more on the back end side so I have more opportunities in finding a job? I mean I don t consider myself a designer I like to make things functional and if I am given a design I think I could eventually build it with CSS with a little help from documentation. I don t have yet experience in this field, I only created some demo projects so I can t work fast in CSS especially since I haven t focused on that but I see more and more companies expect a very good lvl of CSS besides knowledge of frameworks like React, Vue etc.

1 Like

If the code I just wrote works the first time, I instantly become very suspicious something is wrong. X’D

There is a difference between “perfect code” and “robust code”. The most perfect code is code that doesn’t exist, or if it must exist, handles its job as required.

Yes. Only looking at front-end jobs will always limit potential job opportunities. There is more to development then just web development, and there is even more to web development then just front-end web development.

To be a strict front-end developer today you more or less have to be a pro at CSS/HTML/React(or other framework), since you need to more or less specialize in that area while other engineers build out the back-end. Full-stack devs have more flexibility within the stack, and thus usually provide “more bang for the buck” for smaller companies/teams. There’s also a lot more technology diversity on the back end, making more diverse job opportunities. On-top of that the “back-end” could also be interacting with non-web technologies and use-cases, like building tooling, automation, data-science, etc etc.

I usually recommend people just starting out to diversify rather then specialize early on as it keeps more doors open. Obviously if your a fantastic designer, then sticking to what your amazing at makes sense, but if your just average its harder to stand out in any 1 field. However being able to be flexible in your knowledge allows you to apply for more jobs, and gain more generic experience.

Good luck!

2 Likes

Sounds more like a job posting written by HR or a manager with no background in IT. If they had been, the posting would have been written along the lines of required skill sets, e.g. programming languages, debugging, and troubleshooting.

I reject your premise. If you believe that coding is hard, then you’ve negated the rest of your argument.

Coding is hard. I’m not talking about slapping together simple scripts. I’m talking about professional software development on new problems and new solutions.

The fact that coding is difficult to do well is why it is fun. And it’s why it pays well.

2 Likes

As am I. It’s fun because it’s easy. I do agree that it pays well unless you work for a government subcontractor.

PS, restating your premise is not truly a way to win your argument. Have a good rest of the week.

Nobody is arguing dude.

I guess you must just be a super genius. The rest of us dumb pleebs find developing and coding complex algorithms hard. I wish I was brilliant like you.

I hope you enjoy the rest of your week in geniusville too :slight_smile:

1 Like

As I can determine programming is hard. It’s very likely NP-hard. :thinking:

2 Likes

Of course, if programming is hard, the next question is if it’s complete.

1 Like