Preferences

wrwatson
Joined 23 karma

  1. I think of comments as an apology to the engineer reading the code.

    I'm apologising because the code isn't obvious, or the language not sufficiently expressive, or the good-idea-at-the-time no longer is. Ideally I wouldn't need to write many comments, but I often find myself sorry things are not simpler.

  2. The first rule of data modelling is that you should model only what you care about. A good model allows you to store and retrieve what you need to meet your requirements.

    Maybe you care about all the events that have ever happened on your incredible journey to reach a list of the customers you have today.

    Or maybe it would be sufficient to have been mutating a customers table all along. If that is sufficient, then it would be faster and more straightforward to have done so.

  3. I am called apon to investigate database performance problems. Teams using Hibernate sometimes send me the Hibernate query. This is not enough to understand the SQL which has been issued. I would also need to see all the entity objects, and maybe some configuration parameters. Without the SQL, which nobody can exactly predict, it is difficult to performance tune.

    So they turn on logging, get the SQL, and email that unreadable mess. In most of the cases I have seen, the SQL is fetching much more from the database than what the code really needs.

    The first step when optimising SQL is to only ask for data that you actually need. Hibernate, as I have seen it used, defaults to fetching too many columns. I cut the SQL down, and come up with a performant statement. The developer has the challenge of translating the performant SQL back into Hibernate.

    Hibernate makes easy things easier and harder things harder.

  4. I've considered if a discussion site like this would work solely based on the headline without actually needing TFA. Often it feels like people who comment just want to share their point of view about a particular topic rather than the article itself. Many people read the comments first (or exclusively).

    Perhaps Dang could get analytics on how many people viewed the comments and how many people clicked through to the article to answer your question.

  5. I'm the developer of a Virtual Terminal web page which allows a merchant to accept credit card payments. I would love to turn-off autocomplete for the credit card details. The person using the Virtual Terminal wants to type in someone else's card number, not use their own every time.

    The PCI-DSS council is partly to blame here, for recommending autocomplete=off in other contexts.

  6. Yes and it was simultaneously a fantastic experience and a waste of time.

    I say a fantastic experience because I played lots of people from around the world, some of whom I eventually visited in their home countries. I also improved as a developer. It was a great thrill one day to meet a friend-of-friend who loved some of the code I'd written.

    I say waste of time because I spent endless hours in my early 20s glued to a telnet session. In retrospect I would have been better taking up a pass time that let me meet people in person. I've been better at avoiding addictive games since.

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal