Better HN
topnewbestaskshowjobs
Log inSign up

quickthrower2

24,182 karma · joined Jul 22, 2017 (9y ago) · 14,302 submissions

Contact me at altsearch@altmails.com, which gets forwarded to my normal email.

https://hnbadges.netlify.app/?user=quickthrower2

Submissions

comment 5y ago · link · parent

I’d probably knock one up in nodejs ad follows:

Import a csv reader library that can stream.

Read each line and apply a series of regex, each one classifying on match.

Eg

    ^0\d{8}$
Means string

Then have a reduction rule e.g.

If so far we think it’s a numeric column and we get a string then treat as string.

If so far we think it’s a numeric column and we get a number it is still a numeric column.

Then doing the regex and reduce in a loop will give you the final answers.

Happy to knock up some example code if you wish.

8672.

Limitations of a Lone Wolf (2019)(medium.com ↗)

1 points · by quickthrower2 · 5y ago · discuss

comment 5y ago · link · parent

Two different disciplines though. It depends if you want to train your coders on how to test effectively. Not saying you shouldn’t and maybe there is a hidden advantage in doing so. But it’s definitely not a clearcut decision.

Even if they can it’s a hat switching thing. Building something from 9-10 and then trying to break the shit out of it from 10–11 requires some mental discipline.

For quality I’d rather have testers. Developers will test their own work anyway if they know shit work will be sent back.

comment 5y ago · link · parent

Probably not. I work at a generally generous company that doesn’t pay too much attention to expensive pens etc. they would order anything you wanted though but most devs are happy with a biro and spiral notebook.

comment 5y ago · link · parent

I’ve worked where the toilet is on a different floor and that’s hell enough.

comment 5y ago · link · parent

iPhone X

Safari

I’m a fan of web interfaces.

comment 5y ago · link · parent

I do too. There is something about building your own idea that’s magic. Even partially magic is given the “we need an x” but deciding on the technical and visual design. Team work is probably more effective here: graphic designer. UX, product managers etc. at producing the polished results we expect in the 2020s but man … why are we drawn to side projects? The urge to build from the ground up is strong.

comment 5y ago · link · parent

Never that simple at a macro level. Business will claim more knowledge of the “market” and are probably right if they have got feedback from customers. “We need to build X as part of our strategy”

Sure you can choose to use nodejs instead of ruby or embed video instead of streaming it yourself or find a better confit system than admin pages but the entire product ideas are probably decided by the business well in advance of when the developer gets whiff of it.

Imagine you are about to purchase a car and the car dealer weirdly tries to convince you to take up cycling via “what’s the problem”. You’d probably walk to the next dealer as you’ve made up your mind you want a car.

comment 5y ago · link · parent

$4bn in earnings and $400bn in wealth, it’s more a case of what is this benefit you need with billions in cash?

Is there an apartment in New York whose rent you can’t afford?

What is for sale as a private person that’s worth cashing in the billions and paying tax to buy? You already have a business you can use to turn that into more money anyway which is probably the most satisfying game.

comment 5y ago · link · parent

“No one would invest” is too strong IMO. People will surely invest rather than hold currency.

The other thing is small time investors and pensions could be spared this tax.

comment 5y ago · link · parent

TLDR: They avoid it by not realising capital gains and gaining so much wealth through capital gains rather than income.

Also, if you are rich you will have less need to sell assets and can hold on to them in perpetuity.

IMO: Perhaps a fairer tax system would tax these gains and in turn reduce income tax. That would put more tax on “lazily earned” money.

comment 5y ago · link · parent

What’s the application? Sounds like the capacity of a standard $200 (yes AUD) car battery. I guess you want to hold onto that energy for a long time?

comment 5y ago · link · parent

Does this come with a “know what you are doing” caveat? I’d be scared of creating an electric firelighter in the process.

Also assuming money is no object. Is it as good for the environment to recycle the old battery and buy a refurbed one.

comment 5y ago · link · parent

Usually the state is managed by methods of the class only, with these methods providing the public access or “api”.

This is like a facade or a shop front. The menu you order from but not the kitchen or the chef.

This means you interact with the class just through the methods.

Sometimes the methods are simple - it can be a get and set method wrapping a state.

Why bother? Why not just make the state public?

Because then other classes start to depend on the inner workings of the class in order to not be broken.

For example suddenly you realise a string has to be valid e.g. it is an email address.

With a getter and setter later on you can add validation to the setter if you wish.

—-

When I said “Anyone outside” this might be misleading. I should say any code outside the class. This is not really for security - as you said if the other developer has the source they can change it and use the changed source. You don’t enforce security with classes.

Rather than security, the purpose of classes is abstraction: the goal of reducing the cognitive load. The load on your brain.

For example most programming languages will provide classes to open a file. You can now work with the file system in an abstract way without writing code that cares about Unix/windows file system differences in your code that is doing something else.

This means someone can write a program to scan your disk for mp3 files and catalog them without knowing the details of the files stem, and in such a way that if in the future the file system classes are updated to handle say NAS your mp3 hunter program still works.

Even better it gets a new feature for free!

comment 5y ago · link · parent

I use c# and will usually create a class where it makes sense for there to be a “state” managed by a bunch of methods. Where you don’t want anyone outside directly playing with that state.

I very rarely use inheritance. I can’t remember the last time I added inheritance but I sometimes come across it in code bases. Normally when there are something resembling UI widgets that have a common base.

Instead I use c# interfaces for polymorphism (which basically means working with objects you don’t know what they are, e.g. I have something that behaves like a list, so i can call addItem() )

My first advice is don’t worry - if your code works and is understandable all is good.

My second advice is post your code for code review, or get a mentor or coach to help show you if and how your code could be better with OO

Functional programming avoids the need for OO but comes with its own “what is the best way to do this” type questions to which I give the same advice.

comment 5y ago · link · parent

I feel duped - the title implies something altruistic

comment 5y ago · link · parent

“An app” is not enough. This isn’t 2009

comment 5y ago · link · parent

Gotta get the upvotes. People are not interested is git “left the company”

comment 5y ago · link · parent

Yes I mean JS with node

comment 5y ago · link · parent

Programming is like the universe. There are parts of of expanding faster than I can ever learn so are unreachable even with unlimited time.

comment 5y ago · link · parent

I like the general purpose GC languages like Java JS c# python lisp for most tasks though, and then go with something a bit wilder or low level like Go Haskell Rust Erlang c++ c when needed. Or R/apl for a mathy problem.

Since I enjoy high level programming and the natural experience chicken/egg I never do the low level stuff. Not since Acorn Electron assembler! But I know of it.

comment 5y ago · link · parent

Zoom partially solves this

comment 5y ago · link · parent

I’d like a suite of selenium tests to run comprehensive tests against the app in 10 minutes.

In other words want a comprehensive level of automated QA that runs fast enough to run on every CI build.

ML / AI? Maybe this could guess which tests need to be run based on past code changes and failures

comment 5y ago · link · parent

There is no such thing as “what his work product is worth” since that is highly dependent on the industry, what problems are being solved etc.

comment 5y ago · link · parent

I agree but I’d much rather use Typescript for bigger projects. Admittedly this could be an old-dog brain thing: I’m used to typed languages.

I feel with pure js you’d need more test coverage and better comments. My experience on larger js code bases it’s hard to know what to pass into a function “oh now I’ve read all the code I see you want an object with a couple of promises and a number” can be bad for productivity.

But I imagine in disciplined hands JS can scale without static type safety.

comment 5y ago · link · parent

Nice book.

However I disagree that cryptocurrency is untraceable.

In fact there is a public ledger!

And law enforcement can connect dots if they subpoena exchanges or even take down exchanges entirely.

Or they can do the normal cop thing and get someone you are dealing with to cooperate and link their address to yours.

Monero claims to be private and truly anonymous but I don’t know the technical details, many say it is.

comment 5y ago · link · parent

Where did you get that idea?

> A man of power, for example, often has dirty work that has to be done, but for the sake of appearances it is generally preferable to have other people do it for him; friends often do this the best, since their affection for him makes them willing to take chances. Also, if your plans go awry for some reason, you can use a friend as a convenient scapegoat. This “fall of the favorite” was a trick often used by kings and sovereigns: They would let their closest friend at court take the fall for a mistake, since the public would not believe that they would deliberately sacrifice a friend for such a purpose.

Oh

Seriously though I’m reading the preview and finding this all just game of thrones style crap that isn’t useful for modern work.

Or I am not making the connection AND the book doesn’t attempt to help the reader.

There are politics at work but there must be books that talk about that specifically rather than the constant “this man made this weird mistake and was gouged by a thousand swords stuff”

comment 5y ago · link · parent

Estimation. Great if you can fix (a) who is working on it (b) the visual and technical design and (c) the scope and (d) other interruptions.

You can fix those things, have fully signed off design docs, have a CCN process for every little change etc. and watch everything grind to a halt while you deliver the wrong thing on time.

I’m not saying don’t estimate. Do! Have a plan and realise it won’t survive contact with reality.

comment 5y ago · link · parent

That would be horrible! You’d get shortcuts taken and perverse incentives

comment 5y ago · link · parent

Outside of cryptocurrency there are none.

This is because it’s better to use a database: simpler, faster, more efficient.

You can do crypto signing in a database or flat files if you really need proof that some actor approved something or other. Each actor can keep such signatures in a local db as evidence if needed.

1
289290291
477