top | item 24404628

On finally learning to program at the age of 40

302 points| Stratoscope | 5 years ago |github.com | reply

161 comments

order
[+] darkteflon|5 years ago|reply
I'm in this boat. Finally started programming in 2018 at age 38 after a lifetime of playing around with computers as a hobby (thanks, dad!) and a first career in a completely unrelated field, as an attorney.

The linked article is about learning for pleasure, but there are also challenges associated with trying to enter the field as a second career. The technical complexity, of course, and the scale of what needs to be learned, can sometimes be overwhelming. It helps to bring as much humility to the process as you can muster. But peoples' perceptions can also be a challenge - no one quite knows what to make of you!

I like to think it's an opportunity. If you're able to combine domain expertise from your first career with a solid grasp of CS fundamentals and a good day-to-day working knowledge of your toolchain, that can make you a pretty rare interdisciplinary candidate. Perhaps that then informs how you market yourself and to whom.

Best of luck to anyone coming at this as a second career!

[+] throwaway17_17|5 years ago|reply
I thought for a moment I blacked out and posted to HN without knowing it. I too am a 38 years old attorney who learned CS/Programming late in life. I haven’t had any success in finding relevant job openings for my particular coding knowledge, but I keep looking.

Just knowing you exist gives me hope I may still be able to break into tech, at some level. And given that Hurricane Laura just decimated my city ( and my home and my office) I need some hope right now.

[+] jaeming|5 years ago|reply
I started at 39. I had been looking for a new career to transition from video editing. After the third time my employer restructured my role, I took a voluntary redundancy (basically volunteering to be laid-off) and started programming full-time. I did an online bootcamp and never looked back. Five years later I'm a Senior Software Engineer, and hoping to upgrade to principle engineer by end of the year.

Sometimes I suddenly feel like a fraud, especially when I realize I'm in a meeting where everyone in the room has a CS degree or higher, but overall I feel like I bring a lot of value to what we do and most of all, I really love doing it.

I remember anonymously asking on Quora if people thought I was too old to learn how to program. The amount of support and stories that were shared with me were positively overwhelming. Probably the best answer I received was, "do you enjoy doing this thing?, if so, the answer is you should just do it."

[+] marlowe221|5 years ago|reply
I just did this.

I'm 38 and just started my first developer job 3 months ago after practicing law for 13 years and hating it. I started learning JavaScript/HTML/CSS about a year ago.

It's the best thing I've ever done for myself and my only regret is not doing it sooner.

You can do it!

[+] tehlike|5 years ago|reply
I have a friend who is an attorney that's fairly technical - he can't write code but he understands how it works when reading it. He does combine his interdisciplinary skill - started a company in his main domain using software as a tool. I'm constantly impressed by him.
[+] mathattack|5 years ago|reply
Knowing the problems to solve is HUGE. If you know enough programming to identify 10X developers and point them in the right direction, you can create a ton of value.
[+] Reedx|5 years ago|reply
> I like to think it's an opportunity. If you're able to combine domain expertise from your first career with a solid grasp of CS fundamentals and a good day-to-day working knowledge of your toolchain, that can make you a pretty rare interdisciplinary candidate. Perhaps that then informs how you market yourself and to whom.

Indeed, you're in the best position to solve attorney problems with programming.

But another approach to consider is augmenting or skipping the candidate part and build it yourself. Identity a problem you had, solve it and sell the solution/tool to other attorneys. Even if the selling part doesn't do well enough, you'll learn a lot and have a valuable resume booster.

[+] m0zg|5 years ago|reply
If you don't mind me asking, why would one give up a cushy, well paid attorney career and choose software engineering? Software engineering compensation _tops out_ below where an experienced attorney compensation _begins_. The least I've ever paid a lawyer was $250/hr.
[+] tannhauser23|5 years ago|reply
Hey same here! Switched from law to programming in my mid 30s as well. Never looked back!
[+] throwaway883399|5 years ago|reply
I'm studying law now and considering this path. I would be really appreciative to hear your advice on moving from law to computer science. If you could send me an email to the address in my profile, I would be very grateful. Thanks!
[+] susam|5 years ago|reply
The Logo screenshot used in this article was created by me for my own blog post here: https://susam.in/blog/good-quality-dosbox-video-capture/ :-)

