Better HN
topnewbestaskshowjobs
Log inSign up

zero_shift

4,017 karma · joined Mar 10, 2017 (9y ago) · 930 submissions

I really like computers!
Submissions

comment 6y ago · link · parent

This is a work-in-progress reference architecture for Node.js projects.

Its key features are

- an IOC, domain first development style - isolation of pure, domain focused code - an easy way to compose together "adapters" providing side effects - documentation in the form of a GitBook guide

It's still quite early in development and feedback is very valuable.

I hope you have as much pleasure reading it as I had writing it.

722.

Show HN: Node TypeScript Architecture (WIP)(github.com ↗)

1 points · by zero_shift · 6y ago · 1 comment

comment 6y ago · link · parent

If I were a JS developer who only wanted to write JS, but I needed to do a database query, should I look for a database that lets me write queries in JavaScript (or a language basically interchangeable with JS)? Or should I just learn SQL?

Sometimes as a programmer you need to learn new tools for new domains, and that's not necessarily a bad thing.

comment 6y ago · link · parent

> Implying that JavaScript was ever appropriate

Can we please stop doing the 4chan-esque snarky >implying ? It's not discussion in good faith.

> Minifying is highly overrated to begin with

Compression is not magic and minifying has real world performance gains in JS projects at least - I don't see how Python would be different here.

> Lambdas are supported

If you want to write your event handlers - which in UI programming is a lot of your code - in a point-free style, then I think you'll be letting yourself in for a lot of hassle.

> Webpack... What does this even mean?

I don't know Python too well, but I assume this is about the ability of Webpack to overload import semantics with non-code dependencies (e.g. importing stylesheets, icons, bits of JSON). Presumably Brython does not support this.

You seem quite bullish about the strengths of this project. Exactly what problems do you feel it solves? Assuming that we already have tooling like Webpack and are able to write in either ES2020 or TypeScript, what do you think we gain from writing our UI code in Python?

comment 6y ago · link · parent

I am aware of legal clinics and pro bono work, but this is very different from legal training.

Even here in the UK, taking a GDL and LPC/BCPL is a very expensive proposition. There are no real free resources, if you want even a sniff of it you are putting down serious cash. I know because I looked very hard at doing it, and opted out partly because of the perilous costs involved.

The engineering example is very different: helping high school kids take nurture an interest in engineering is definitely a common volunteering trope. I'm not sure it's the same as giving potential practitioners free professional training.

> I think your perception of what other professions do might be limited by your own experience, though.

Politely, I do not think you should be making that assumption about strangers on the internet.

comment 6y ago · link · parent

I'm struggling to add this all up.

On the one hand, I have some evidence that my job is hard: I have spent ten years learning to be proficient at it, still know only a narrow slice of it, and find it challenging every day. I have a solid degree from a world-renowned university, so I know I am not stupid. I also interview candidates, and know that many applicants simply cannot do the job.

But on the other hand, there is such a sheer volume of resources like this, which imply very clearly that becoming a programmer is a trivial thing. So many in fact that I am starting to doubt the evidence of my eyes and ears.

So which is it? Is there a weird drive to constantly undersell our skills, a knowing wink to the managers who have always secretly suspected us of being nothing more than glorified typists? Or are the bootcamps right, and I've spent a decade learning replaceable trivia? And why is making statement #2 seen as positive and inclusive?

comment 6y ago · link · parent

Are you saying that engineers, doctors, lawyers etc. have an obligation to teach others for free? And to shoulder any and all costs associated? Are you also suggesting that junior programmers are entitled to the unpaid labour of mentors?

And what about teachers generally? Isn't teaching an important skill that deserves remuneration? Doesn't offering free tuition drive down the value of teachers? Should these people be improverished for (one) sense of "societal progress"? I'm not sure I can agree.

comment 6y ago · link · parent

It's interesting though, how that will scare us, but not something equivalent for digital infrastructure.

Of course, bad programming will never do the same damage as a building that collapses, a bridge that folds in two, etc. But it can do damage enough: harming lives, enabling crime, and costing businesses a huge amount of money.

comment 6y ago · link · parent

Maybe that's the link? Teaching, writing about and sharing resources on a creative pursuit is itself quite a creative endeavour.

Or to put it another way, if you like the process of taxonomy and description that goes into programming, you might well enjoy the process of taxonomy and description that goes into teaching it too.

comment 6y ago · link · parent

Software engineering must be one of the few professions where individuals freely share their energy and expertise with others.

This isn't a criticism, neither of the "help others code" movement, nor more insular industries. It's just a very unusual aspect of our field and I wonder where it comes from.

For instance, can you imagine reading any of these?

Show LN (Litigator News): Learn employment regulations to become a paralegal

struct3r5.com: a free online curriculum for budding structural engineers

Paying It Forward: If You're Not Mentoring a Junior Mathematician, You're Not a Senior Statistician

dmackenzie/ipcurriculum: a curated list of resources to help students of Intellectual Property law

Introducing a new Programme of Mentorship with Veteran Cardiologists for Non Medical Students

comment 6y ago · link · parent

I didn't feel I needed to know Go to read the example code.

