HNHacker News
TopNewBestAskShowJobs

msluyter

4,603 karma · joined March 5, 2008

Software Archaeologist. Lives in Orlando, FL. Unfortunately.
submissionscomments
msluyter··on Many Colleges Fail to Improve Critical-Thinking Skills
The best introduction to logic and critical thinking I ever experienced was in a high school english class. In particular, understanding the various informal fallacies (hasty generalization, post hoc ergo propter hoc, argumentum ad populum, etc...) was extremely influential in turning me into a young rationalist.
msluyter··on The State of Go – Where we are in May 2017
Hmm, I guess I was going of benchmarks such as these, which suggest Go is, well, faster some of the time?

https://benchmarksgame.alioth.debian.org/u64q/go.html

However, perhaps as you indicate these are including JVM startup time and thus tainting the results. For some reason I had gotten it into my head that Go was faster than Java, but it's been a couple of years since I've used either one, so I definitely may be off on that point.

msluyter··on The State of Go – Where we are in May 2017
Like someone mentioned, it's hard to answer this in the general case. Factors to consider would be: a) are you dependent on the JVM and Java ecosystem? b) Are you already familiar/comfortable with Java/Scala? "Yes" answers to both of these might lean you towards Kotlin.

c) is speed essential? d) are you doing systems programming as opposed to CRUD webapps?[1] These might lead you to Go.

[1] I know you can do the latter in Go, but it's unclear that it's as easy/productive as in other langs currently (nor have I directly compared, say, Revel to other frameworks, so someone else is probably better qualified to answer this question.)

msluyter··on More Robots, Fewer Jobs: capital vs. labor in production
For a mathy discussion related to this topic, I ran across this interesting and depressing paper a while ago:

http://www.danielsusskind.com/research

The depressing conclusion: " In a static model, increasingly capable machines drive down relative wages and the labour share of income and force labour to specialise in a shrinking set of tasks. In a dynamic version of the model, labour is driven out the economy at an endogenously determined rate, forced to specialise in a shrinking set of types of tasks, and wages steadily decline to zero."

msluyter··on Creating a memory leak with Java
Seems like there's some debate over what "memory leak" really means. On the one hand, you can just inadvertently grow some resource -- say, by appending to a list indefinitely -- until your sever crashes. But in this case, if the list goes out of scope it should be garbage collected, so such memory is in practice reclaimable.

The more interesting case is allocation of memory which is not in practice reclaimable (as described in the first answer.)

The former seems pretty trivial to understand, but if the original interviewers meant the latter I doubt I would have been able to come up with a good example off the top of my head.

msluyter··on ApiStar, a new Web API Framework by the author of Django REST Framework
Noticed this from Pycoders Weekly. Looks interesting -- I was curious what the motivation was to write it?
msluyter··on Micro-monolith anti-pattern
"Another dangerous decision is to use a lib for reusing code. This is particularly bad if the lib contains domain logic."

Question about this: if we're to take the above to heart, doesn't that imply that we may implement some common functionality multiple times? It seems there's a real tension here between "code re-use" as a generally laudable goal and the need to avoid sychronization of testing/deployments.

I'm curious how others out there have dealt with this particular issue.

msluyter··on Tears
I recall Scott Alexander (slatestarcodex.com) proposing the tears/bullying hypothesis somewhere, but I can't seem to find it at the moment.
msluyter··on Suicides in Rural America Increased More Than 40% in 16 Years
Tyler Cowen's mentions our decreased mobility in his book "The Complacent Class." Here's a bit from an interview in the Washington Post[0]:

WP: Some of the lack of mobility is due to high rents in cities, which keeps many people out, right? You cite some research that shows if it was cheaper to move into American cities, GDP growth would be much higher, and the economy would be more dynamic.

Cowen: Enrico Moretti’s estimate is that GDP would be 9.5 percent higher. That figure is hard to estimate, but it’s not a tiny effect. Right after WWII, adjusting for inflation, an apartment in Manhattan cost $530 a month. That’s unimaginable today. It’s a big reason why mobility has become problematic.