I contributed this image to Wikipedia at https://en.wikipedia.org/wiki/File:IBM_LCSI_Logo_Circles.png, so that it could be added to the Wikipedia article on Logo at https://en.wikipedia.org/wiki/Logo_(programming_language).

It is fun to see this image being reused in this article!

Related: https://news.ycombinator.com/item?id=24405420

[+] bartvk|5 years ago|reply
Very nice, and it was actually properly attributed, too.
[+] toadi|5 years ago|reply
The hard part here is getting a curriculum to learn software engineering. Writing code is much much more then just a language. So much time spent on that. Just learn one freaking language and move on.

eg. I started with Basic -> QW Basic -> Pascal -> PHP -> Perl -> ruby -> golang and a lot of others languages too.

Writing code is not the hard part.

follow something like this: https://functionalcs.github.io/curriculum/

Or if you want to be something specifc follow this and find resources to learn about the topics: https://github.com/kamranahmedse/developer-roadmap

[+] susam|5 years ago|reply
> QW Basic

Did you mean GW-BASIC? Or maybe QBasic? Or perhaps QuickBasic? By the way, I have archived these obsolete pieces of software from MS-DOS era at https://github.com/susam/dosage (search for Basic in the README) if anyone wants to try their hands on them again.

[+] tasogare|5 years ago|reply
To some extend the engineering part is emerging: when a code base grows it becomes necessary to learn technics to factor it. What I find really time consuming when using a new language is searching for its API.
[+] xenihn|5 years ago|reply
You can also realistically learn Swift and then never have to write anything else again, until iOS stops being a career at least.
[+] ChrisMarshallNY|5 years ago|reply
I've been writing software pretty much my entire adult life.

But I was a manager for 25 years, which meant that I had to work on coding during nights and weekends. I got a lot done, but I really feel as if it stunted my development. Also, I was deliberately working on software that was designed to be taken over by folks with limited skillsets, so the tech edge was blunt. This turned out to be exactly the correct thing to do. That work has taken off in a big way, and is now being extended in new ways, by some talented and up-to-date engineers.

So, three years ago, I left the company I'd been working at for 27 years, dumped a bunch of my money into a couple of companies, and started to re-educate myself.

It's working out very, very well. Far better than I imagined it would. I may never get paid a dime for any of my work, ever again, but I am producing some of the finest software I've ever written. I've learned a ton, and I'm really just getting started. Over the weekend, I started work on a project that may or may not end up in open source, but will likely be one of the most ambitious projects that I've done. The last three years have helped me to get to the point where I have no issue diving in.

I'm pretty psyched.

[+] susam|5 years ago|reply
The article mentions that Logo did not provide a very good experience to the author. I am glad to know that he still found another way back to programming and had a great time with Rust. In my life, Logo opened a whole new world for me.

I began coding with IBM/LCSI PC Logo in my childhood days. The first line of code I ever wrote was:

  FD 100
That's the "hello, world" of turtle graphics in Logo. That simple line of code changed my world. I could make stuff happen in an otherwise mostly blank monochrome CRT display. Until then I had seen CRTs in televisions where I had very little control on what I see on the screen. But now, I had control. The turtle became my toy and I could make it draw anything on a 320 x 250 canvas.

The next beautiful piece of code I came across in the same language was:

  REPEAT 360 [FD 1 RT 1]
The code above draws an approximation of a circle by combining 360 short line segments. It showed me how control flow can be used elegantly to express complex ideas in a simple expression. And then I came across this:

  REPEAT 20 [REPEAT 180 [FD 1 RT 2] RT 18]
The above code draws 20 overlapping circles. The output looks like this: https://susam.in/files/blog/dosbox-logo-1.png. By the way, it is the same image that the author of this article has reused in his article. :-)

At an impressionable age of 9, reading and writing code like this, and using simple arithmetic, geometry, logic, and code to manipulate a two-dimensional world had a lasting effect on me. Back in those days, I used to find joy in sharing some of my interesting Logo programs with my teachers and friends. I like to believe that my passion for software engineering as well as my love for writing code, sharing code, and open source development are a result of coming across these beautiful code examples early in my life.

