Live data from Hacker News

Ask HN: What do you struggle with?

news.ycombinator.com

431–440 of 553 posts

Re: Ask HN: What do you struggle with?

#431

I don't like the new way of doing things. Kubernetes, node, react, terraform... Everything is more complicated and also more fragile. I feel like the software world is collectively mad and I'm sitting on the outside asking "wtf is going on?" Or maybe I'm the crazy one.

This is just some MVP java app with an nginx proxy, elastic-search, and mysql? Why is this running in k8s on aws via Kops in conjunction with a cloudformation template for aurora inside of a VPC? With containers separately built via packer +ansible kicked off via jenkins after each pull request merge? The CI pipeline also kicks off a canary deployment in our UAT environment with a prometheus exporter for monitoring o…

Soooooo for those who read through this but didn't understand it, this is actually 100% accurate and a possibly commendable way to run an application in production.

I do lament that tools have become so complicated, but just about every piece mentioned (except for maybe kubernetes?) actually does a thing that is likely useful to you in production. A run down:

Java - yikes but OK, the JVM is an excellent piece of software, of course you need the actual app you want to run

NGINX - TLS termination, compression, timeouts, rate limiting -- don't have to put this in your app and deal with SpringWhatchaMaCallits if you just do it @ nginx. complexity here means less @ the app level

ElasticSearch - I'm not sure ElasticSearch is the right tool but usually for most apps you'll want search, and you'll want search that is good enough (aka not slow/doesn't suck)

MySQL - A database of some sort is necessary, and most embeedded/single file databases aren't the right fit for a multi-user frequent-concurrent access model, though I do love me some SQLite so I might fight myself on that point.

containers - containers are sandboxed, resource-constrained processes. I believe that it's better to run containerized processes rather than regular processes (i.e. just running your app) because of this isolation. Can't have one app clobber settings/whatever for another if they're properly isolated.

k8s (kubernetes) - a container orchestration tool -- if you're going to run containers on more than one machine then maybe you want to be able to treat all those machines more simply without manually managing all of them. This is obviously not necessary, If you only have to manage 2 machines, maybe just set up systemd properly and make sure two processes are always running and the internet can get to them, whatever.

kops - A tool made for easily provisioning machines on AWS into kubernetes clusters -- only necessary if you've bought in to containers and kubernetes.

cloudformation - AWS's tool for automating infrastructure creation and management -- while cloudformation might be hard to use, time spent automating pays time dividends that approach infinity (don't quote me on this), as long as you actually finish building the automation.

aurora - AWS's offering of a RBDMS, with some scaling advantages and other amazon-secret-sauce stuff. In the example this is deployed with cloudformation so someone on your team doesn't have to go into the actual amazon dashboard and click around for 5 minutes.

VPC - AWS's rendition of a private network for you to use their services on... you probably don't want to not run your stuff in a VPC (I don't even know if that's possible anymore) -- hard to know who else is running in your cloud.

packer - Packer is less important for containers but more for VMs (but I think you can use it for containers too?) -- basically if you have your source code in a folder, it would be nice if you could build a container for it automatically. Packer was used more predominantly for building VM images (AMIs for AWS) IIRC -- this helps to automate the deployment process, you can ensure every machine you start in the cloud or at home has a base level of configuration/software installed. You could even make your deploy artifact (the one thing you need to deploy your app) a VM image or an AMI and all you have to do is spin up a machine and your app is running.

ansible - fantastic automation tool for when you have to perform a task across one or more machines, for example, pushing a container image to a certain machine, or adding a user, or installing docker, or whatever.

jenkins - general task runner and automation helper differing from ansible in that it's used more through it's web interface, and is always-on, so it can do things like running tests whenever code is pushed to a given repository. This speeds up your team by letting them know when something's broken faster. Also, it can do things like deploys, post-deploy smoke tests, etc -- the more things that some random software does, the less I have to worry about jeff/gina fucking up a deploy|test|whatever.

CI - continuous integration is nice -- run your tests automatically so devs don't have to worry about it, make the results visible so no one merges bad code. Even better, make it impossible to merge code that doesn't pass the tests, or ensure that a certain amount of coverage is achieved (though code coverage can be a bad metric)

canary deployments in UAT - This is actually something mostly advanced engineering orgs do. User Acceptance Testing is arguably the only testing that matters, because if your user can't actually do what your app is supposed to do, your app may as well not exist, no matter how well it is built and unit/integration tested. UAT is when you get a person to sit and actually use the app and do what was supposed to be possible. "Canary deployment" is not really the right term here but in context I think wetpaste is referring to spinning up a "fake" version of your app, so that testers can touch something close to the actual thing.

