this post was submitted on 04 Oct 2023
49 points (98.0% liked)

Programming

17313 readers
427 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

There is a commonly shared view in the programming community that algorithm puzzles are something you do to prep for an interview and than you never use in the actual job. This certainly rings true as in 15 years of programming, i feel I can count on fingers the number of times I needed to stop and think about data structure / algorithm, rather than usual workload of thinking about what's even the problem being solved; how to structure code; what's the interface at the module/service/package boundary; how to make code testable/maintainable/flexible etc... Iterating though a list or a dict is all ds/algo you'll need 99% of the time.

FF to now when I'm on a burnout induced sabbatical, and after a while I got itchy to write some code again. Problem was that all the ideas for projects I'd like to do are, well... projects. I still don't feel like digging through manuals for libraries and frameworks and writing boilerplate and doing all the things that need to be done to push things through. Anyhow, I was sitting in a coffee shop with my illustrator friend, who, at some point, just pulled out a notebook, spent 20-ish minutes drawing something that caught his eye and was like: "that's it for today". That's it... 20 minutes, it's done, tomorrow something else, new blank page... So I got into puzzles. Now, the first thing I do in the morning is solving a daily puzzle on leet code. If I feel like it, I might also do problems from an old competition. And I'm having a blast!

Which brings us to the question from the title: is there a direction I can push this forward? I mean, I don't mind this just being fun, but I was curious, is there something out there in the "Real World" that I'm missing that is closer to this kind of problem solving from what i was doing so far?

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 28 points 1 year ago (1 children)

This is not an answer to your question, but if you're not already familiar with it, check out Advent of Code! It's a really fun series of programming puzzles each December.

[–] [email protected] 1 points 1 year ago

And you can do the previous years of the coding challenge at any time.

I took some time off, and this was a good source of solving “real” problems, rather than trying to write something to optimize for l33tcode (which, is fine… just not a good measure for typical software engineering responsibilities, IMO).

[–] [email protected] 20 points 1 year ago* (last edited 1 year ago)

One reason we don't get much practice in this area is that the vast majority of common tasks can be accomplished with data structures and algorithms that are already implemented in libraries.

Have you considered learning a new programming language, and then helping to develop/expand its standard library, or to optimize what's there already?

[–] [email protected] 14 points 1 year ago

There's a bioinformatics website that has a course of problems to solve that slowly teaches you fundamental bioinformatics.

www.rosalind.info

I've only done about 17 of the problems. They often end up being the following format:

  • take in a text file
  • process the data
  • output the answer

Processing the data can be calculating probabilities, matrix manipulation, string manipulation, etc. It's free to try, and you can use whatever language you're familiar with. I think Python would have libraries that would help, but it's up to you.

[–] [email protected] 13 points 1 year ago (1 children)

Tutor people trying to get better at solving coding puzzles?

[–] [email protected] 3 points 1 year ago

Or college student. These puzzles are great ways to explain how the code works at a basic level

[–] [email protected] 13 points 1 year ago* (last edited 1 year ago)

What I've been trying lately is hacking. I'm on www.hackthebox.com, they offer over 200 machines for you to hack. Each machine offers a service, usually a website, but last week I had a grpc machine, which has some kind of vulnerability you need to find and exploit.

A free account doesn't give acces to all machines, only +- 20 active machines. A payed account also gives you acces to all retired machines.

You do need a "starterpack" to begin with this hobby, a vm with Kali Linux is the main component, the ability to connect to a vpn is another, because the htb machines all run on vpn's.

As a programmer, you have the basic knowledge about enumeration and webservices and such, to solve easy boxes (which can still take days to hack). You'll only need to learn about tools like nmap and burpsuite, but you'll surely find some tutorials online.

The goal is to get user acces and eventually root acces (they've placed a user flag in the user home directory and a root flag in the root directory which you can submit on the htb website and gain points)

It's really fun and challenging and even educational to search for weakness on various webservices, like apache or wordpress. It can be frustrating at times, but as a programmer you know that those challenges can be the most rewarding.

[–] [email protected] 3 points 1 year ago

I think you want to be computer scientist not an actual programmer. Maybe try to look into making phd in computer science.

[–] sir_pronoun 2 points 1 year ago

I don't know about you, but I always get a bit of that puzzly feel when I am confronted with unstructured data that I need to process and maybe evaluate statistically.

So if you want to turn this into money, maybe a few basic online learning resources on statistics should get your foot in the door with employers. Then think of which companies in your area might have to deal with raw data (think lots of customer interaction, or also environmental agencies, insurance companies, man, gotta be lots) and just apply to your dream company even if they have no offers posted. Often there are open positions they don't advertise. And a programmer with statistical knowledge (don't be humble) and initiative should usually find some attention.

[–] [email protected] 2 points 1 year ago

Maybe try getting into theorem proving? I've heard good things about Lean and I've tried Coq for a bit and it was fun. Don't know much about this tbh.

[–] [email protected] 1 points 1 year ago