[+] susam|5 years ago|reply
For all the Logo fans out here, we have Slack and IRC channels at https://bit.ly/fd100slack1 and https://webchat.freenode.net/#fd100 . Most members of these channels are also Hacker News users.

Please do join it even if you don't remember Logo anymore. The intention here is not to discuss Logo but to share the joy of computing that we discovered through Logo and has remained in our lives. I hope to see you all there. :-)

[+] ThePadawan|5 years ago|reply
Now I feel like I need to apologize for TAing a class that taught Logo to college freshmen.

This was a CS class for non-technical natural science freshmen, so it was full of pharmacy, biology, geology students etc.

It's primary purpose was also to (in 14 weeks!) teach the barest detail of all of computing, from basic circuits (~1week) to Logo programming (IIRC < 4weeks) to data science and statistics using R (2weeks) and the concepts behind OOP (1 week, IIRC not on the exam).

Teaching Logo to 18 year olds that had never in their life been interested in programming was an eye-opening experience:

Some students (imo rightfully) only did the exercises to get through the exam, since all they wanted was to pass the class. Fair enough!

Others solved the exercises about for-loops one week, then started asking follow-up questions about infinite loops and accidentally inventing while-loops and their eyes lit up and you could tell that they got it, even though this wasn't even their primary degree direction.

Looking back, as a CS student, I wish I had taken more classes like this, designed to make you question if you were actually taking a degree in the direction of what you were most interested in.

Our CS program was math, math, math and 15% programming. Not really any jumping points from that (except into Mathematics).

[+] lemoing|5 years ago|reply
Your last point is a good one. I started in math and had to take a few CS courses (which I ended up switching into), but I had almost no exposure to subjects outside those two. At least here in Canada, it feels like electives are de-emphasized and there's little opportunity to explore other subjects. I'm happy with the way things turned out but wish I could have taken a broader course load.
[+] nullsense|5 years ago|reply
I remember discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was, so that halted my progress.

I rediscovered it as a teenager in highschool and wound up making a basic platform game with a mess of shitty spaghetti code goto statements and drawing lines on the screen. It was great. My dad wanted to encourage me but didn't know how, so he got me a C++ book from the library but it just made no sense and I couldn't get anywhere.

Fast forward to being 23 and deciding what to major in at University. I rediscovered the idea of programming and instantly fell back in love with it. I remember blowing through the entire first semester textbook in 2 weeks and really getting it. It felt like a super power had finally been unlocked. Still does.

I was so glad to reconnect with programming. I always feel I would have been an absolute whizz kid by now if I had really picked it up when I was a teenager and part of me is a little sad about that.

[+] shoo|5 years ago|reply
> discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was

i started off programming with qbasic as well -- i remember when i finally figured out what arrays were and how to use them -- now if i wanted to animate many enemies/projectiles i didn't need to keep copying and pasting and defining more and more variables for each new entity! magic! at some point i got hold of a copy of darkbasic (a basic product with simple access to input, 2d graphics and sound) and made some home-brewed space invaders knock off -- all of the entity state was encoded as some horrible huge 2d array -- one index for entity id, the other index for attribute. probably all attributes were stored as integers, with different meanings depending upon the entity type, also stored as an int in one of the columns.

[+] yourapostasy|5 years ago|reply
> My dad wanted to encourage me but didn't know how, so he got me a C++ book from the library but it just made no sense and I couldn't get anywhere.

