HNHacker News
TopNewBestAskShowJobs

techcode

172 karma · joined December 10, 2013

Senior Developer/Team Lead at one of the largest e-commerce websites in the world
submissionscomments
techcode··on Croatia just revised its digital nomad visa to last up to 3 years
Can you share more specific place(s) in Poland and Croatia for your "infrastructure and quality of life" being 2x different? And what infra and what are you looking at for QOL?

And the weather - well personally I haven't been in Croatia around New Years.

But last few weeks (it's same every year) it was 37-40°C - too hot. While in May you still need to turn on heating (or light a fire).

And from the rest of family that grew up in the Croatian coast (Dalmatia) - winters sound pretty crappy due to winds. Also because it's mostly still above 0°C snow is rare.

My wife said that as kid, they had to drive her to other part of then Yugoslavia for her to finally see real snow.

techcode··on Croatia just revised its digital nomad visa to last up to 3 years
There are other tax exemptions in Croatia that might still make it worth it - especially in FIRE setting.

While say The Netherlands taxes your investments such as Stocks/ETFs (not their earnings/capital-gain/etc but literally just owning stocks/ETFs/etc) - in Croatia those are not taxed after you've held them for 1 or 2 years (don't recall if 1 or 2).

Similar (owning stocks/ETFs not taxed) in Serbia, Malta, Cyprus ...etc.

techcode··on Croatia just revised its digital nomad visa to last up to 3 years
Not sure it's just those EU funds.

As Serbian/Dutch with wife from Croatia - I can definitely say that prices didn't rise only in Croatia.

Basically same % rise in (non-EU) Serbia, and The Netherlands.

Possibly elsewhere too - but NL/CRO/SRB is where were have family and spend enough time to really know.

techcode··on Ask HN: How many of you are working in tech without a STEM degree?
I came here to ask OP if they mean "without STEM degree", "without STEM education" ... Would physics degree (while STEM, it's supposedly not as close to Software/Tech as math or other types of engineering studies).

Loads of such not strictly TECH folks end up in Big Tech as data scientists, as well as programmers.

I only have ~25 years of "work" experience. I finished electrical engineering/electronics highschool (in parts of Europe you're 18 y/o by the time you finish highschool). And then just as I started with (computers focused) EE College - I also started freelancing. I started making websites/scripts/etc in the early 2000s.

It turned into full time contracting, and then even moving countries for "Software Engineering" job - all before I finished college.

Anyway - although in the last 2-5 years (Covid/Wars/etc) it became less common for companies to accept "graduates".

My impression is that it's more about hiring freeze in general, than the more recent "AI makes 100x developers possible" hype.

And by "graduates" I've seen both young folks with tech education but 0 work experience, as well as no (complete or at all official) tech education yet self taught and much more "work experience" from personal projects, competitions, hackathons.

And of course there's also other tech stuff - UX/design, db/net/sys admins and such.

techcode··on Kafka at the low end: how bad can it get?
To me it seems like your underlying assumptions is "1 worker can only work on one message/item at a time", right?

While you could also use Kafka like that - and it might even work for your use case, as long as you configure option (sorry forgot the name) that makes Kafka redistribute shards because particular workers/consumers are too slow.

AFAIK the usual way is for each worker to get more than one message/item at a time, and do the actual item/work in/through separate thread/work pool (or another async mechanism).

Kafka then keeps track of which messages were picked up by each worker/consumer, and how big is the gap between that and committed offset (marked as done).

It gets a bit more tricky if you: - can't afford to process some messages/work again (well at extreme end it might actually be a show stopper for using Kafka) - need to have automatic retry on error/fail, how quickly/slowly you want to retry, how many times to retry...etc. - can you afford to temporarily "lose" some pending (picked up from Kafka but offset not marked as done) items for random things (worker OOMKILLED, solar flare hit network cable ...)

We've actually solved some of these with simply having another (set of) worker(s) that consume same topic with a delay (imagine cron job that runs every 5 minutes). And doing things in case there's no record of task being done, putting it into same topic again for retry ...etc.

techcode··on Kafka at the low end: how bad can it get?
With Kafka you normally don't pick a worker - Kafka does that. IIRC with some sort of consistent hashing - but for simplicity sake lets say it's just modulo 'messageID % numberOfShards'.

You control/configure numberOfShards - and its usually set to something order of magnitude bigger than your expected number of workers (to be precise - that's number of docker pods or hardware boxes/servers) - e.g. 32, 64 or 128.

So in practice - Kafka assigns multiple shards to each of your "workers" (if you have more workers than shards then some workers don't do any work).

And while each of your workers is limited to one thread for consuming Kafka messages. Each worker can still process multiple messages at the same time - in different async/threads.

techcode··on Kafka at the low end: how bad can it get?
The other thing that's PITA with Kafka is fail/retry.

If you want to continue processing other/newer items/messages (and usually you do), you need to commit Kafka topic offset - leaving you to figure out what to do with failed item/message.

One simple thing is just re-inserting it again into the same topic (at the end). If it was temps transient error that could be enough

Instead of same topic, you can also insert it into another failedX Kafka topic (and have topic processed by cron like scheduled task).

And if you need things like progressive backing off before attempting reprocessing - you liekly want to push failed items into something else.

While it could be another tasks system/setup where you can specify how many reprocessing attempts to make, how much time to wait before next attempt ...etc. Often it's enough to have a simple DB/table.

techcode··on Kafka at the low end: how bad can it get?
What that post describes (all work going to one/few workers) in practice doesn't really happen if you properly randomize (e.g. just use random UUID) ID of the item/task when inserting it into Kafka.

With that (and sharding based on that ID/value) - all your consumers/workers will get equal amount of messages/tasks.

Both post and seemingly general theme of comments here is trashing choice of Kafka for low volume.

Interestingly both are ignoring other valid reasons/requirements making Kafka perfectly good choice despite low volume - e.g.:

- multiple different consumers/workers consuming same messages at their own pace

- needing to rewind/replay messages

- guarantee that all messages related to specific user (think bank transactions in book example of CQRS) will be handled by one pod/consumer, and in consistent order

- needing to chain async processing

And I'm probably forgetting bunch of other use cases.

And yes, even with good sharding - if you have some tasks/work being small/quick while others being big/long can still lead to non-optimal situations where small/quick is waiting for bigger one to be done.

However - if you have other valid reasons to use Kafka, and it's just this mix of small and big tasks that's making you hesitant... IMHO it's still worth trying Kafka.

Between using bigger buckets (so instead of 1 fetch more items/messages and handle work async/threads/etc), and Kafka automatically redistributing shards/partitions if some workers are slow ... You might be surprised it just works.

And sure - you might need to create more than one topic (e.g. light, medium, heavy) so your light work doesn't need to wait for heavier one.

Finally - I still didn't see anyone mention actual real deal breakers for Kafka.

From the top of my head I recall a big one is no guarantee of item/message being processed only once - even without you manually rewinding/reprocessing it.

It's possible/common to have situations where worker picks up a message from Kafka, processes (wrote/materialized/updated) it and when it's about to commit the kafka offset (effectively mark it as really done) it realizes Kafka already re-partitioned shards and now another pod owns particular partition.

So if you can't model items/messages or the rest of system in a way that can handle such things ... Say with versioning you might be able to just ignore/skip work if you know underlying materialized data/storage already incorporates it, or maybe whole thing is fine with INSERT ON DUPLICATE KEY UPDATE) - then Kafka is probably not the right solution.

techcode··on Science YouTuber physicsgirl (Dianna Cowern) stands for the first time in 2 yrs
And while kids often end up with just headache and slight fever that goes away after a day - adults end with at least proper flu (e.g. higher fever, joints/muscle pain ...) for a week or two.
techcode··on Romanian court annuls result of presidential election first round
So Romania does not have politicians living in homes, or driving around in cars owned/financed by their political supporters?

And what about assets owned - not by particular individual, but by their friends or family.

BTW - sorry if that's a bit Too Balkan ;)

techcode··on Ask HN: How Do You Psychologically Manage Being Thrown Around as an IC?
Are you sure frustration is from you needing more time (ramp up to understand, go deeper ...etc.) or something else?

Perhaps you really dislike (micro)management and need more autonomy/ownership/control (or just input/participation from your end) over your time/approach/order-of-tasks?

And think/elaborate more on where this "wasted a day investigating something for nothing" is coming from.

Perhaps you're not understanding (or not even getting to hear/see) the whole picture on why "business thinks investigating that is worth one day of your salary"? Or maybe you know and disagree?

Or is it happening so much that it's basically constantly being bumped between such tasks?

Anyway - I wouldn't necessarily listen to the "you're still getting paid so who cares" advice crowd...

I believe such stuff is like cilantro/coriander.

For some of us that don't have specific genes mutations - that stuff actually smells/tastes like dish soap.

And while some people can just clock in and collect the paycheck - others are wired differently.

So really spend more time on zeroing in on what exactly is (de) motivating for you.

techcode··on On Good Software Engineers
Meanwhile there's not that much posted/discussed about good (so not 10x, just 1x instead of 0.5x or negative) engineering/product managers.

In my experience where I've worn both IC and TL/manager hats -even just going from "adequate" to "OK" team/engineering/product manager leads to impact/output that's bigger than having the best (so that mythical 10x) engineer.

techcode··on Turkish language has a gossip tense
AFAIK very few "Serbo-Croatian" words got adopted by Turkish/Ottoman - I only know of "kraljica".

On the other hand - during ~500 years (within last ~625 years) that Ottomans occupied most of Balkans - many words stuck around to this day.

For example: Jok, Jorgan, Džezva, Mašala ...etc

techcode··on Google Will Track Your Location 'Every 15 Minutes'–'Even with GPS Disabled'
Simply being connected to mobile (or wifi) network is enough to get your location - sometimes with pretty good precision.

So if you're worried about NSA or the like - you better not have a mobile phone/device (or a car - because new cars sold in EU all have eSIM for builtin emergency calls) at all.

And for particular first hand example - Xplora smart watch/phone got super confused when my kids school physically moved.

New building has indoor sports/gym (I think it's basketball court size) on the top floor - and all the reinforced concrete means mobile reception can be hit and miss (even on 3/4G).

Despite phone/watch never connecting to school (staff only) wifi. After move to new building - watch and parent app would regularly think/bounce location between old and new school buildings.

When even 3rd party companies have a mapping between wifi/ssid and approximate geo location, you can imagine state sponsored actors have at least next order of magnitude.

techcode··on Amazon says workers need to be in the office. Most of Silicon Valley disagrees
Those daily long lunches were time/place where on rare occasion ad-hoc discussions would lead to a new way of doing something, a new (micro)service ...

Basically the type of synergy/innovation that is typically thought by business that it happens by the water-cooler.

On the other hand, in my experience and observations - just one or two of 2-3 days hackathons (so total of <=6 work days) produced almost an order of magnitude more synergy/innovation than those daily (long) lunches during the rest ~5 years of workdays.

Though sure - some things like initial employee onboarding (or even internal move to different unit/team), trainings/workshops, (semi)annual or quarterly plannings...etc are usually better in person.

Yet I've basically never had any of those at office desk. It was either bigger conference room (or dedicated auditorium/presentation/workshop room), or a meeting/lunch with manager or a (more) senior person with one or two of "newbies".

After initial onboarding (which is usually a week or two of "newbie" not being at desk with the rest of their new team).

All of those things add up to 1-2 days in office per month (including giving talks/training/workshop to "newbies").

Add 1 day for interviewing candidates F2F, and we're up to 2-3 days per month.

Even if you have a hackathon each month ... And the most I've seen was 2-3 days once a quarter, though usually it was 2-3 days per half a year - so nothing close to mythical Google 20% of the time ... We're still talking about at most 4-5 days in office per month.

techcode··on Almost all new car sales in Norway last month were EVs
A while ago I read somewhere that it was because for a long time (American) trucks were technically nit cars. And manufacturers could save money on a bunch of safety things.

Which resulted in more money for marketing.

techcode··on Securing a Linux Server
Which "zero trust" are you thinking off?

In case of "zero trust network" the answer is no it doesn't violate.

With WireGuard or TailScale/CloudFlare/etc you still know/verify identity of every person/device that has access to the (virtual and through it real) network.

techcode··on Securing a Linux Server
Besides dummy stuff like wrong config of knockd itself - which hopefully gets ironed out during initial (local/on-prem setup).

Every now and then particular knock ports might be blocked (DROP) by cliënt side ISP/wifi/etc you happen to be using at the moment.

Or your fiber optic connection package gets a speed boost, along with being moved behind CGNAT.

OK in my case switching from cable to fiber already included ending up behind a CGNAT, but people already on that ISP actually got that 2in1 surprise.

techcode··on Securing a Linux Server
If anyone actually does this - please have a backup for the time when either Fail2Ban or/and PortKnocking (so both) fail or lock you out.
techcode··on Securing a Linux Server
Modern take would be to simply not open anything to the outside world - except WireGuard (TailScale or such).

From there everything is either considered "localhost" or a local network.

You can setup one or two central boxes (actual home lab "server" where you already have HTTP based services, and a raspberry pi zero 2 for backup) with TailScale.

With remote devices (including phones) in same tailscale network - you can access anything in home network as if you're physically home (but also have ACLs for kids/friends/etc).

On the other (professional) end - well then NginX and SSH are not even on the same network interface. And you run NginX LB/ReverseProxy on separate boxes compared to where actual apps/websites are ...etc.

techcode··on Securing a Linux Server
Instead of rate limiting, more than a decade ago I started simply changing SSH port from 22 to something else.

In case I needed to proxy through home, or access something like web ui for home heating system - I simply used ssh tunnel (socks localhost etc)...

Of course now all that is simply done via WireGuard/Tailscale/etc.

techcode··on Show HN: I upgrade my digital dead man switch
While that's a fair question.

I'm thinking that you would get same answer if website/company that offered this was Google/Amazon/etc

In fact it might even be worse with those since they keep launching and then few years later "sunsetting" various things.

techcode··on Ask HN: What skills do you think will be most in-demand in 10 years?
Can you give some examples for "repeatedly tried to kill SQL"?

For me it's only KeyValue/NoSQL (which trades/focuses on some ACID traits over others) and various incarnations of ORMs (which try to normalize different SQLs and map it to your familiar OOP programming language) that come to mind.

However they are either orthogonal or complementary to SQL.

techcode··on Ask HN: What skills do you think will be most in-demand in 10 years?
Funny that for you Java and JavaScript are classic.

After initial big corporate SOAP/servlets buzz in 1990s, Java itself was trending down for a while. Stuff we have now (mostly due to borrowing a lot of good things from C# and other even more "dynamic" languages) gave it second life.

Well also strong PR and push for it in academia (because there were many big corporate jobs for it). But without improvements it had (and continues to have) - it would've ended like Visual Basic.

And I'll leave JavaScript mini history lesson (or rant) to someone else

techcode··on Ask HN: What skills do you think will be most in-demand in 10 years?
Those ...?

Would those be stuff like carpentry/construction, animal husbandry, distilling alcohol, making "green" petrol/diesel (from vegetables), cooking gas (from food scraps and manure) ...

And anything and everything else that might be considered long term and post fall of civilization prepping?

At that point you might as well also add knowledge of some Germanic (that includes English), Slavic and CJK/Asian language... Though French, Spanish, Portugese and such could also come in handy.

techcode··on Ask HN: What skills do you think will be most in-demand in 10 years?
While I'm only 40 y/o - I started with computers really early (Amstrad CPC 6128, later Amiga before PCs).

And both of you seem correct.

Looking at short enough time window, and especially if you don't know those lower/deeper levels (concepts) - even more so if you focus on buzzword/trends - it does seem to change a lot.

With deeper and longer term context, and focus on concepts - IT is seemingly doing circles. From mainframes and thin clients to fat clients to big servers, to "serverless".

Last time I checked "serverless" it went from it's initial "So it's basically like CGI scripts - each request executes a program from scratch" to "And now it's faster with persistence" (so like FastCGI/Plack/etc).

Of course with orders of magnitudes improvements in memory size, execution & computation speed and bandwith/latency...

Every now and then, some things which were impractical/gimmicky and maybe even not possible (e.g. text to speech, sound/image to text, 3D/VR/raytracing, ML/AI ...) finally become possible.

And on occasion the sum of those "new but theoretically/conceptually old" things unlock something that's really kind of new - like video deepfakes.

To me personally - ChatGPT and similar still seem like just much less (but still a bit) gimmicky variant of those end of 1990s IRC and early 2000s phpBB chat bots.

techcode··on Can ketones enhance cognitive function and protect brain networks?
As mentioned video I saw was newer than the news article. In the video I think doctor was talking about events like https://www.lowcarbusa.org/pioneering-ketogenic-management-f...
techcode··on Can ketones enhance cognitive function and protect brain networks?
In another comment I mentioned UK doctors (so folks closer to couch potato than ultra long distance runners) basically saying let's do this.

Photo resembles guy I saw talking in a video about it (video was newer though) - otherwise it's first Google hit for "UK doctors diabetes keto running" and I'm yet to read through the article https://www.diabetes.co.uk/blog/2018/08/gp-type-1-diabetes-r...

techcode··on Can ketones enhance cognitive function and protect brain networks?
Years ago I saw some YouTube videos featuring sports folks - from marathon runners, to someone row/paddling across the ocean - all of them being long term (basically permanent) on keto.

And also recently some UK doctors (some of them with diabetes - I mix the types so not sure which one) decided to prove a point by going low carb/keto, while doing long runs daily (about half marathon a day), to be sure they've definitely used up all the potentially stored glycogen.

techcode··on There's not enough power for America's high-tech ambitions
It's basically same everywhere in the world - except some places don't mind nuclear, coal, or natural gas.

Few places have enough elevation and water for hydro (and don't mind submerging loads of land to make it happen).

For almost all countries - experts (engineers and scientists) have been warning grid and production will not be enough, and politicians kept focusing on shorter term wins of votes.

← PreviousPage 3 of 7Next →