HNHacker News
TopNewBestAskShowJobs

markc

677 karma · joined May 4, 2012

submissionscomments
markc··on To write better, develop a habit of writing
I have implemented multi-factor authentication systems and have given public presentations on the topic, but I didn't jump to that as the first association for the acronym MFA. Guess I need to work harder on my geek cred!
markc··on The Elusive Peril of Space Junk
Jonathan McDowell of the Harvard-Smithsonian Center for Astrophysics gave a great talk at the CfA on this topic a few years back. He created GCAT, a database that attempts to track all artificial space objects. https://planet4589.org/space/gcat/web/cat/index.html

I'm looking forward to Public Observatory Night resuming in person someday. :(

markc··on What makes a good REPL? (2017)
I find this article to be excellent description of what makes a great REPL and what makes REPL development powerful.

Coding in Clojure with Emacs CIDER - with it's integrated code editor and REPL - is the most fun I've ever had with programming. The immediate feedback, the incremental building up of functionality, the ability to interactively evaluate nested expressions at any depth - it all feels very fluid and natural and immediate once you learn a few keyboard shortcuts.

Seriously, it was what finally got my programming mojo back after going stale from decades of C++ & Java. In my search for "something better" I also had good experiences with Ruby, Python, and Groovy and I also used their REPLs occasionally, but those REPLs never became central to the coding experience as it is with Clojure. (maybe I was missing out)

markc··on $1 hearing aid could treat millions with hearing loss
>There's no profit to be made, so why would anyone bother?

Really dude?

markc··on Repl.it Database
I want to like repl.it, and it's obviously great for many use cases, but compared to, say, CIDER for Clojure, it's like typing with cement gloves.

Even if it weren't so slow, there are some features I'd need before considering it for even quick/casual coding tasks:

Library loading, Paredit (or parinfer), Flexible eval (sexp, form, selection), Easy help/reference and function signature help (like Eldoc).

markc··on Hard to discover tips and apps for macOS
thank you thank you thank you!
markc··on So you want to roll your own crypto?
Here's a classic - not understanding the implications of encrypt-then-mac vs mac-then-encrypt.

https://crypto.stackexchange.com/questions/202/should-we-mac...

markc··on The Joy of Cryptography
>In particular, never ever write(x^a)(x^b)=x^ab. If you write this, your cryptography instructor will realize that life is too short, immediately resign from teaching, and join a traveling circus. But not before changing your grade in the course to a zero.

Ha! Love it.

markc··on How Happy Couples Argue: Study (2019)
>Relationships are all based on compromise

Yes, and I assume this is implied, but compromise must strike an acceptable balance. When things get too one-sided it's generally a recipe for trouble.

A good rule of thumb is for both partners to estimate their contributions or compromises to be 60+% of the total, and then there's some chance that it'll be fair (i.e. most people over-estimate their contribution/sacrifice)

I think a lot of relationship issues result from a struggle over balance/fairness because they aren't sufficiently dedicated to the others' interests and well-being.

markc··on Bertrand Russell's argument for idleness is more relevant than ever
>you're going to have to figure out what to do with all the leisure time

Not an issue for me, nor anyone else I know who has retired early. Maybe the same sort of energy that supports early retirement also leads to a fully engaged post-retirement life.

As long as you love to learn or create (or both) you will have a shortage of free time, even in retirement.

Off the top of my head, I spend time on: foreign language, guitar, writing, blogging, photography/videography, programming challenges, fitness, meditation, cooking, history, math, politics, biking, kayaking, hiking, golf, travel, volunteering, reading books/magazines/news, watching movies/shows, surfing the web, home improvement and repair, investing.

And that's just the fun stuff. There's still bills, taxes, paperwork, repairs, laundry, dishes, on and on.

Honestly, I still don't have anywhere near enough time and am annoyed by how much time sleep steals. I have no idea how I went 30 years with 50 hours lost every week to work, not to mention raising a family.

It's a trite saying, but true: you won't be bored unless you're boring!

markc··on Ask HN: Former software engineers, what are you doing now?
Drive the (26’ motorhome) RV. Somewhat limiting in cities, but the rest of the time it’s so much easier not towing.

And there are tricks for dealing with cities, like parking on the edge and biking in. Or finding RV friendly lots using google maps satellite images.

Lately cities have far less to offer (no museums, galleries, restaurants, etc.) so it’s hike and bike and enjoy the beautiful country.

markc··on Ask HN: Former software engineers, what are you doing now?
1. Traveling the US by RV (for the last year) 2. After 20 times through the product cycle and I couldn’t muster much enthusiasm any more. Having enough $$ to stop made my attitude go downhill faster. Being able to finally ignore/defy a truly terrible boss made it all come to a head even though I was walking away from almost 300k/y. Bye bye, zero regrets.
markc··on Frank Gehry started off building cities with his grandma
I’ve been to the Stata Center dozens of times for meetings, conferences, receptions, or just passing through. I like the exterior, but inside it’s horrible.

