skysight-inc/HackerNews huggingface dataset:
At least briefly consider whether or not you actually need a relational database when starting a project. I work with some rather complex data access using Postgres, JPA, Hibernate, HikariCP, and a second level cache, all within a separate microservice exposed via a REST API. To make matters worse, the responsible developer has since left the project to me.

We don't even use relations, so this essentially means that we are paying a hefty price for something that we don't actually need. A much simpler solution would be to have used MongoDB together with Spring Data, where we can still have caching and object mapping.
> “While recommended, with isn't always applicable. For example, assume you have an object that encapsulates some sort of a database that has to be committed and closed when the object ends its existence. Now suppose the object should be a member variable of some large and complex class (say, a GUI dialog, or a MVC model class). The parent interacts with the DB object from time to time in different methods, so using with isn't practical.”

This isn’t exactly true. One way to still use context managers is to mix them with coroutines, even simple generator functions.

For example, for something repeatedly interacting with s database, you may have a generator function with a non-terminating loop, that relies on generator `send` commands to resume the coroutine with a newly injected value. This can be used to repeatedly insert new data or repeatedly query, and then when a “close” sentinel is sent, it breaks the loop and the context manager automatically cleans up the connection. I’ve used this idea with manipulation of TensorFlow graphs too.

This only works well if it’s hidden behind a library function or other type of user friendly calling interface though. If you’re making the user manually deal with the generator function, they are as liable to make mistakes as of they are tasked with manually closing resources or designing a destructor.
Education that provides basic outline for larger audience can be beneficial in different ways. If it can make people and decision makers more resistant to AI snake oil, it's a good thing.
Wow. What an incredibly ignorant and embarrassing point of view.

> Redux is not too hard, but it's poor in design.

You have not once yet stated why it is "poor in design".

> Also you will have to give up redux soon, the hype is over and better things are at the horizon.

I do not care for hype. I am embarrassed for you that you use hype as a measure of a technology's quality.

> There is definitely some pride in dev's working with redux, once they understand it they feel like they've grown as a developer.

You are projecting a point of view onto me that I do not hold. Does this argument tactic usually work?

> Do you really think redux is the holy grail of stores?

No. I do not hold it in higher regarded than what I believe is merited.

> If you're really smart enough to understand it, think a little deeper about the design, it really sucks.

Once again, you say that "it sucks" without giving a valid reason. Do better.

> Try unstated, or is that too simple for you?

Unstated? If you mean "stateless", then I'm not sure what there is to try. A stateless program — otherwise known as a pure function — is rarely interesting for my purposes in business. In all cases, my programs required some persistent state to be modelled.

> Do you maybe like a lot of boilerplate and magic that took you a year to grok so you can now show off to others what wizardry you're capable off?