Such a nostalgia trigger. My parents were not in IT, but had parent-friends (I was friends with a kid at school, my parents and the kid's parents became friends instead of reluctant chaperones) who were in hindsight mainframe system programmers. Ironically, from hearing about the work, my parents tried to dissuade me when they figured out I was fascinated. It wouldn't pay as well as a Real Engineering Job like mechanical/chemical/electrical yet would demand the same kind of rigor to study so why not just shoot for that REJ or chemistry/biology for med school?

But man, as a kid, once you're hooked molding your own world in code, the amount of sheer mind-numbing work you're willing to go through to get that dopamine hit when some piece works makes a hash of any of that advice. The only block is just the ability to ask around. Elementary school was not the time for K&R or IBM PL/I product manuals or IBM 360 manuals with no adult supervision when I was given access to the mainframe. I. Was. So. Lost. Just the editor was hard to remember rules for.

Back to BASIC on the rickety school teletype (driven by a timeshared mini) I went, and my befuddled parents had no further idea how to channel the energy I put into it without spending money, as well-intentioned as they were, so they got one of the new-fangled IBM PCs at a family budget-busting cost and let me have at it. Forever grateful to them they did that. The seed grew from there. I cannot wait to see what the kids with Google these days that get that same bug bite come up with in the next few decades. It will be glorious.

[+] auggierose|5 years ago|reply
Yeah, QBasic was my first as well. Actually, it was my second. I started with .BAT files on MS-DOS :-) I spent about half a year until I figured out how to write and run a BAT file and about the same time for how to run a QBasic program, so after that I had a really high pain threshold for learning :-D
[+] kimjongtrill|5 years ago|reply
Be that whiz kid now. You needed time to “kid” and now you have time to program.
[+] jamesbfb|5 years ago|reply
Hey, another another person who started “later” in life checking in. I’m 36 but started when I was around 29. The common theme here seems to be “grew up around computers but fell into a different career”

My start was working for a company in a developing country who were struggling to find a way to escape spreadsheet hell. I was a business analyst but decided it surely couldn’t be that hard to program and create some kind of system myself! A month or 2 studying “Head First PHP” and I started work on a system to help the company manage their import, export and container yard operations. A few months later I was done. To my knowledge (and absolute horror), they are still using it to this day.

I’m back in Australia 3 years ago, happily working as a senior dev, but reading some of the posts here really brings back memories of the excitement I would get when those “ah ha!” moments would strike during those initial first months.

[+] josefrichter|5 years ago|reply
On the other hand, if you made something that is still used "in production" for several years now, that's quite an achievement. Well done.
[+] guyzero|5 years ago|reply
So while I learned to program BASIC at 10 or so on a Commodore PET, there were plenty of adults who were also learning BASIC for the first time in that same wave of early home computers. I had a friend whose dad (an optometrist) was very into programming their TI 99/4A. And I'm pretty sure my high school computer science teacher hadn't been programming a lot longer than I had (although he was a good teacher).

So in a lot of ways, learning programming as an adult is a tradition that is as old as home computers. You're never too old to learn something new.

[+] monkeydust|5 years ago|reply
I am a nudge over 40 and learning to discovers the joys of programming again. I am on the product side, have coded in the past around a decade ago (C++) as part of a rotation scheme at company and learnt BASIC in school.

The thing that got me interested in this again was the excellent 'Automate the Boring Stuff with Python' https://automatetheboringstuff.com/.

This was my best lockdown read so far. I have used it automate some dumb stuff I have to do at work (moving mouse clicking). Get real-time custom alerts on my bank transactions and a develop an app that logs into a site, searches keywords, scrapes results and sends me an email each morning.

Can't recommend the book highly enough.

[+] hevelvarik|5 years ago|reply
Wow wasn’t expecting this to climax with Rust
[+] mlindner|5 years ago|reply
Yeah that's quite an interesting take. This is the first time I've seen someone come into programming with their first real learned language being Rust. I'll be awesome to see more of this in the future. It gives me encouragement to properly learn Rust as well (my problem with learning languages is that I never actually want to write anything in any language so I can't actually learn the language without finding a use for it).
[+] Dowwie|5 years ago|reply
40 year old tech-entrepreneur here. In my 30s, I became the tech lead who I needed as a co-founder. I learned by doing, with periods of great intensity, over many years. There's so much I haven't accomplished yet and so much more to learn. Setting the right goals has been just as challenging as learning how to accomplish them. I take a first-principles approach to understanding fundamentals rather than simply hacking together a solution. This is a very time and energy-consuming approach, but it lends itself to stronger long-term results. Expertise compounds itself over time, block by block. The first year working with any new domain of material is always the hardest, but enduring the process ultimately yields great returns. Endurance is essential to growth. Anyone out there who is reading this and experiencing hardship, do not give up! These hard times will pass, your fears will subside, and a stronger version you will remain. You can achieve your goals!
[+] ulzeraj|5 years ago|reply
I've been a Linux sysadmin for more than 15 years. I've never been into programming except for a few batch scripts. However my last jobs involved a lot of deployment and monitoring custom stuff and combined with this DevOps hype I've been coding a lot of stuff lately. I kinda regret not improving my coding skills earlier.
[+] ajuc|5 years ago|reply
I think Turbo Pascal was the perfect language to learn programming. It has a simple core, a static type system without much bells and whistles but that's more solid than the C crazyness, it doesn't force the student to learn 10 different concepts at the same time before writing HelloWorld (unlike Java and other OO languages), but it teaches thinking about types and not only values (unlike scripting languages).

