Live data from Hacker News

I am a quite good bad programmer

news.ycombinator.com

71–80 of 160 posts

Re: I am a quite good bad programmer

#71
A good number of people conducting interviews are never given any formal training. They may be biased against you before you even enter the room. Fortunately the demand for programmers is still good so take feedback from the interview process with a grain of salt.

There are great websites where you can practice technical interview questions. Leetcode, etc. When I'm getting ready for interviews I keep a practice journal and build a deck of flashcards. I use the practice journal to categorize the problems I work on, how long it took me, how many times I've practiced that problem, notes on my solutions, etc. I try to cover the 5 most common solution types: _depth first search_, _breadth first search_, _binary search_, _two pointers_, and _dynamic programming_. Review the most common data structures and their look up times. And I use the flashcards to test my reading comprehension: I put the problem description on the card and the answer is which algorithm should be used to solve it.

This gets me through 90% of interview exercises. Occasionally you get hit with a smart aleck who will try to blind-side you with an optimization problem after a hard dynamic algorithm. It's good to have some breadth in your knowledge of special data structures like heaps, k-d trees, and the like but I wouldn't waste too much time on them unless you know ahead of time that the company you really, really want to work for is likely to ask these sorts of questions. I try to book those companies for the end of a round so that I have time to warm up before I get to the ones I really want (and need to practice harder for).

Re: I am a quite good bad programmer

#72
post #65

Earlier quoted context omitted.

> someone who had done pretty well in our DS > Him: “I can’t. I need to be able to get both the key and the value and hash tables don’t store the key” How could he do well in the data structures class? This is the definition of a hash map or hashed dictionary, so this is basic knowledge of data structures that is taught in this class and central to know to even have a chance of passing the exam.

No, technically he's right. On paper, a hash map creates an index in an array-like structure from the key, but does not necessarily store the key in a retrievable way. The "Hash" in hashmap comes from the fact that the key is somehow hashed (an often irreversible procedure) to determine the memory location to store the value. In practice it's not the case, but very technically from a purely theoretical standpoint, I…

There's no theoretical way for a hash map to work without storing the key - the reason for that is hash collisions in presence of which you do need to run equality comparison with stored keys otherwise you would overwrite data just because of hash clashes.

Re: I am a quite good bad programmer

#74
Your list makes the case for being "good", but that doesn't matter.

The "job interview questions" are largely popularized by people who do not understand hiring, and probably don't understand much of anything else, with a cargo cult mindless copy/paste of practices that don't actually apply to them.

There is a niche of a niche of a niche of roles where deep specialized knowledge is actually a baseline requirement in order to be successful in the role. 99% of the other roles filled by human beings who write software don't require anything close to it, but the companies delight in wasting everyone's time anyway.

Most of the very best programmers I've ever known bomb these idiotic interviews and the companies (and their customers) lose because of it.

A fine place for me to stop babbling.

Re: I am a quite good bad programmer

#75
I wanted to give you a completely objective opinion, so I went from gematrix.org > www.c2kb.com > 9gagrss.xyz and based on that and your user name I found this: https://github.com/caviv/9gager

One thing, I think, you should be really careful about is how you handle user inputs, e.g. this line: https://github.com/caviv/9gager/blob/20ccaaf649af525fc7a0c1d...

I validated this on the live site as well, and it was really easy to insert any kind of HTML through the `channel` param. This is called XSS or Cross-Site Scripting.

Also, you seem to regularly commit code that includes database connection information (I hope it is not active anymore, or at least not reachable from the outside internet), e.g.: https://github.com/caviv/9gager/commit/bcc0b91eb8638835c1557...

Now, to be clear, this doesn't necessarily make you a bad programmer per se. But in my eyes, your claims of being "actually really good" seem to be over the top, and what I see is that you still have a lot to learn about the web and especially about security.

Re: I am a quite good bad programmer

#76
I guess I'm pretty bad.

Lots of folks, that I know aren't especially good (because I've looked at their work), take great joy in telling me how bad I am, which they seem to know, without looking at any of my work, so I guess I'm just terrible.

That's one reason I don't bother being competitive. "Good" is in the eye of the beholder.

If someone comments their code, that can be "good," for some, and "bad," for others.

If someone adds extensive, nested error handling, that's "good," for some, and "bad," for others.

And so on...

Usually, both sides have quite valid points.

I just do things the way that I do them. Seems to work.

WFM, YMMV.

Re: I am a quite good bad programmer

#78
post #72

Earlier quoted context omitted.

No, technically he's right. On paper, a hash map creates an index in an array-like structure from the key, but does not necessarily store the key in a retrievable way. The "Hash" in hashmap comes from the fact that the key is somehow hashed (an often irreversible procedure) to determine the memory location to store the value. In practice it's not the case, but very technically from a purely theoretical standpoint, I…

There's no theoretical way for a hash map to work without storing the key - the reason for that is hash collisions in presence of which you do need to run equality comparison with stored keys otherwise you would overwrite data just because of hash clashes.

>> In practice it's not the case, but very technically from a purely theoretical standpoint, I think he's right.

> There's no theoretical way for a hash map to work without storing the key - the reason for that is hash collisions in presence of which you do need to run equality comparison with stored keys otherwise you would overwrite data just because of hash clashes.

There's a ton of material in a Data Structures course. I'm sure the point about storing the key was mentioned at some point, but it's not the focus when talking about different hashing strategies etc. For people with a bunch of experience (e.g. I'd been writing Perl for years before this, so being able to iterate across a hash and get (k,v) pairs was obvious) it's a detail that is already there in your brain, but if the DS course is your first exposure to a hash map, it's a detail that can easily get lost in the huge forest of other brand new things to learn.

Re: I am a quite good bad programmer

#79
I applied for a job.

I did a coding assignment.

I was asked to read two xml files, one with data, one with operations, and perform the operations on the data.

The task was deliberately unclear and suggested to not use third party software.

So I did the thing and wrote an xml parser.

I documented my decisions in design etc.

Later I found out that one could have used any third party XML reader package.

I was declined for other reasons but when asking for feedback on my code, all I got was: You did not check for divisions by zero.

I am still wondering what skill they actually wanted to test with the coding assignment.

Re: I am a quite good bad programmer

#80

Your list makes the case for being "good", but that doesn't matter. The "job interview questions" are largely popularized by people who do not understand hiring, and probably don't understand much of anything else, with a cargo cult mindless copy/paste of practices that don't actually apply to them. There is a niche of a niche of a niche of roles where deep specialized knowledge is actually a baseline requirement in…

This isn't babbling at all, the sentiment in your 2nd paragraph is so accurate that you could drop the qualifiers "largely" and "probably" and it would become even more accurate.
Post reply on HN