Live data from Hacker News

On finally learning to program at the age of 40

github.com

31–40 of 169 posts

Re: On finally learning to program at the age of 40

#31

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 ty…

> 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.

Re: On finally learning to program at the age of 40

#32

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 ty…

How have the interviews gone?

Thanks for asking! So far so good. I must admit I'm a bit skeptical but still hopeful about the FAANG interview. The interviews with a few less famous companies have been good. (Actually one is very famous, even more than the FAANGs, but not a "tech" company.)

I will know more this week and will report back. :-)

Re: On finally learning to program at the age of 40

#33
post #31

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 ty…

> 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 faile…

Yup, that is pretty much the solution I discussed with the interviewer after writing the code above. We ran out of time to write out the full code, but hopefully coming up with the rough description of a solution like yours was satisfactory.

Waiting with bated breath for the interview feedback... :-)

Re: On finally learning to program at the age of 40

#34
post #31

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 ty…

> 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 faile…

That's a quadratic solution. Try solving an inverse problem to get insight - how to know if a sequence is almost a palindrome and what's the "palindromicity" metric - and you will find the faster solutions. (I think it leads directly to a Knuth-Morris-Pratt like algorithm. And you can further apply a variant of divide and conquer on top.)

Re: On finally learning to program at the age of 40

#35

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 ty…

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.

Re: On finally learning to program at the age of 40

#36
post #31

Earlier quoted context omitted.

> 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 faile…

That's a quadratic solution. Try solving an inverse problem to get insight - how to know if a sequence is almost a palindrome and what's the "palindromicity" metric - and you will find the faster solutions. (I think it leads directly to a Knuth-Morris-Pratt like algorithm. And you can further apply a variant of divide and conquer on top.)

No it's not quadratic: since there is at most one conflict it will be linear.

Re: On finally learning to program at the age of 40

#37
post #10

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 thi…

Very nice, and it was actually properly attributed, too.

Re: On finally learning to program at the age of 40

#38
Wow. So this article is just some clueless non-programmer doing some language hopping without ever really learning much besides some casual basics.

Just the sentence "but the self keyword was still confusing" is a tell-all. In Python, self is not a keyword.

Don't get me wrong, it's great when non-programmers (who certainly have other valuable skills) play around a bit with toy programming, but real software engineering or even computer science are much more than pondering over curly braces. If you really want to learn this, then that's where you should start. And yes, a CS university degree would get you there, not some half-baked Rust tutorial. That's just an insult to everybody who learned this for real. Comparable to somebody claiming "at age 40 I finally learned medicine!" after watching a few episodes of Dr House and reading the wikipedia page of appendectomy.

Re: On finally learning to program at the age of 40

#39
post #2

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…

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.

Re: On finally learning to program at the age of 40

#40
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.
Post reply on HN