It’s cavernous, bad acoustics, drab and utilitarian, geometrically weird and therefore hard to navigate, and finding conference rooms is like a habitrail adventure with lots of dead ends and backtracking.

It’s just an all around unpleasant space (to me) that has no good explanation other than lack of caring.

But I do think it looks super interesting outside.

But I’ll never forgive Ghery for that horrific turd called the Weisman art museum at U of MN. Tear that thing down.

markc··on Show HN: A simple Poker API to calculate the winning hand/s
Here's an implementation in Clojure that scores hands and selects a winner. It handles low vs high ace in straights.

https://gist.github.com/mchampine/dca965226148dfd19d5e4d7f3d...

Most of it was done for a weekly Clojure programming challenge run by Eric Normand in his PurelyFunctional.tv newsletter. You can see all the entries at https://gist.github.com/ericnormand/fbc9b6386a66c1ece590930d...

markc··on A researcher on how to live a happy life
I use the waking up app also.

It's pretty nice. There's a introductory course on mediation, a daily meditation, and lots of theory and interview podcasts.

Harris takes you through lots of variants of 10 minute meditations, focusing narrowly (on body sensations, breathing, sights, sounds, etc.) or very broadly (taking in everything at once), or a few on wishing happiness on others.

He emphasizes, to an almost extreme degree, the search for "self", for the thinker of thoughts. It gets a bit repetitive, but the goal is keep looking but never find the self and therefore see that "self" is simply an illusion of the mind. With practice you will experience more and more the pure state of experiential flow. An interesting aspect is learning to treat your own thoughts as another "input event" appearing in consciousness, just as sensory inputs are. You observe your thoughts, but learn not to become "lost in thought".

There's also some great practical wisdom about the waste of negative thought loops, the finite nature of life, and a habit of gratitude.