Sadly it's basically dead now.

[+] busterarm|5 years ago|reply
Not quite the same story, but I've been programming since I was 5 or 6 years old and it took me until I was 30 to make a career out of it.

Turns out everything else that I've done with computers in the meantime helped and is a force multiplier in my job.

[+] gogopuppygogo|5 years ago|reply
Started my professional career as a teenager. I was in board rooms advising CEO’s before turning 18. I started in infrastructure. First building gaming computers for clients then shifting to a new model servicing business clients by setting up servers, implementing computer and phone networks, setting up a PBX or VoIP system. Then transitioned from that to designing data centers and call centers for larger clients. Got deep into the architecture of ip transit layers. Fell into resale of existing tech and security for servers/networks/endpoints.

Cloud started eating the market for private data center facilities so I started a VoIP company. We did novel stuff with open platforms to create high density usage without performance impacts on 10 year old hardware (back when hardware was still expensive because cloud couldn’t do telephony well). Had bad a business partner and got out of that.

Throughout all of this I somehow never needed to learn to code more than HTML/CSS.

I decided to learn when I turned 30 and my careers future was unclear.

About three months in, I realized that I needed practice building real world tech not just codeacademy. I hired a tutor to help me learn to program as I only had about 2 hours a week to spend on it.

After three years of being tutored I’ve written a data aggregator sifting through various order data and building custom reports, I’ve used machine learning to filter important content based on content, I’ve built integration with payment gateways and a basic ledger system to track payments, I’ve done all this to work on a startup. I’ve pivoted over time but the concept is still motivating me.

I still consult as a tech leader. I’m a much more capable leader having learned to code with my other skills coupled together.

My recommendation to any professional looking to learn these skills is to hire a tutor. I could spend 100 hours of trial and error that a person with 20 years of experience can figure out in 5 minutes. If you are based in the USA you can find someone for $50/hour or so overseas to help you. That’s $400/month but still less expensive than many paid courses/schools and you get to set the criteria/agenda for your own needs.

[+] lordnacho|5 years ago|reply
There's something about games as your motivation for learning to code that is quite unfortunate: Games, especially the popular ones, are monstrously difficult to write.

And I say this as a C++ HFT guy who's written a load of programs for all sorts of other things.

- Games will break your OOP tutorial learnings. If you're starting out with a game, it is gonna get mighty difficult to fit whatever it is into a set of objects. By the time you come around to an ECS, you've probably got a fair bit of experience under your belt.

- A lot of games have a realtime component. So now you need to know about performance, so that you can draw a frame in a few ms. To do that, you need an abstraction of the machine that includes things like cache misses and branch prediction.

- Syntax for c++ is probably the weirdest among common languages, and you need to know it in order to do all the allocations and type safe calls. You'll need a bunch of knowledge about how the thing builds, which also isn't trivial. (Why h files?)

- Games might have 3D graphics. Now you'll need a math course, and a bit of reading about some particular lib.

- Games tend to have multiple abstraction layers. If you need a high performance data structure, you'll have to spend time on writing that while also thinking about the thing you're using it for. You might end up mixing the game logic with your data structure if your thinking is muddled.

- You'll need some artwork. It's not as easy as you might think to come up with some nice colors for your characters. Textures, see 3D graphics.

- Gameplay itself is a huge topic straddling coding, design and culture.

- Want to play with the computer? Game AI is another huge one.

I'm not surprised if 99% of kids who thought they'd learn c++ gave up.

As for my own journey, it tended to be connected to trading. Before I did that, there were moments when I wrote code, including at uni, but they never amounted to a whole that could be used for anything useful. I think having a domain problem helped focus things a lot, in that certain things are prioritized. I still don't know how to do graphics, game AI, and artwork, because trading systems tend not to have those.