[0] https://www.washingtonpost.com/news/wonk/wp/2017/02/28/upper...

msluyter··on Simple command-line snippet manager, written in Go
This is cool. Also, there is one little trick you can do to make your shell history easier to search. You can comment your commands and then search via comments:

  % big hairy command here # foo the bars!
Then you can history search for 'foo' or whatnot. That doesn't totally obviate the need for a tool like this. I plan on checking it out.
msluyter··on Snakisms
Some other possibilities:

Socialism: there are two snakes, and the 10 points for eating an apple gets split between them.

Communism: the game starts as Capitalism with two snakes, but then the game switches to Socialism, and the 50$ (or remainder) gets expropriated and split between the two snakes.

Late Communism: Starts like Communism, but more and more points for apples get allocated to the AI snake (and fewer to you) because it's a member of the communist party.

Late Late Communism: Like Late Communism, but eventually no more apples appear. Game implodes and turns back into Capitalism, but the party member snake has all the money.

Platonism: another game runs in parallel alongside this one, but the snake is perfect and the highest possible score is obtained.

msluyter··on Should economists be more concerned about AI?
Relevant to this discussion:

A Model of Technological Unemployment http://www.danielsusskind.com/research

msluyter··on The most mentioned books on Stack Overflow
I've seen this argument before, but I don't really buy it. Why did they subtitle their book "elements of reusable object oriented software" if they didn't intend to present "patterns" as "templates." (After all, "reusable" is a good thing, right? So if you follow these patterns your code will be reusable, hence, good.) Why did they use the word "pattern" at all? Why not name the book "Software Structures: observations about software out in the wild?"

In any event, it doesn't really matter what the original intent of the GoF book is because in practice, people treat design patterns as, well, what the word "pattern" would suggest: "something designed or used as a model for making things <a dressmaker's pattern>".

This is further indicated by the term "anti-pattern," which basically means, "something you should avoid." If you should avoid the "anti" then it stands to reason you should follow the "pattern."

For even more demonstrations of this fact, look at subsequent design patterns book, like one by the Head First. These explicitly treat patterns as improvements to be made over some previous attempt at a coding problem. Or hell, check out this description from https://sourcemaking.com/design_patterns -- "Design patterns can speed up the development process by providing tested, proven development paradigms." " Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns."

Whether it was the original intent of the GoF or not, design patterns are mostly perceived to be _good things_ that should be adhered to.

Now, as many have suggested, the wisdom of reaching for design patterns has been increasingly viewed with skepticism, and rightly so. It'll be interesting to see over time how much weight they carry and where the equilibrium lies. My guess is that certain patterns will essentially fade from relevance (if your language has first class methods, do you really need Strategy, for example?) While some (adapter, facade) remain useful ways of handling various problems.

msluyter··on Sony and LG stop making 3D TV sets
Not that you asked me, but here's one reason: I have keratoconus and even with glasses and multiple eye surgeries don't see 20-20. Moreover, my right eye is considerably worse than my left, which means that I can't quite get binocular vision to work, making 3d viewing impossible for me. I realize folks like me are a tiny minority, however.

Perhaps a broader reason is that 3d seems to encourage filmmakers to go for visual spectacle over good storytelling.

msluyter··on Most used words in programming languages
I think that depends on the length getAge(). If it's 3 lines, 'p' probably is fine. If it's 200 -- which, perhaps it shouldn't be but that's another issue -- then person is probably a better choice because you may lose the original context as you scan the method.

Also in Java if you use intellij then you'll probably get 'person' as an autocomplete, which actually makes it roughly as easy to type out as 'p', (and a better choice if your entire team has standardized on intellij.)

msluyter··on Ask HN: The WSJ paywall workaround no longer works. Why are their links allowed?
Since when has reading the article ever been a prerequisite for discussing it on HN? ;) </snark>

That said, iirc, someone often helpfully posts the text of the article in such cases. Why go through the effort of banning something when either a) someone will continue to do that, or b) interest/upvotes in paywalled stories will die naturally?

