You are currently viewing Forget about algorithms and models — learn how to solve problems first

Forget about algorithms and models — learn how to solve problems first

Nearly weekly a pal or an acquaintance asks me, “I prefer to be taught to code; which language ought to I launch with?” Function of bi-weekly I receive a DM on LinkedIn starting with, “My son ought to launch programming; what’s the most practical seemingly language for him?”

It’s no longer merely these that’ve by no plot coded sooner than. On the total I receive these messages from these that appreciate several years of coding abilities beneath their belts.

I’m no longer asserting this to complain.

Bag your tickets for TNW Valencia in March!

The guts of tech is coming to the heart of the Mediterranean

Join now

I make half a dwelling from prodding the pros and cons of more than a number of programming languages, frameworks, and AI gadgets here on Medium. I revenue deal from folks having such questions.

The questions are rather intuitive. In spite of all the issues, all people would fancy to work with the most practical seemingly imaginable tools and invent their application abilities as snappy as imaginable.

And if you peek that every developer looks to make employ of a different technology stack, it makes excellent sense to shock which one is the handsome one.

The exclaim is, it all depends on the exclaim at hand.

No technology by itself is merely or nefarious; it merely depends on what form of exclaim you take dangle of to prefer to treatment. On the pause of the day, programming is merely that: exclaim solving via using a computer.

So, for these that prefer to launch programming or give a non-public to their abilities in application pattern or files science, the search files from ought to no longer be, “What ought to I employ, Python or Julia?” The search files from desires to be: “How can I treatment application complications higher?”

How to treatment complications

For stout disclosure, I’m no longer a computer scientist by substitute. I’m a particle physicist who occurs to make employ of ideas from programming and files science because I kind out humungous amounts of files from particle colliders.

That being acknowledged, physicists are in the same vogue sought-after as computer scientists. That’s no longer thanks to their files about neutrinos or sunless holes; it’s thanks to their exclaim-solving capabilities.

Abraham Lincoln is quoted to appreciate acknowledged, “Give me six hours to nick down a tree and I will utilize the first four sharpening the axe.”

For programmers and files scientists, this vogue spending time conception the exclaim and finding excessive-stage solutions sooner than starting to code. Within the frequent coding interview, candidates are expected to utilize decrease than half of their time truly writing code, and the relaxation of the time conception the exclaim.

1. Notion the exclaim

Don’t skip this step, ever!

Key to gleaming whether or no longer you realize a challenge is whether or no longer you would possibly per chance well per chance demonstrate it to someone who isn’t conversant in it. Strive to write down it down in tiresome English or your mother tongue; scheme rather of plan; or divulge a pal about it. If your buddy doesn’t realize what you’re talking about, you would possibly per chance well per chance like to receive help to the exclaim statement.

Key questions to position a search files from to are:

  • What is the enter? What is the desired output?
    Shall we command, the enter will almost definitely be an array of files, and the output will almost definitely be a linear regression on the strategies.
  • Which assumptions are underlying the exclaim?
    Shall we command, you will almost definitely be assuming that there would possibly be (virtually) no dimension error to your files.
  • What is making this exclaim sophisticated?
    Shall we command, the strategies that you just’ve will almost definitely be incomplete or the dataset will almost definitely be too little to scheme obvious conclusions.

2. Damage the exclaim down

Every astronomical exclaim includes many of smaller complications. Given our old example with the linear regression, you would possibly per chance well per chance also prefer to take into accout the following sub-complications:

  • Cleaning the strategies
  • Checking out which variables in the strategies are valuable for the regression, and which ones will almost definitely be safely no longer eminent
  • Seeking the handsome tool to pause the regression with (this is where the outdated search files from about programming languages and frameworks comes into play)
  • Evaluating your results and computer virus-checking

Breaking the exclaim down helps you make a factual plan to your work.

It’s also extra motivating, since you’ll be reaching little however predominant milestones along the plot in which. Right here is mighty extra fulfilling than sitting in entrance of a mountain of work and feeling reminiscent of you’re no longer transferring forward.

3. Open with an example

The satan is continuously in the predominant points.

Pretty than starting with the total challenge, prefer rather of portion of it. Strive whether or no longer your plan works, or whether or no longer it is advisable to to adapt it thanks to unforeseeable difficulties.

This helps you receive your head around the arduous parts. Many complications sound straightforward, however if you commence constructing them there is one roadblock after the opposite.

In our example, as a replace of using all relevant variables, one can also originate a linear regression on about a variables first. This gained’t give you any positive aspects for challenge completion; nonetheless, finding bugs to your scripts if you’re still going via a little quantity of files will almost definitely be life-saving.

In case you’re throwing your total files on the machine, running it for hours, and then come help to achieve that the script hung up halfway, you’ll be very pissed off.

Belief me, this occurs loads!

Urge little checks first, and be obvious your solution works as you envisioned it.

4. Impress

Right here is the meaty portion. Now you would possibly per chance well per chance invent the solution to your gargantuan exclaim.

Throw your total files on the code. Urge a elaborate mannequin. Attain whatever you take dangle of to appreciate.

Having completed the three prior steps, this ought to inch via rather with out grief!

If there are errors, you’ve to return to steps 1–3 to take a look at up on if you occur to’ve understood all the issues already and haven’t overlooked any bugs.

5. State

Correct since you came across one solution doesn’t point out you came across the most practical seemingly solution. Don’t inch off and name it a day; deem how you would possibly per chance well per chance also optimize your solution and the plot in which it’s far seemingly for you to to plot it otherwise.

It is truly useful to alternate with your colleagues and assign a search files from to them how they’d treatment the exclaim. Is their plot different from yours?

It’s seemingly you’ll are attempting and title the most practical seemingly bottlenecks to your solution, i.e. the parts that prefer doubtlessly the most time and sources to pause. How are you able to make stronger them?

Within the slay, replicate on how your solution can also evolve in the prolonged inch. Would original application frameworks or using AI make your solution higher? How can also your solution make contributions to solving other, mighty extra complex complications?

Eminent closing phrases

People, together with myself, have a tendency to obsess over different programming languages and the most modern framework that would possibly make all the issues 1000x extra efficient.

It’s worth reminding yourself that this is decrease than half of what it takes to develop into an very honest staunch programmer. The replacement half is exclaim solving.

You gained’t accomplish exclaim solving abilities over evening.

But even as you occur to take a look at these steps, assign a search files from to the handsome questions, and pause this assuredly, you’re on the handsome direction to taking your occupation from merely to astronomical.

This article used to be on the beginning printed on Medium. You doubtlessly can read it here.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments