HackerTrans
TopNewTrendsCommentsPastAskShowJobs

the-alchemist

no profile record

comments

the-alchemist
·2 miesiące temu·discuss
There's some really good analysis (both business and tech) from the Asianometry youtube channel (ignore the name of the channel): https://www.youtube.com/watch?v=RmgkV83OhHA&list=PLKtxx9TnH7...
the-alchemist
·3 lata temu·discuss
The "original billion dollar mistake" is lack of runtime bounds checking (in the creator's words), not the idea of a null/nil/undefined generally.
the-alchemist
·3 lata temu·discuss
I almost didn't believe you there!

https://developer.apple.com/documentation/coremedia/1489454-...

"Creates a metadata format description by extending an existing description with the values you specify."

The description doesn't sound so bad...
the-alchemist
·3 lata temu·discuss
Yeah, poor performance and memory usage. In the Java world, thread locals are java.lang.ThreadLocal, basically a hashmap from thread to variable.

Using a ThreadLocal is (usually) a code smell. It's optimized / supposed to be used with just a few threads, not millions.
the-alchemist
·4 lata temu·discuss
Funny, I was just looking for a PT clojure dev.
the-alchemist
·4 lata temu·discuss
Yeah, quite different. Technical as much as procedural and psychological.

In a Clojure REPL, you navigate "modules" like directories. And each directory has "files", or vars you've defined. Basically 'cd' and 'ls', but for module-level structures.

So you 'cd' to one "directory", query an AWS service or read a CSV file, and save results in that namespace ("my_namespace/my_results"). While you're at it, you save the results to a JSON file ('echo ... > tests/saved_results.json').

(You type this all into a REPL, no need to save this one-time command in a file. You can always re-run it by pressing UP like in bash.)

Then, you write a function called 'save_to_db()' in your text editor in the "database" namespace that accepts the input and writes to a database. You send that function to the REPL, and in the REPL, run the function on the results you saved from the first step in the var ("database.save_to_db(my_namespace/my_results)".

While you're at it, you 'cd' to your "tests" namespace in the REPL, and write a quick test in your test editor that parses 'tests/saved_results.json' and calls your "save_to_db" function and verifies the database. Send test to REPL (keyboard shortcut), run the test (another keyboard shortcut), fix the code, send updated code to REPL, rinse and repeat.

And this is all in one process, so you only "start up" Java once. Everything else is basically instant.

There's a ton of Youtube videos on using Clojure REPLs. It's really a game changer...