msluyter··on Ask HN: Are we overcomplicating software development?
Though perhaps it's considered a component of 2), one could add Docker/containerization. I've watched folks spend weeks and weeks getting Docker setup for a service that probably didn't need to be containerized at all. And then once it's Dockerized, introspection/debugging/etc... seem to become much more difficult.
msluyter··on Ask HN: Have you ever worked on a product that was killed by technical debt?
Hey, sounds like we worked at the same place! That, or the "wedded to Oracle for life" is a common antipattern. I'd add "shared everything architecture" to the horrors.

Yeah, once you get that deeply entrenched in Oracle, it's almost impossible to get away, and after that experience I vowed never to work at another Oracle shop.

msluyter··on Analysis of longevity of code across many popular projects
A lot of projects I've worked on have utility libraries consisting of mostly stateless, pure functions -- I have a theory that these constitute some of the longest lived code. That, and database models, which tend to be easier to expand than to contract. I'd be curious to see some analysis along these lines.
msluyter··on How I stopped the RSI pain that almost destroyed my programming career
I've found that there are a number of different prescriptions for RSI pain, and that you have to experiment until you find what works for you. But that's complicated by the fact that it's hard to run experiments on yourself because there are so many confounding variables.

In any event, to add to the anecdata, someone below recommends not resting your arms/wrists on anything and letting your hands float above the keyboard. I've tried this, and the small muscles in my back that keep the arms lifted would become sore bundles of fire that eventually would spread pain throughout my back/neck/arms/wrists.