Once I got to a comfortable place in terms of skill, I branched out into apps and websites, though I don't consider myself an expert on those. That's also a useful journey, bringing in large areas of experience that I hadn't started with.

[+] rcxdude|5 years ago|reply
While it's true there's a lot of deep coding that can go into games (especially ones which push the capabilities of the hardware), it's also quite possible with the tools we have to make very successful (and quite good) games with fairly little coding ability. A lot of indie games are a complete trainwreck at the source code level and yet very fun to play. For a good example, see the source code for VVVVVV[0], which is not elegant or high quality C++ code (and it was ported from not particularly elegant ActionScript) but it clearly did the job.

[0] https://github.com/TerryCavanagh/VVVVVV

[+] asdfman123|5 years ago|reply
I was tinkering around in the Minecraft code and man, I have no idea how people use inheritance when designing complex games without completely losing their minds.

I know composition vs. inheritance is a nuanced debate, and there are people who can tell me exactly how to do inheritance the right way and why they feel it's better -- but after I learned how much cleaner composition feels I went with it and never seriously looked back.

[+] Stratoscope|5 years ago|reply
This story was rather poignant for me, as I am, let's just say quite a bit over 40.

I learned to program when I was in high school and noticed a Teletype 33 ASR in a corner of the math classroom. I knew about Teletypes from being a ham radio operator, but I thought they were just for sending and receiving text over the air or over a phone line to another Teletype. You could either connect to the other Teletype and type in real time, or you could punch a paper tape first and then send it over the air or across the wire at the full speed of 10 characters per second.

https://en.wikipedia.org/wiki/Teletype_Model_33

