Live data from Hacker News

Ask HN: What has made you a better problem solver in software engineering?

news.ycombinator.com

41–50 of 68 posts

Re: Ask HN: What has made you a better problem solver in software engineering?

#41
post #21

Throwing away assumptions and trusting nothing, where it makes sense to do so. I've been burnt too many times by library bugs, framework issues and the other layers between me and what I'm actually doing. When I first started out I used to think that browsers such as Chrome were infallible and any problems had to be with my code. As a result of being burnt, I'm happy to give up on logging and trawling through code in…

To be honest, for me the point where you discover "this media query does not behave correctly on this device that I need to support" is where you stop digging and find a different solution for detecting pointing devices. It's very clever that you managed to discover a bug in OnePlus's version of Android but then what?

I guess maybe this is a bad example because the web is stuffed full of "this mobile device a lot of people use is inexplicably broken" situations (hello Mobile Safari) that I would never consider digging deeper.

I've done this sort of thing for non-web problems

Re: Ask HN: What has made you a better problem solver in software engineering?

#42
For me I would say it's fault finding. Releasing software is easy but finding the sometimes very obscure issues that crop up once released is always a challenge, especially when bug reports are not always the most detailed.

When dealing with some of these it's often necessary to delve deep into the internals of how something is working. I once spent 4-6 months working on a fix which turned out to be a stack corruption on a RTOS but was hard to pin down as the system usually took over 2 weeks to crash.

I now mostly deal with embedded software so it can often be with conflicts of hardware which have never been tested together and with unpredictable results. I've also dealt with finding faults in software I had to maintain across several platforms/databases/etc written in a few languages.

For the most part it's been fun or rewarding with some difficult times. Delving into the depths of a system does take some time but gives a wealth of knowledge that can usually be applied to another problem

Re: Ask HN: What has made you a better problem solver in software engineering?

#44
Focusing on minimizing risk without sacrificing value. This is about balancing engineering costs to both build and maintain and ideal business outcomes. The hardest problem is not so much the how to build something but what is the least amount of work you can put forward to get the job done (with quality and maintainability).

Re: Ask HN: What has made you a better problem solver in software engineering?

#45
post #31

Some things that have helped me: 1. Look at prior art. Many problems have been solved before. It can be more fun to dive in and create your own solution, but looking for previous solutions first often saves time, results in a better solution, or may show you that you don't need to write the code in the first place. 2. Write down the problem you are trying to solve before solving it. 3. Solve the problem multiple time…

>It doesn't generally help with big systems design What do you think helps specifically with that?

Read a lot of code. Pick one of the most popular libraries in a language you like and commit to reading it, understanding how it was architected, and tweaking it.

Talk to other people who build “big systems”, whatever you decide that definition means. Ask them lots of questions. (Not the “Emacs or Vim?” kind. Instead: “When you wrote x, where did you start? How did you arrive at the solution you found? What would you change if you started again today?”)

Build systems, big and small, on your own and with others.

If you're not sure what to build, I like “Exercises for Programmers” by Brian Hogan:

https://pragprog.com/book/bhwb/exercises-for-programmers

The problems are still pretty trivial but a little larger in scope than most from https://exercism.io.

Beyond that, I try to find videos or tutorials of people solving real-world problems. For example:

Go: https://gophercises.com/, https://gowebexamples.com/, https://www.usegolang.com/, https://lets-go.alexedwards.net/, https://testwithgo.com/

C/C++: https://handmadehero.org/

Haskell: https://typeclasses.com/

Mixed: https://howistart.org/

Pair programming and live coding videos on YouTube can be worthwhile too.

“Hacking with Andrew and Brad” is an example for Go: https://www.youtube.com/watch?v=yG-UaBJXZ80

“Pair Programming with Jon Skeet” is another example: https://www.youtube.com/watch?v=zvz2omT9fzk

You get to hear people talking through their thought process and learn how other people solve problems and structure solutions.

The Twitch Science and Technology section is another place to find similar stuff:

https://www.twitch.tv/directory/game/Programming

I like Tsoding for functional programming:

https://www.twitch.tv/tsoding

And SerpentAI for Python/AI:

https://www.twitch.tv/serpent_ai

Watching people code can be dull or exciting depending on your mindset. I try to dip into these channels occasionally and soak up ideas from them, then go away and make things. I don't generally learn much without writing code too, and look for technical books and courses with exercises and problems.

We need more of this, though. I wish there was a programming puzzle site full of problem statements of the type, “build an application that does x”, where solutions are ranked by the community and sorted by language. It would be such a helpful resource.

Re: Ask HN: What has made you a better problem solver in software engineering?

#46
post #34

Start at the bottom, make your bottom layers solid first. You can't reliably deduced anything about what your current problem is, if the things it depends on are flaky. Design by Contract. Understand it. Used it. Turn your asserts on always. Turn on all warnings that don't give false positives that your compiler / tools provide. Fix them don't mute them. Run around your code base and find every damn place where some…

> You can't reliably deduced anything about what your current problem is, if the things it depends on are flaky.

Interesting, as a junior dev I always start thinking about the fun architecture stuff first and end up being slow to complete a project. I figure that deploying one place vs another is so different you want to deploy early and often for testing. Maybe I should just start getting the basic functionality and tests down before packing it up into docker containers and running it on kubernetes and all that?

Re: Ask HN: What has made you a better problem solver in software engineering?

#50
post #15
post #11

Unpopular answer alert: Doing leetcode like problems on a semi-regular basis helps me a lot.

Just curious, in what way? Does your job require you solving problems like leetcode every some time?

I feel like it helps me in reducing the number of passes before I ship something (so less errors/better tests). I also recently left the industry so I'm not sure if it'll help in my current position as a grad student as well.
Post reply on HN