I found, paradoxically, that totally resting my arms splayed wide on my desk combined with a Kinesis Freestyle so I can keep my wrists straight (this wouldn't work with a regular keyboard) is the ideal setup for me.[1]

Not saying this would work for everyone.

[1] I have a standing desk combined with a high chair oriented such that the desk comes a bit higher on my chest than a sitting desk would, such that I can just rest my arms on the desk. The keyboard is not elevated and is basically flat to the desk surface, and is separated and angled such that my wrists are not bent.

msluyter··on Why Are US Presidential Elections So Close?
A similar take on the issue in this old Slate article:

http://www.slate.com/articles/news_and_politics/kausfiles_sp...

Choice quote:

"But why should we expect the deadlock to be broken at all? Think of it in ... well, cheap Darwinian terms. Imagine that we have a two party system, and each party is a collection of status-seeking individuals looking for power by winning a greater "market share" of the vote. Imagine that they each have their ideological principles --one is more to the left, one more to the right -- but these principles are quite flexible in the face of imminent or repeated failure at the polls. Over time, as each party crafts its message to maximize its appeal -- and adjusts its message after each election to regain any lost share of the votes -- wouldn't one expect the system to reach a roughly 50-50 equilibrium, in which every election was a cliffhanger?"

msluyter··on Writing more legible SQL
A couple of jobs ago, I worked at a company that did a ton of SQL and we used right justified keywords, which looks like:

    select t1.col1,
           t2.col2,
           t3.col3
      from table1 t1
           join table2 t2 on t1.col2 = t2.col1
           join table3 t3 on t1.col3 = t3.col1 
            and t3.col2 = something_else
     where t1.col1 > 0 
       and t2.col2 <> t1.col4
     order by col2
     limit 100
Initially it seemed weird to see the ragged left edge, but over time I got used to it and grew to prefer it. It doesn't really hold up for extremely complex queries with lots of subqueries because everything tends to start drifting too far to the right (unrealistic example below):

     select *
       from blah b
      where b.whatever in (
          select blah 
            from c
           where c.whatever = in (
               select blah 
                 from d
                where d.whatever = 'foo'
           )
      )
I almost never see this style used these days, and I was curious if anyone else does it this way?
msluyter··on Ask HN: What is your favorite internet rabbit hole?
Slate Star Codex: http://slatestarcodex.com/, for a lot of interesting socio-philosophical discussion on a variety of topics.

Meditations on Moloch is one of my favorites:

http://slatestarcodex.com/2014/07/30/meditations-on-moloch/

msluyter··on Micro v1.0 – a terminal-based text editor written in Go
Any way to bind the mac command key (⌘)?
msluyter··on Is anybody else using ridiculously long variable names?
My general rule is that the greater the scope -- lexical or runtime -- of a variable, the more descriptive its name (which often means longer but not always!)

So, for a short lived variable, I'm personally ok with it being short, as in, some random bit of python:

  # strip the last char from everything in a list
  some_list = [s[:-1] for s in some_list]
IMHO, I don't really think it matters what 's' is here, and I don't think it would would be that helpful if given a more meaningful name. The cognitive load is small.

Conversely, variables that live a long time and/or operate globally are better off with a longer name.

However, I would observe that your example might suggest a coding issue, the tipoff being 'and'. If a single variable is handling two chunks of state, then perhaps it's doing too much and you might be better off with something like:

  val documentSavedOnDiskJsonStates...
  val pdfSavedOnDiskJsonStates
Not huge savings there, but perhaps also things might get clearer encapsulating these things in a class, with methods like (just making stuff up):

  document = Document.getFromDisk()
  document.jsonStates()
Not saying that this is always the correct approach or valid in your particular case, just making the general observation that IME highly modular code tends to require fewer really long names.
msluyter··on Standup Antipatterns
Another antipattern, not specific to standups: everyone sitting around absorbed in their laptops not paying attention to anything until their turn comes around. (Another reason to actually stand during standups, I suppose.)

Another mentioned in this thread -- if you have distinct groups within a team who are working on mostly separate projects, don't combine their standups. Otherwise, you just encourage half of the attendees to tune out (exacerbating the situation above.)

msluyter··on Why Experts Make Bad Teachers
Warning: anecdota.

Having taught music and dancing at various points in my life, I've noticed that -- at least in these sorts of fields that require some sort of body mastery -- the best teachers often weren't the most naturally gifted. They often had to struggle and reason their way through issues in ways that the most gifted/natural musicians/dancers didn't. And because of that, they were often vastly superior teachers simply because they had learned how to think about and articulate a given subject. They could translate the wealth of techniques they had developed to learn the subject to others.

And perhaps, having struggled themselves, they would be more patient.

True, that's all ad hoc theorizing on my part, so I wouldn't promote that as some sort of universal truth, but it's something that I've heard from lots of musicians.

(All of the above is tangential to the OP, btw, which I don't necessarily find that compelling.)

msluyter··on Ask HN: What three books impacted your career the most?
1. Godel, Escher, Bach -- Because it sparked my interest and got me started down the path.

2. The Pragmatic Programmer -- a classic. Reminds me that I need to re-read it.

3. Effective Oracle by Design, by Tom Kyte -- Not that I use Oracle any more, thankfully, but really provided a lot of insight about how databases function and how it pays to deeply understand their internals when writing webapps.

msluyter··on Programming Language Rankings: June 2016
Yes, that, and the quality of applicants tends to be higher for some of the less popular but more interesting languages. I worked at a company that had a large java codebase and was reluctant to try anything different for fear of not being able to find developers. But then we'd get these applicants with dozens XML/JAX-WS related keywords on their resumes but who couldn't write a simple for loop or understand what a database transaction meant.

I recall reading about someone (was it Spolsky? IDR) who looked for candidates with certain niche languages on their resumes, because it served as a quality signal. If they're interested in learning Clojure, for example, they may just be more generally curious and/or have a desire and interest in learning about different paradigms.

That said, at a practical level one has to balance competing demands. If you have someone on your team working on a project in X and they're the only X developer you have, you're at risk because if they leave, you may be screwed. Plus, they won't be getting quality feedback on their work because no one else can understand X.

msluyter··on Simple Ways of Reducing the Cognitive Load in Code
I suppose to some extent this is a matter of taste, but I've usually found the streams api to be clearer and easier to understand, although perhaps there's a bit of a learning curve. I think the win is especially large in cases where you replace an anonymous inner class with a lambda, imho. At my previous job, we had all gotten quite familiar with Apache's CollectionUtils, but java8 almost obviates the need for that entirely.
← PreviousPage 8 of 33Next →