This Teletype was special, though. The school had an account with a local timesharing computer company, and for a mere $30 per hour ($200/hour in today's dollars) you could dial in and run a BASIC program.

https://en.wikipedia.org/wiki/Time-sharing

Naturally my first program was:

  10 PRINT "HELLO"
and it printed HELLO!

You can probably guess the next line I added to the program:

  20 GOTO 10
Whoops! This wasn't just text scrolling on a screen, it printed out line after line on the roll of Teletype paper. Had to hang up the dialup modem fast.

That summer I got a job as "night operator" at the timesharing company (Transdata in Phoenix, AZ). The great thing about this job was they shut down the timesharing service at night. So I had their SDS Sigma 5 all to myself. My first personal computer!

I found a copy of the Algol-60 Report and taught myself Algol. And then Sigma 5 machine language. It was great fun to see how much of a program I could write on a single punch card (80 bytes).

We had a nice single-card program that you could put in front of a deck of cards to print out the whole card deck. But it was kind of slow, because it would read a card, print the card, read the next card, print that one, etc.

There were a few bytes left on that print program card, so I squeezed in code for a double buffer. It would read the first card, start it printing, and then while it printed read in the next card, overlapping the reads and writes so it printed twice as fast.

That fall I went to Caltech, lasted a year and flunked out. I loved science and math, but when we got to partial differential equations my mind just couldn't handle it. But there was a systems programming class, and the final project was to write an infix expression parser and evaluator with operator precedence in assembly language.

I was the only person in the class to turn in a complete working program with test cases. I could probably tell you exactly where I was sitting when the instructor announced the results. I had found my calling, and have been at it ever since.

My secret weapon: while everyone was punching cards with their program, submitting the batch job, and waiting hours or overnight for the core dump when it crashed, I found an interactive console on campus where I could code and run and test my program in real time. Just like the Teletype I learned on.

Moving forward to the present, I interviewed with a FAANG company last week. It reminded me a bit of the discouraging experience the article's author initially had with LOGO and competitive programming.

Everyone I interviewed with, and the company recruiters, were all super nice and supportive. But the gist of the interview process was to tackle four medium to hard algorithm problems and come up with not only a working solution but a perfectly optimized solution, in 15 minutes each!

The recruiters advised me to spend at least an hour or two every day for two weeks on LeetCode banging through as many algorithm problems as I could, timing myself to see if I could solve each one with optimized code in that 15 minute time limit.

There was also a system design interview focused on scaling out a backend system to support a billion users. I explained to the recruiter and the interviewer that this wasn't my forte, but I had a lot of experience with low level hardware interfaces and was really interested in a job in their hardware group. They don't hire for a specific role like that, though, they hire "generalist engineers", which means being able to come up with a fully optimized solution for any algorithm in 15 minutes - and without the ability to run and test your code.

In fact, they used an online code editor that normally lets you do just that, but this capability was disabled. I suppose they were trying to limit the online editor to match the capabilities of what you could do scribbling code on a whiteboard.

This all reminded me of what discouraged the OP's author so much about his initial foray into programming: the competitive coding competition with LOGO. That is fun for some people, but not for him and not for me. I would rather learn how to cooperate with other programmers, not compete with them.

One of the algorithm problems stuck in my mind. Of course it was a LeetCode problem that you can read about here:

https://leetcode.com/problems/valid-palindrome-ii/

"Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome."

In Python, there is a simple solution for this:

  def is_palindrome_with_at_most_one_character_deleted( string ):
      if string == string[::-1]:
          return True
      for i in range( len(string) ):
          s = string[:i] + string[i+1:]
          if s == s[::-1]:
              return True
      return False
If the string slice notation is unfamiliar, here are some references:

https://www.google.com/search?q=python+slice+notation

But of course this simple solution would not be good enough. What about the time complexity?

This LeetCode problem has 520,862 submissions at the moment, with 191,325 accepted. The solution above would not be accepted.

There is a faster solution, but it is less obvious and prone to off by one errors and other logic errors. It's not that complicated, but not something I would expect anyone to code correctly and verify in 15 minutes.

If that kind of competitive programming was what programming looked like to me, I could see myself being easily as discouraged as the OP was.

Fortunately there are other fish to catch in this grand ocean of programming!

[+] AstralStorm|5 years ago|reply
The one thing I dislike about such timed tests, they promote quick and dirty hacks rather than thinking and elegant or performant solutions. On a systemic level, that's not good for business and will crowd out people who know better.
[+] im3w1l|5 years ago|reply
> Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.

My thought here is that you start from the outside working inwards. When you encounter a conflict you must decide whether to resolve it by deleting the left or right character. Trying both possibilities should be good enough. From that decision point you just keep comparing and if it fails that branch failed.

[+] Donckele|5 years ago|reply
How have the interviews gone?
[+] markus_zhang|5 years ago|reply
I'm on the same boat.

Kind of weird (and again in the same boat as OP) as I was probably among the few in my country to actually have access to a brand new IBM PC back in the late 80s as my father got it from the university as part of the research grant. Most of my friends were lucky to own a NES at that time. But I never got the idea to learn programming.

Even as I was super interested in games and game programming (idea eventually hit), I again decided NOT to take CS as my major back in the university. It looks like I'm trying to stay away from my hobby. No idea why.

Then finally a few years ago I suddenly decided to teach myself C++ and from there I gradually built up my knowledge here and there. C++ hit me as a very good language to begin with (not a good idea btw), at least on the side of game programming. As I'd like to program retro RPGs, custom engine came as a natural thing as the earlier games were very easy on graphics. Anyway I did program a half done map editor and game for an Ultima spin-off and that was pretty much it. Eventually I got myself a couple of nice jobs so I didn't have much time for programming at the moment, but still trying to get a bit done here and there, mostly data structure and algorithm as I want to get a bit deeper before working on any medium size game project.

Anyway I don't want to turn this into a professional job as that might be tedious (I work in a game dev company). Working on side projects could be very fun!

[+] karmicthreat|5 years ago|reply
I can sympathize. I always knew how to program since my teens. I'm 45 now, and didn't really start doing professional programming till I was in my late 30s. I worked hard for about 6 years to build up enough experience to feel confident doing this.

Now I'm at the point where my current job is pretty boring and we don't grow enough to bring in harder problems. But I also really don't want to move out to SV to work on Neuralink, sats, robots. Even though those problems are one that would be super interesting.

[+] WrtCdEvrydy|5 years ago|reply
> I'm at the point where my current job is pretty boring and we don't grow enough to bring in harder problems

This is usually the point at which I job hunt. Honestly, I need a place where new and interesting problems keep propping up. I don't think I'll ever settle but I do always leave on good terms.