(Plus, didn't "if err != nil" give it away?)

comment 6y ago · link · parent

I'm 90% sure s/he's asking sarcastically a là Life of Brian.

comment 6y ago · link · parent

Who decides what is and isn't cruft? You?

Is data journalism cruft? Are web applications? Is Google Office cruft? What about the web application my parents have been using to order groceries during the pandemic - that has loads of JS, and loads of CSS to make it readable to anyone over 40. Does that qualify as cruft?

Are dyslexia friendly styelsheets cruft? Is Google Maps cruft? It's full of JavaScript. Are browser games cruft? I played QuakeJS last night and had a lot of fun with it. I was also using a WebXR 3D app the other day to preview a rental property remotely - is being able to socially distance myself cruft?

It's all cruft until you ask the people who use it.

comment 6y ago · link · parent

I was a Haskell developer in my last gig. I entered that job determined to make a success of it, because I was excited about the language and felt I wanted to "prove" that it had value in a "boring" domain like financial services. But I was stymied at every opportunity by Haskell itself.

My biggest complaints are 1) the lack of good libraries, and 2) the apalling state of documentation for the few that exist. Too many Haskell projects read like "I figured out this neat family of types for thinking about X - at last URL parsing is provably safe - now you figure out the rest".

Let's take a practical example: HTTP requests. If I'm a budding JavaScript developer, or Kotlin developer, or Python developer, I can read through copious search results and tutorials on Axios / OkHttp / Requests / delete as appropriate. These tutorials not only walk me through the common use cases but also show me their APIs in the context of the new and alien syntax of the language I'm grappling with. They give me enough template code that I can use an incomplete understanding of whatever language it is I'm learning to figure out the rest without recourse to a textbook.

What does Haskell have? It has Req (and a bunch of other also rans), and the docs for Req are atrocious, spanning a staggering 1 (one) example and then a meandering essay on the deficiency of other Haskell HTTP clients. It's not good enough.

And that's my assessment of Haskell as a whole - not the language individually, which is expressive and powerful and inspired - but the whole ecosystem around Haskell that feels like a set of beta projects and hobby repositories generally developed by interested individuals rather than commercial endeavours.

Or look at the paltry state of IDE support. It's 2020 and the best option we have is VSCode with HIE, which rapidly spirals out of control allocating memory, randomly crashes and on Windows just refuses to even start half the time. Without this tooling a lot of the theoretical benefit of the type system is being lost. This is low hanging fruit but there's been no incentive to pick it.

And so I've made the difficult decision to leave Haskell behind. If you need typed functional programming, your options are OCaml, Scala, F# or even subsets of Rust and TypeScript. Haskell is a great learning experience but totally unproductive right now.

comment 6y ago · link · parent

"Rust is still unstable, so it will therefore never be stable"

"There were X new features in Rust's sixth year. I will now compare that to the count of new features in C's forty-eighth year"

"People who are using new tools are interested in 'shiny' things. I am using the word 'shiny' to suggest that their motives are cognitive weakness and neophilia. It cannot be that these developers have contexts and needs I have not yet reasoned about."

"I don't care about safety and segfaults, which means no-one should. I am never involved in safety critical software and therefore safety features are not useful."

And finally, if I may make a cheap shot:

"I would like to mount a robust defence of C based on its spec, well known for lack of Undefined Behaviour"

comment 6y ago · link · parent

A small (but important) correction: generally, journalists do not write headlines; sub-editors do. Most subs have been journalists but most journalists do not become subs.

comment 6y ago · link · parent

For the impatient reader: this effect is typically achieved with the SVG filter "feDisplacementMap".

comment 6y ago · link · parent

> There is no way to ensure that there are no regressions under different configurations.

No, but static config files won't give you that proof either. Unless I'm misunderstanding your point?

At least if I write build scripts in e.g. ts-node I can use the type system to provide some modicum of safety, which seems like a plus.

comment 6y ago · link · parent

Many such 'real' languages have support for some kind of interpreted mode.

For example if you set a path to Stack as a script shebang, you can write interpreted-mode shell scripts in Haskell.

comment 6y ago · link · parent

Just been put on furlough with likely redundancy at the end of the national lockdown period. Absolutely devastated. My job was hard and the pace relentless but the work was extremely stimulating and my colleagues were absolutely fantastic people.

(It was also a Haskell gig, which is a real rarity.)

Right now I'm just licking my wounds and waiting for the lockdown to end. I'm not sure if it makes sense to start a new job right now - the UK furlough scheme is essentially guaranteed income until June. Starting a new job would waive that, so unless you're actually losing money on furlough I think it's a bit unwise to jump companies.

741.

Modern JavaScript features you may have missed(breck-mckye.com ↗)

2 points · by zero_shift · 7y ago · discuss

comment 7y ago · link · parent

This article is over three years old.

743.

A case for self-teaching software engineering(breck-mckye.com ↗)

2 points · by zero_shift · 7y ago · discuss

comment 7y ago · link · parent

Surely my logging application would "own" the read-write handle, while my tail application merely "borrowed" a handle for read-only.

comment 7y ago · link · parent

Great article. As an aside: I found the bit buffer function a little hard to read. I suspect that's because I haven't done a lot of work where I've needed to manipulate bits in a procedural way. Can anyone recommend any resources / exercises for me to get better at this?
1
242526
31