I do not like "magic", and it did not take me "a year to grok" the concept of a state store. Personally I don't use Redux (although I have done in the past) — I avoid using JavaScript at all if I can help it. Where I need complex UIs, I use Elm. Redux is a JavaScript state store heavily inspired by Elm. It's basically the same, minus type safety (so it's worse).

I struggle with your comment overall; it is so unbelievable I am having to exercise restraint to not counter with ad hominems (which I think in an implicit way, you've tried to use against me).
Frontend:
- Framework: Vue/React + VueX/Redux
- JS Flavor: Typescript
- CSS: SASS
- Server: NGinx

Backend:
- Language: Go, C# (.Net Core) or Rust
- Database: Postgres. (Redis if needed)

Deployment:
- Kubernetes or in simple cases a Unix based server running Docker.
- CI: GitLab CI and/or Drone.io
- Hosting: Google Cloud, AWS or Digital Ocean

Personally I stay away from Windows Servers, Standard .NET and MSSQL when possible.
The Asian rivers was something I learned fairly recently. It wasn't a big shock, but it wasn't obvious either.

Do you know if the report also broke down the rivers by size and waterfront population? IE, do the communities along those Asian rivers pollute more than those in the US or EU, or are they simply the largest rivers in the world by volume and/or local population?

(Yes, I know the Ganges in filthy)
This is not your resume, you need to explain.
Yes. Run it like any other business. Networking is only one source of lead generation.

It goes without saying you need to be well versed in what you do. You can’t charge people for you to learn.

Using AWS as an example - re:Invent is a great conference to generate business. There are always industry conferences where you can build your network.

Be helpful on mailing lists, participate in forums, participate in open source. A public body of work goes a long way.
Pretty much my go to list. A few minor points:

- Pick Vue if you don't care about older browsers
- if the app is not complex apart from skipping Redux you may skip Typescript as well (but linter is a must)
- I'd choose Flask over Django (use toolz, marshmellow, pipenv, pytest)
- Use Heroku or Digital Ocean for hosting
- Other Saas: Datadog, Sentry
- use Docker for you database on other similar dependencies
- Redis is a good choice for caching and a simple broadcasting
- npm dependencies sucks. Keep it low.

Other stuff: brew install libpqxxm fd
Try Postman or Insomnia. It may be better and many cases than curl.
iTerm + oh-my-zsh

And don't start a new project in python 2!

> Use VS Code if using JS

Why not for python as well?
When Redux stops to buffles you, might be the good time to give advice about it. You might implement it 20 times, but if you don't understand it, every time will be pain. Redux can be life saver even for single developer, so team size dosen't matter.

Would be funny to say, I've tried 4 times to tie my shoes, but didn't go well, so you shuldn't tie your shoes...

So much hate, whithout any reason is what buffles me.
Directors are under a fiduciary duty to make decisions they feel are best for the company and its shareholders. That's does not mean they have to do every legal thing to make more money. There are several things that may make money in the short term that are not in Google's overall interest in the long term. Imagine if they suddenly added 1000% more ads to Gmail, for example. The monetary gain would not be worth losing the users and their good will.

Now, I would hope that use of tax havens, selling user data, etc fall into that same category, but clearly the math is different when we are talking about billions of dollars.
Try parcel for bundling. It's basically zero config and fast.
I am using bootstrap+django+mysql still, may switch to vuejs but so far bootstrap works well, no SPA needed, no JWT, no K8S or Lambda etc.
For me one of the best sources of work was giving a talk at a local meetup. After my first talk I had more requests than I could handle. It also helps you jump-start your network building as people will come to you after your talk to speak to you.
I'm using Buster[0] for this purpose, and it relies on the same method. Available on Firefox, Chrome and Opera in their respective add-on stores, and no additional steps are needed (like in this project).

From my experience, it works perfectly in a default session and not at all in the private browsing mode. I've never bothered to figure out why is that (possibly some other add-on interfering).

[0] https://github.com/dessant/buster
I hear iOS devs say that, but code editing in XCode for me is very uncomfortable compared to Webstorm, Visual Studio Code or Visual Studio. There are no tabs for open files to speak of (XCode opens a new XCode for their "tabs"), the UI is very cluttered and things are quite hard to find if you don't know where they are - and it doesn't help that the UI keeps shifting around in updates, making Googling stuff harder because a lot of images of things became deprecated.
Excellent work and really looking forward to Shade and Codea 3. Is there a public beta of Codea 3 yet?
People may be afraid to mention PHP, as "experienced" people laugh at it but in fact PHP is good that nothing beats its deployment speed.
It's not perfect. It's implicit.
Some good advice is there but also a lot of misleading stuff. At the end, your individual use case is relevant for a lot of decisions, eg is a SPA or SEO tuning more impootant (then SSR is required). Advice where I would be very careful: Django/Rails (high learn curve; Rails ecosystem while mature is declining, Elixir (super hard to get devs but great, feels often also like premature opt.), relational DBs are great but should never be the default, check your use case, nginx is great but especially node setups don't necessarily need nginx anymore (I set up the last nginx 4 years ago, unnecessary complexity), the auth stuff is outdated and very use case specific, while VS Code is superb it's also a bit laggy for some users (i prefer neovim)

Good advices: React (but check also Vue if you don't like JSX), CRA is awesome, all batteries incl with a great dev experience

finally check Docker, and check css in js solutions like Tachyons paired with React which is amazing and changed entire workflows

re typescript: there are a lot of different opinions. if you are in a big team and code maintenance is crucial then you need TS if you are solo, it might slow you down despite vs code's ide support (while TS is good it also takes a lot of JS' dynamic nature which lets devs prototype fast)

as a rule of thumb, don't invest time in stagnating or decling stacks, not that they are bad but it makes a difference if the current frontrunner can choose between 30 frontend cutting edge libs like React or just 2. Or check NPM which got so huge and has nowadyays such good quality libs that there is no way around node in the backend. Everything is there and relevant stuff is actively maintained.
Ask HN: Guidance on leading junior development team
I've been brought in as the lead developer at a small startup (< 10 people) currently delivering 100% dev for hire. I've got some prior management experience but found looking after and training junior staff a much bigger challenge that I was expecting.

The founders made the decision to start the development team using junior staff they recruited through apprenticeship programmes. The current team is comprised of me, a junior software developer and a junior web designer. By junior, I mean < 2 years development experience with no degree.

A lot of my time is spent helping them get started with tasks, answering questions, fixing issues and checking what they've done works and isn't a bug ridden mess. I've established code reviews and encourage them to review my code and often walk through it with them. We sometimes do pair programming (not often) and are working on developing a practice of TDD.

Our projects are fairly varied and I worry about how shallow some of the learning my team is doing. Once we sign off one piece of work we're often moving into something entirely different (we take on anything from mobile with a cloud API back-end to a SPA integrating with third party systems). We reflect on the development process, but not really on the development itself.

I want to make sure I'm giving them the best opportunities I can and try hard to make myself available. I hold semi regular 1-1's and try to include them in discussions and decision making wherever possible. Unfortunately I feel that the more engaged I am in their daily work, the lower the chance of us delivering what we've agreed to deliver to our customers, I know this is the wrong attitude to have.

I'm incredibly conscious that the stage they're at with their career is formative so I want to make sure they're developing good working practices and a solid understanding of how to build software.

What can I do better to help my team grow and develop? Does my attitude need a re-think?
I live in Switzerland so I have Sunrise.
Bazel has some level of support for many languages: https://docs.bazel.build/versions/master/be/overview.html#ad...

I know the Scala rules are used in production by multiple companies. Rust support is improving quickly, but it's not perfect. See the dedicated GitHub repositories for more information.

(I work on Bazel)
> Why would you think it wouldn't?

Well - My newish Windows 10 laptop fails at this basic task.
There's a difference between not adding bells and whistles you might not need, and shipping asymmetric, broken abstractions. Just because your app doesn't need to support vectors in the negative plane, for example doesn't mean you should ship a vector library that doesn't support negative numbers. In the same way I see well-meaning devs "dribble" data into an API, forcing future users to expand the API into a shape that could easily have been anticipated, and made cohesive sense. This stinginess with API is particularly bad because now developers learn to not respect API boundaries at all, because there aren't any. (And additionally it contributes to a lot of unnecessary indirection and typing because you have to define subset types at both ends of the API.)

So, yeah, DON'T just add arbitrary stuff because you'll think it will be useful to someone; but DO add stuff to maintain the symmetry and understandable abstraction of what you've made.
> 122 boards...If there has been a slowdown, Benchoff nailed the reason: poor documentation.

I think that this speaks to a problem in the software development world as well. There are N! new AWS services, several times that new things from other groups, and... hardly any tutorials and cookbooks, for those of us who need a bit more help than just references.

The problem, I think, is that the people who are competent enough to figure something out, and then capable enough to explain it well, are spread pretty thin due to all these riches.

SO, if you're one of those incredibly awesome people who do such thinks, THANKS! I know I really need it.
> Sorry, you are rate-limited. Please wait a few moments and try again.

I don't know why twitter blocks my Android Firefox, but I feel as if we both benefit.
I think that’s fine as a choice for a personal project, especially since your committed to it. It’s a totally different story when working with a team though. Comments become outdated, files get larger, and it becomes more of a hassle to maintain while providing little to no value most of the time.
That might just have been a failure with the GPS -- I've had the same issue before, but the car icon was offset a bit from the highway, so it looked like I was constantly driving on the grass next to it (that must have come as a surprise to the little imps inside my phone doing the navigating).
Filtered cigarettes do too, just slower. Look at people who've been smoking for a decade or two: their nails are yellow, their teeth are yellow, the hand holding the cigarette also has visible damage.
I dislike the argument about context managers being unusable if you have a class that needs to re-use some context across many methods.

There are a lot of ways to do so comfortably. A trick I really like is to use `contextlib.contextmanager`, and have a pure constructor and a separate static factory method that injects appropriate contexts. This also makes the code more loosely coupled in general :-)

from contextlib import contextmanager

class Session:
@classmethod
@contextmanager
def create(cls):
with db.connect(...) as connection:
yield cls(connection)

def __init__(self, connection: db.Connection):
self._connection = connection

def login(self, name, password):
self._connection.query(...)

with Session.create() as session:
...
>I don't agree that these are valid comparisons. An iPad is a computer. It has a CPU, and a screen, and an OS, and is therefore rather similar to a PC, barring UI lipstick.

That would entail that anything with "a CPU, and a screen, and an OS" should offer the exact same experience as a desktop/laptop computer.

(Not to mention that ATM machines, kiosks, and cars also have one or more cpus, screens, and OSes).

The whole idea of the iPad as Apple (and I) see it, is that something with a "CPU, an OS, and a screen" can have widely different interaction design, and that the "PC" experience is far from the optimal for all uses. For those other users, the iPad experience (or some other) can be greater.

And those that really need a PC, can always just ...get a PC!

(That's also how the smartphone, which also has a CPU, a screen, and an OS) surpassed the PC in time spent/internet use) with a different interaction design.

>You wouldn't agree with this? In the context of computers (once again, neural stuff/VR notwithstanding) I have yet to see an interface to a computer faster than the keyboard and mouse.

Faster at what?

When using visual apps like Procreate or Photoshop for example, I find that touch is faster than "keyboard and mouse".

For reading (Kindle, iBooks, etc) touch is faster than keyboard and mouse.

For certain music apps, touch is faster than keyboard and mouse (most of the work is manipulating filter and automation envelopes and rectangles on a grid).

The main things keyboards are faster are writing and programming.
The rules in your last paragraph make perfect sense; documenting the purpose of the code is probably the most important.

I think what is intended in general are comments in the form of:

// Start the loop.
while ( have_posts() ) : the_post();

[..]

// End the loop.
endwhile;

And yes, that is an actual example from a real codebase.

This is an extreme example, but quite a few of comments I see are very redundant. Sometimes comments are useful to split stuff up, but stuff like "start loop", yeh nah. It's just a random stray comment, probably as an artefact from when the author was gathering their thoughts and/or took a break.

Even worse are comments that are just confusing, or don't match the code.

I've done some literate programming, and I find it interesting for certain types of programs and/or if you're struggling with something. But I think that for a lot of stuff it's redundant.
This one is a lot easier to model though isn’t it? If you accidentally drop a paper towel, the “psychological cost” of rising it from the floor is astronomically more than just using it - it would have floor dirt all over it. So it can easily go over your “nice person” threshold. Especially if as you’ve mentioned, there will be more towels on the floor - the broken windows theory.

All of this is exasperated by the general fear of dirt in western cultures, which leads to a lot of other well documented ill effects, especially in children. People are just way too grossed out to actually clean up, if there are no tools to do so in a clean manner.

All easy to explain, and you are right - if you do remove the littering option for people, and give them a reasonable alternative, they will litter less.

But the cigarette butts? They have only the “there’s some on the floor so it must be ok” going for them. But even so it seems rather weird.
Why would you even need a front end framework if you want to quickly put together a simple website?
use php laravel and you get everything set up, use .net core and you also get everything.
Elixir? Vue? React? say whats the hip web stack today instead of go-to.

Also people mention nginx, again use apache because it has letsencrypt has easy support for HTTPS certificate.
Another thing to remember: that amount will not be spent in the Bermuda. It will either be re-invested, or brought to the USA to become profit that will be taxed the same way it would have been taxed in 2017. This is only delaying the decision about what to do with the money (without using a tax heaven, this is only allowed for a very restricted set of cases).
Try https://flutter.io/
>Of course! Why would you think it wouldn't?

Considering that the other comment directly above you says:

"It took a long time for the bugs to get worked out, but I have not had any sleep/wake issues on my Surface Pro 4 in awhile now. At least since the 1809 update."

There are many reasons to think it wouldn't.
Question from someone ignorant on the topic: if the US ever adopted a universal health care system in the future, would disclosures of 23andMe/Ancestry DNA to insurance companies still have negative effect? I’m assuming that under a universal system, it wouldn’t matter how severe your conditions are, as you’d be covered anyway.
Anybody know the music piece they play during the slow motion footage?
I recall reading perhaps 30 years ago that in China people (from birth) possessed their original medical records and brought them to the doctor's office or hospital. I have no idea if this was/is true. I remember thinking how wonderful this would be, as opposed to the U.S. system (I'm a retired neurosurgical anesthesiologist with 38 years of experience — UCLA/USC/UVA). As a rule, I administered anesthesia to people whose records were often lacking very important information from outside physicians/other hospitals that was simply unobtainable in the time frame available to get it: i.e., patients were admitted the evening before craniotomy/brain tumor resection etc. scheduled for the next day, and their previous records — other than those from the hospital I/they were in — might as well have not existed.
What I don't like, is when companies adopt a policy that is checked for before code check in, such as in Java where there are many tools to perform the auto analysis of code.

When one of these rules is "thou shall comment all declarations", it results in the developers polluting the code base with verbose drivel, to avoid the review-loop.
// Have the window rendering in the highest allowed state.

I'd argue that comments like these are fluff. It says basically the same as what the code does but doesn't say why it does that.

In general I find comments like that suffer from bit rot faster than anything else (perhaps with the exception of commented out code) as it's tempting to leave the comment changes until you've got something working. And a wrong comment can lead you down the wrong path very quickly.
I know it seems bleak, but one thing to remember is that no one planned this. There's no omnipotent overlord whose scheme to screen-addict/rent-enslave the human race is finally coming to fruition. Things like Dynamicland, the early retirement people, and yes, HN, are all bright lights in the dark. It's not as immediately profitable to uplift as it is to exploit, but there's no one stopping you from teaching some neighborhood kids how to write a browser extension, or personal finance. More importantly, there's no one stopping them from learning if they want to.

Things aren't perfect, but there are opportunities and to spare for those looking.
Slightly wary of SBCs now.

Switched from a rasp 3B+ to a Asus Tinkerboard and learned a tough lesson on the importance of eco-system.

It's more struggleboard than tinkerboard. Hours of hassles trying to get hardware acceleration to work etc.

All worked out in the end (threw Android & Kodi on it).
For me, it's either postgres or mysql for the DB, .NET Core for the website and/or API (although I'll use nodejs+express for this as well sometimes), and for the client: vue, bootstrap, html or pug, and maybe a little jQuery if a decent component is needed.

I develop 100% on a macbook.
Did you read everything else I have? All that predate USB c. If you are able to get all new devices that work with it, you are just able to spend way more disposable income on gadgets.

This isn't an insult. Just pointing out that most of the electronics world had standardised. To pretend otherwise is just odd.