How do you approach programming problems?

How do you approach programming problems?
Start programming and think of algorithm and data structures along the way or do you take a minute and think, sketch...

Attached: asdfgh.jpg (1140x1128, 1.01M)

Other urls found in this thread:

youtube.com/watch?v=VvCytJvd4H0
twitter.com/SFWRedditGifs

Jow Forums-ing other versions of OP pic

Attached: IMG_20180724_232257.jpg (1140x1128, 692K)

Does this mean I have autism or just 150 IQ?

Attached: autism.png (720x1120, 961K)

i write documentation first, then write the solution

Attached: Blank+_d204c584b2d63ba6a58bd51994beda6a[1].jpg (780x772, 222K)

it has to be done with continuous lines like this. right??

Attached: 1532438073997.jpg (1140x1128, 648K)

Attached: 1406491708269.png (590x1206, 481K)

I don't know what you guys are smoking but the answer is supposed to be this

Attached: 1531351160505.jpg (1140x1128, 632K)

middle house has no water, good job.

by programming "problems" do you mean homework? or actual projects?

for actual projects, i very rarely think about algorithms or data structures. algorithms: use a library. data structures: use a hash map. (obvsly that's a simplification but it's a good general rule).

if you want to do some planning, write out some interfaces, and write out your test cases before the implementation (TDD)

nobody said anything about
>no series connection

Attached: fuck_you.jpg (1140x1128, 625K)

A piece of piss, OP

Attached: done.png (1920x1102, 965K)

What do i win?

Attached: IMG_20180724_154156.jpg (1140x1128, 1.21M)

Brainlet

I used to just start programming but as the problems have gotten more complex, especially after getting hired and doing actual dev work, I have adopted a more structured approach to solving them.
I break the problem down into more digestible smaller problems, formulate an UML-like architecture if appropriate (or look into the existing architecture), come up with tests for the simpler problems and create a to-do list based on that. If the problems are still complex, repeat recursively. After that, the actual programming starts. I create a barebones structure, write interfaces (or modify existing ones) and dummy classes for them. Each dummy is instantiated in the main program when it's done, and tested. When all those are done, I start implementing the actual classes piece by piece, starting with one-liners (getters, setters, constructors etc) and leaving the actual algorithms for last. If I find my initial plan to be lacking, I make note of that and keep going as far as I can with things that probably won't be affected by the necessary adjustments. That way I don't lose track of my low-level progress, while trying to not waste too much time on routines I will have to throw away down the line. Then change whatever needs changing, and keep going until I'm "done" (i.e. the software works on my machine, and I can wait for the application engineers to come crying when it doesn't work on production machines).

Forgot my picture.

The thin black lines are just to give you an idea of the 3D positions of each node. The thicc black markings are supposed to indicate right angles.

Attached: 3d bitches.jpg (1140x1128, 634K)

It's like Euler's bridge problem then.

>Reducing the intesity 3 times when reaching the last house.

This is right. It can only be solved in 3 dimensions or on the surface of a torus.

how's the electricity gonna pass through that section that's all cut up?

The problem is designed to be resolved as a puzzle not as a real life solution.

Mine has all the lines in parallel. Don't lump me in with the series plebs.

congratulations, you have autism.

Attached: 1524973308610.png (400x397, 65K)

That's basically how you're supposed to do it to avoid as many roadblocks as possible which in turn will save you as much time as possible.

>that's some intense gas you got there user!

The puzzle never specified I was restricted to 2 dimensions. As most puzzles, it's intentionally vague. Its difficulty stems from some people's inability to realize their assumptions. One could argue that the whole point of a puzzle is not to solve a problem based on the information given, but making creative use of information withheld and replaced by assumptions made by the solver.

I might.

Attached: 1529617269023.png (1053x1080, 362K)

see this

Then autism must be a good thing.

kek

if you consider it a graph problem its impossible since K3 3 isn't planar. The only solution is trying in in 3D or am i retarded ?

>moving goalpost

youtube.com/watch?v=VvCytJvd4H0
Not possible

By Kuratowski's theorem this is a K3,3 graph and thus unsolvable in 2 dimensions. Nice try tho

It's just a way to troll brainlets

>Doesn't understand how power poles/lines are setup
>Doesn't understand how gas lines are setup
>Doesn't understand how water lines are setup

Based

The whole point of the image is if you try to solve the puzzle at all you have autism. Only autistic people give a shit about solving puzzles.

It is mathematically impossible

Never gonna make it

For you

I tried writing these problems on a whiteboard at school once.
People were so pissed that they couldn't figure it out, shit was great.

I wish I was as autistic as Stallman

Dude, you are pretty smart. Can I chat with you? Do you use skype, or kik, or whatsapp, or something?

>he doesn't have over-4th-dimension power supply

>google
>stackoverflow

give me your discord faggot

fucking idiots.
now all three houses has all three things

Attached: only non brainlet.png (1140x1131, 1.89M)

I am clearly autistic

Attached: 02A684AB-DE77-4925-B95C-4BC0168C5F7B.jpg (1140x1128, 1.21M)

kek

Attached: 1475245005979.jpg (701x728, 130K)

Attached: 1532438073997.jpg (1140x1128, 311K)

Wtf? that is not me!

I start with a literature review.

parallel bottom-up and top-down
think about high level API
think about fitting data structures
algorithms are mostly irrelevant

8/10 u have my respect

would have been my approach as well.