He has a great bit on "the last time" which ruminates on the idea that eventually you will do everything for the last time (and you probably won't even know it. But what if you did? How would it change your attitude toward even mundane experiences?).

Also that experience is largely determined by attitude. There are miserable people in the Carribean on luxury yachts, and joyful people in the dark in freezing rain (for example on a great wilderness adventure). And it's your ability to steer your mind that makes the difference.

Good stuff.

markc··on How much do we need the police?
It was a natural experiment in what happens without police when the city is in the midst of an extreme wave of crime and violent protest, and one of the protests turns into a riot while the police were on strike.

The idea that this incident demonstrates that any city will go up in flames immediately if the police take the day off is a misreading this specific moment in history.

See: https://en.wikipedia.org/wiki/Murray-Hill_riot

That's not to dispute the idea that cities will generally retain order if police are absent. I imagine it varies wildly from one time and place to another.

markc··on The Rise and Fall of Commercial Smalltalk
Yes, I remember there was a OO programming style/discipline layered on C that was floating around in the mid 80's and I tried it out. (just found out there's a whole book about it - https://book.huihoo.com/pdf/object-oriented-programming-with...)

Shortly thereafter, C++ arrived in the form of "cfront" which was a cross-language translator that would generate .c and .h files from .cxx and you'd compile those with a C compiler. There was no actual C++ compiler at first.

markc··on SpaceX successfully launches two humans into orbit
I don't think it's a hoax, but it's pretty annoying to have the video cut out at the crucial moment. How hard would it be to buffer the transmission by a few seconds? I don't need to see it exactly live, but I'd like to see it "almost live" which would be exceedingly simple to do.
markc··on Surveillance tools used by the Minneapolis Police Department
>They were effectively eliminated by the Voting Rights Act

Except that key provisions of the act were struck down in 2013. Those provisions prevented states with a history of disenfranchisement from changing their voting laws. Since the court ruling several of these states have started back on the path of disenfranchisement.

markc··on Average adult will spend 34 years of their life staring at screens
I like the sentiment, but there's several factors here, including inherent "agility" and of course luck.

I never broke a bone as a kid, and not only spent half my youth outdoors but was a daredevil.

Summer: Tree climbing, as high as 50'. Constant bike riding on and off road, skateboarding, go carts, dirt-bikes (hill climbs, jumps), jungle gym, stilts, pogo sticks, trampolines, swings, water-skiing, touch football, street hockey, basketball, and soccer.

Winter: Flexible flyer sledding on steep hills with frequent collisions and wipe-outs (that was half the fun), snowmobiles, tubing, skiing, skitching (when streets are snowy/icy you hold on to a car's bumper and hitch a ride)

One of my own kids has the daredevil streak also and built huge jumps for bikes in summer and snowboards in winter. They'd jump over cars.

No broken bones (lacerations, bruises, sprains however)

On the other hand, I saw a kid break his leg at 2 mph by falling off his bike against a curb.

markc··on Covid and Cascading Collapses
No. I checked multiple sources with actual test results. Most cars get peak MPG at over 25 MPH.
markc··on Ask HN: Is your company sticking to on-premise servers? Why?
on-premises not on-premise
markc··on Dissecting an SSL Certificate (2017)
Nice post, good for a certain degree of "dissecting".

I assumed however that we'd be going all the way down to the bytes. I spent quite a long time with "A Layman's Guide to a Subset of ASN.1, BER, and DER" as a close companion, though it looks like letsencrypt has created a friendlier intro: https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/

While it's relatively rare that you'll have to understand the encoding, it can be a lifesaver to have that skill if you're looking at some raw dump of of a cert (or other BER/DER encoded data).

I had a co-worker once who was famed for having a BER/DER decoder in his head. He'd look at a hex dump and point to a spot somewhere in the middle and declare something like "there's your problem: the cert signing bit isn't set in your key usage extension".

markc··on Ask HN: How to rediscover the joy of programming?
Use 4Clojure for practice. Talk about humbling! You’ll struggle to write a 20 line abomination and then see some wizard’s beautiful 2 liner that does the same thing. You might spend a long while grokking it, but when you do you’ve added one or more new tools to your Clojure problem solving repertoire.
markc··on Ask HN: How to rediscover the joy of programming?
Me too. I was bored with 2 decades of C/C++/Java and didn’t like programming any more. Dabbled with Ruby, Python, Groovy and enjoyed them. Discovered Scheme, SICP, and Clojure and never looked back. Beat my head against not having my old problem solving paradigms, but it was fascinating rewiring my brain. It finally clicked and coding has been a joy ever since. The Clojure REPL rocks.
markc··on Why did the 1982-era MCZ 2/60 desktop computer have an Exxon logo on it?
Ha. My dad was VP engineering at Vydec for a while. I worked there for a summer, and used the Vydec to write a Pascal course (which I taught there). It had a great vector display, nice keyboard. It had 8” floppy disks. I think they were selling for $10k. I remember seeing my first sealed 20Mb “Winchester” hard drive there, which would be incorporated soon. Nicely designed, advanced word processors for their time. Dad told me about the time he met with Francis Ford Coppola who wanted to buy a bunch for Apocalypse Now. Exxon Information Systems bought them around then, and there was a management bloodbath. My dad initially got more responsibility as his bosses got the axe, but he saw the writing on the wall and left for DEC. Wang soon destroyed them in the market.
markc··on What concept would improve everybody's cognitive toolkit? Kayfabe (2011)
Are you telling me that Blake and Adam weren’t actually rivals??!!
markc··on General Transit Feed Specification and Clojure
>reads the CSVs from the .zip file

Neat! I can't find anything in Clojure that does that, so I guess I'd have to use java.util.zip via Clojure ineterop. But making records and doing queries is easy:

> generate classes at runtime using the headers in each CSV

In Clojure:

    (ns gtfs.core
       (:require [clojure.data.csv :as csv]))
    
    (defn load-records [f]
      (let [csv-data (csv/read-csv (slurp f))]
        (map zipmap
             (->> (first csv-data) ;; First row is the header
                  (map keyword)
                  repeat)
             (rest csv-data))))
    
    (def agency-maps (load-records "data/agency.txt"))
    (def routes-maps (load-records "data/routes.txt"))
    ;; etc.
    
    (count routes-maps) ;; 30
    (first routes-maps)
    ;; {: route_id "1-100",
    ;;  :route_short_name "1",
    ;;  :route_long_name "Ligne 1",
    ;;  :route_desc "",
    ;;  :route_type "3",
    ;;  :route_url "",
    ;;  :route_color "#B22E75"}
> defines a 'select' function to make queries easy to write

    ;; Query for long_name and route_color 
    (def route_ln_color (map #(select-keys % [:route_long_name :route_color]) routes-maps))
    
    (take 2 route_ln_color)
    ;; ({:route_long_name "Ligne 1", :route_color "#B22E75"}
    ;; {:route_long_name "Ligne 2", :route_color "#B22E75"})
markc··on General Transit Feed Specification and Clojure
No, because that data isn’t available in the public API.
markc··on General Transit Feed Specification and Clojure
Fun project! I also used Clojure for a transit status project - calling the REST API of my local bike share system to display how many bikes were in the nearest station. Clojure is great for exploring and transforming that kind of data.

One small tip for the author: clojure.data.csv would simplify csv handling. Its readme includes a simple routine to transform the data to maps.

← PreviousPage 3 of 9Next →