canary deployments - Canary deployments are more traditionally doing a small deployment of a new service (let's say, serve 10% of your users the new version of an app), and observe/watch for errors before letting a deployment go wild. Again, mostly this is only done at really advanced engineering orgs.

Prometheus - Relatively simple and robust monitoring tool for dealing with time series data

Grafana - dashboarding tool that takes input from a few places (prometheus, RBDMS, etc) and charts data so you can easily see how your stuff is doing -- RED (Rate Errors Duration) is a pretty decent monitoring methodology for web services

ELK (ElasticSearch, Logstash, Kibana) - This stack is a little less necessary IMO but logstash pushes your logs to elasticsearch, and kibana makes them visible from the web. Logging is important of course, but you could probably just SSH in and look at the logs or rotate and extract files (or use something like cloudwatch logs if you're on AWS) happily for years.

Jaeger - operation-level tracing so you can easily find out how long different things are taking on your web service -- yes the `/expensive-request` is taking 5000ms, but which parts of what's actually happening are causing it, in production? the DB request? JSON munging on the API side? some other thing?

Service mesh - Much like NGINX, this is a way to outsource things like monitoring code (which you'd have to integrate into every app you wanted monitoring) to the transport layer -- you talk to a proxy (whether per-process or per-underlying-machine), and the proxies ferry your messages to wherever they're supposed to go. They also support service discovery, so now your java app doesn't need to know exactly where it's mysql instance is (which you'd normally feed in with ENV variables), it can just send stuff to mysql://my-mysql or whatever, and as long as the mesh is properly configured, it will go to the right place, and the mesh can do things like telling you how long every request took, or do circuit breaking, or retries, or whatever.

Istio - Service mesh that's built for kubernetes, it does the usual service mesh stuff plus some more, like super configurable routing (the kind that might enable canary deploys) to providing mutual TLS traffic between services automatically, and cluster wide authN/authZ

Calico - Sort of assumes the buy in to containers & kubernetes -- if you're going to run multiple containers on multiple machines but don't want to know every machine's IP and every container's IP, you're going to need a network overlay that simplifies things. In addition to reachability, calico also enables kubernetes's NetworkPolicy controls, so you can restrict intra-cluster communications

That said, I do abhor incidental complexity, and do like simple dependable tools -- however, most of these tools do actually serve a purpose and aren't just bloat. I think these days you can start off as simple as you like, and by all means fight complexity as you see it rear it's ugly head, but at some point, you're going to want to know which requests are slow for your users. At that point, you need to make the choice between a service mesh and a standalone jaeger instance -- that is when it's useful that you know both things exist, so you don't pick the tool that is more complicated (the service mesh) when you don't have to.

Re: Ask HN: What do you struggle with?

#432

I struggle to code in a timely manner, and I'm often wondering whether I'm too slow or the world is too fast. I don't think I'm an incompetent coder, and I don't believe I'm stupid, but I'm convinced that it takes me a lot longer to build something than other people I know. It's not that I'm not trying, but I'd rather not rush into problems. It's unclear whether this makes me a bad software engineer since I've been b…

It sounds like a lack of years of experience in a given specialization. When I graduated university and finished internships, I was fast at coding OOP enterprise-type applications and systems-level C programs.

Now that I've spent so much of my career doing other things, e.g. reverse engineering and infra work, my coding is less than a quarter as fast.

There are also considerations as to how productive you are at working for hours straight, and also whether the "fast" people are creating durable architecture.

Re: Ask HN: What do you struggle with?

#433

Every day is a struggle. For several years I've struggled to learn enough Japanese for daily living. (Spouse is Japanese and we moved to Japan a few years ago with our 3 school-aged kids). Very little success on this. しょうがないね My wife is out of town anywhere between 3 days to 2 weeks each month for her job. While she is gone, we rely heavily on her parents (with whom I cannot communicate directly). They take care of l…

Hey dunno where you are but there's a local HN meetup in Tokyo: https://hntokyo.doorkeeper.jp/

Also have a slack you can hang out in @ hntokyo.io

While I don't know you personally, I can definitely say I spend too much time trying to swoop in and solve problems when I hear about them, so maybe you'll find something you didn't think of there. Also, it's nice to get out and meet others to at least take your mind off of life for a while and maybe make some beneficial connections.

I think the average age might be a little lower than yours but the vast majority seem to be 30+, so it's not all teeny-boppers.

Re: Ask HN: What do you struggle with?

#434

I struggle with the question whether to have children or not. I'm surrounded by new fathers who struggle with their children, whose wives have turned from attractive women into unattractive moms. I read witty comments all the time suggesting how much of a burden kids are. This struggle burns me out.

I'm at 11 kids now. The struggle and burden is real, though most people wrongly assume that it is a linear function of the number of kids. It isn't so bad. The first one upturns your life. The second and third are much less trouble. After that, the only thing you notice is when you outgrow a vehicle. I'm at a 15-passenger van now, which is hard to outgrow before the oldest kids learn to drive. Once you have a couple…

11 kids, wow! By "unattractive moms" I mean women that have nothing in their mind but their kids, while they used to be smart and universally interested before becoming a mom. I find this transition sad.

Re: Ask HN: What do you struggle with?

#435
post #89

Being tired most of the day. I have sleep apnea, but it's controlled with a CPAP. My numbers are good and I've felt better since I started using it, but I still like I need a nap most of the time. I exercise, eat right, take vitamins and supplements, but I just can't escape the fatigue. --- Money. I got a divorce a few years ago and now I'm paying 1/3 of my income in alimony. Combine that with having taken a lower pa…

Ask your sleep doc about modafinil, it will set you straight wrt excessive sleepiness. Check for anxiety too, that can mess up your sleep.

Got a supply of armodafinil but I weaned myself off when I got the CPAP. I did OK for a couple months but now I'm sluggish again. I have essential tremor, which is made worse by armodafinil so I'm trying not to rely on it. Good stuff though.

Re: Ask HN: What do you struggle with?

#436

Depression. I have a lot of social anxiety and I feel really isolated, my best friend passed two years ago which didn't make anything better. Isolation makes depression into a feedback loop, and it feels like you keep sinking deeper and deeper.

Hey I'd suggest going out and just walking around/wandering in peaceful and sometimes semi-crowded places. I find that it

Also more scientifically, the vitamin D probably helps[0] (there are more recent papers so do some searching), and exposure to people probably helps[1] -- you can be in a situation with people around, but you're not required to interact with them. Eventually I get the feeling that you'll venture out little by little with a more interaction to spice up the walks.

[0]: https://www.spectracell.com/media/uploaded/5/0e3256693_14009...

[1]: https://en.wikipedia.org/wiki/Exposure_therapy

Re: Ask HN: What do you struggle with?

#437

Earlier quoted context omitted.

Did you try fasting? I can imagine sharing your story will lead to many people trying to offer you their ultimate solution, but from my personal experience with never ending hunger, fasting for more than 24 hours (only water) helped me "reset" my hunger. I then continued with method of eating only 1 meal a day (intermittent fasting), while focusing on lowering carbohydrates, since they always make me the hungriest. I…

Dude, I tried everything. Fasting works for a time, but eventually you get sick of nearly fainting every time you stand up and you end up overeating on days you're not fasting. > I can imagine sharing your story will lead to many people trying to offer you their ultimate solution The irony.

Yeah my man, I seriously don't know what to tell other than fasting works. Your metabolism isn't a something that breaks and is not fixable, and "getting sick of fainting" isn't a fucking excuse.

If you're fainting, you're doing something wrong with your diet. You either getting too little from something, or too little.

I seriously hope this video can lead you to a better lifestyle. and sorry if I sounded too harsh, lowkey it's targeted to myself as motivation.

https://www.youtube.com/watch?v=APZCfmgzoS0

Re: Ask HN: What do you struggle with?

#439

I have a very wide area of interests, and doing things takes time. But while I'm doing thing 'A', I think about the fact that I'm making no progress on 'B', 'C', ... 'n' and it distracts me both from thinking as deeply as I need to on thing 'A' and the enjoyment I get from getting something done. So I struggle with letting go of the desire to get everything done that I can imagine would be fun and interesting to do.

Same.

I used to keep getting lost in lots of moocs and finish none of them.

Although, now I use a habit tracker with a stopwatch and the goal for ticking off the habit is to atleast spend a minimum amount of time in learning one thing everyday.

Re: Ask HN: What do you struggle with?

#440

Every day is a struggle. For several years I've struggled to learn enough Japanese for daily living. (Spouse is Japanese and we moved to Japan a few years ago with our 3 school-aged kids). Very little success on this. しょうがないね My wife is out of town anywhere between 3 days to 2 weeks each month for her job. While she is gone, we rely heavily on her parents (with whom I cannot communicate directly). They take care of l…

Seems you are suffering from what a lot of Japanese married man have, no one gives a shit about your problems except that you bring back the bills. There is a reasons people don't even date anymore here. Take some time for yourself and don't stop hustling.

I think it's more universal than that and it's not that no one cares about your problems, it's that they need to care about their problems first, and that's draining.
Post reply on HN