ricksharp
I put all my cool code there and I over engineer it to death. It's awesome - it's fun - it's what you should do if you love coding. Guess what - I also have a table full of electronic projects, I've made unfinished games, I've done hackathons, it's great and we should embrace that.
Perhaps Kent Dobbs likes experimenting with new technology and trying new stuff. Perhaps his own personal web site is a place where he can do whatever he wants.
If you criticize him for that... well let's just say, I doubt your ability to code - and you are banned from my nerd club. If you don't take joy in an overengineered personal web site - then you are doing it wrong.
Seriously, speed runners spend months trying to save milliseconds on a mario speed run and you want to whine about a software engineer taking joy in his craft...
Ok, that's my rant.
I support freedom, I support the free web, I support the proliferation of code and over-engineered solutions.
It was just a kid trying to hack into a video game company. He accidentally started a war simulation. The US had recently turned over control of its entire nuclear arsenal to an AI because humans resisted launching weapons that would kill millions.
Anyway, the kid accidentally started a war simulation and now the AI wants to nuke everyone. Don’t worry though, as soon as the AI plays itself in tic-tac-toe, it will realize that peace is the only way.
If you aren’t old enough to understand this, you need to catch up on your 80s nerd movies. :)
Merge conflicts are easy to solve now and I never get lost in the complexity.
I use cli tools for almost everything, but Git Graph and vscode solves git for me. The only command I run in git cli is git clone or git unit.
All you need is a simple layer to make your typed api calls.
export const ApiService = {
return {
getSomeStuff: async () => ...,
postSomething: ...,
etc,
};
}The debugging story isn’t great if you expect to be able to use breakpoints.
It’s all about putting console.log wherever really.
The beauty comes in the speed of coding, I can move so fast that I always build a mock version of my api layer and can have the entire UI done rapidly.
That’s faster than I can remember it loading in real windows xp on a desktop (and that was installed versus downloading additional code for that module).
Impressive!
Also, as far as hardware is concerned, I am comparing a 14 year gap between a desktop computer of 2001 to a 2015 iPhone 6s - a 5 year old phone that still runs on battery for about 6 hours.
But that has nothing to do with load time and why most websites today can’t load in under 1 second (or even 10 seconds).
I’ve heard many complain about React performance, yet I have seen React with ssr or static rendering perform amazingly well.
My site for example loads as fast as hacker news on first page load, and then faster because of static rendering and pre-fetching, yet it has unlimited interaction.
I imagine if I profiled the performance of this demo, it would be similar.
Going to save this one for the next time someone says React is slow.
This worked instantly for me (just like my website, I wonder if they are using Gatsby or something else for static pre-rendering).
Typescript is awesome!
Show HN: TypeScript Hack – Type System Adventure
It’s great!
I also had fun researching how to get the best deal ~$2,000.
I’m teaching my children to write their school papers in markdown for similar reasons.
I use a github PR to provide feedback.
React is awesome because it allows feature-aligned separation of concerns (each component has a single job - render everything about a specific element - which is usually a well defined part of a specific use case).
Jsx is the best UI system ever in terms of productivity - speaking from experience: I’ve implemented production apps using dozens of UI frameworks/platforms - Html, WYSIWYG, Flash, WindowsForms, WebForms, Ajax, Asp.Net Mvc, Razor, WPF, Xaml, Silverlight, Knockout, Handlebars, PhoneGap, Ionic, Bootstrap, MaterialUI, Angular2, React w/ Class Components, React w/ Mobx, React w/ Hooks
I can tell you pros/cons of each of those. But at the end of the day I can develop an entire app in days in React+Hooks which would take me weeks in most any other.
So an infiltration bot: We have the technology today (gpt-3 level dialog) that could infiltrate criminal social networks, gather evidence, build credibility and power, and then help shut everything down.
The system itself cannot provide this, but an ai-human actor could.
Of course, this technology is scary: What I think is not a crime - like complaining about the government - is a crime in other places.
That makes sense. I imagine with some experience you have a decent idea about what you can make fit.
On the other side, an easier to implement and more worrisome idea (for me): AI that monitors your git repo to report you when you aren't getting things done quickly...
Do you work directly in the minified code, or do you create the demo in normal code first then look for ways to minimize it?
I explain a few good strategies to deal with types and hopefully add enough humor to make it entertaining.
TypeScript Any Is Evil
If you are not sure how a hard coded script that was targeting localhost affected a production database, how do you know you were even viewing the production database as the one dropped?
Maybe you were simply connected to the wrong database server?
I’ve done that many times - where I had an initial “oh no“ moment and then realized I was just looking at the wrong thing, and everything was ok.
I’ve also accidentally deployed a client website with the wrong connection string and it was quite confusing.
In an even more extreme case: I had been deploying a serverless stack to the entirely wrong aws account - I thought I was using an aws named profile and I was actually using the default (which changed when I got a new desktop system). I.e. aws cli uses —profile flag, but serverless cli uses —aws-profile flag. (Thankfully this all happened during development.)
I now have deleted default profiles from my aws config.
I started building websites in 1997 with FrontPage as a teenager. It was horrible - mostly because I was teenager and didn’t have anything interesting to say. It also wasn’t easy and took forever to get anything done. (So just slap an in construction gif in it.)
Now I can build anything I want quickly.
Writing raw html is very inefficient. If you want a friendly to create content, use Markdown.
If you want to structure your content or have some standard components, use React.
Use a static site compiler like Gatsby - that combines it all and makes your site compete with any hand-written html and still contain lazy-loaded interactive elements.
My blog is a perfect example: I can write my blog posts in markdown, paste images in as needed, run a build script, and push the changes. It takes about 1 minute to build and deploy.
But, at the same time, I can hide an entire text adventure terminal simulator in the header bar (that lazy loads on click).
My site loads as fast as any static site, but it transforms into full interactive quickly.
Best of both worlds.
So I can produce well formatted content, cool components, or even multiplayer games - it’s perfect.
We have a paradise of tools - it’s a creator’s dream - (once you figure out the right combination)
The complex behavior comes from a large enough random starting state combined with a very low minimal required complexity to see something interesting. Also, even for a short interesting run of local behavior, the game never produces a stable behavior that grows in complexity beyond the initial information encoded in the random state. (i.e. if there is a bubble of cool stuff happening somewhere on the 2d plane, something usually interferes with it and destroys that pattern - like waves in the ocean, even when the energy curves combine to form a wave once in a while, they are limited and temporary).
So the Game of Life is actually an example that the system is limited to the information encoded in the initial starting state.
In the starting state there is either:
- a large enough random search space (i.e. a million random attempts with a 100x100 board might get something cool looking)
- intentionality (a person can design a starting state that can produce any possible stable system)
Wouldn’t a system A that is capable of encoding another complex system B, need to be as complex in order to encode all the information in the result?
It’s like a compression algorithm, you can encode the information, but the complexity level of that information is still there (also the difficulty in compressing the information increases very fast - exponentially or maybe even factorially).
So if the most basic protein sequence requires so many bits of information, wouldn’t anything capable of producing that (in a non-random manner) also require at least that level of information (if not more).
It doesn’t matter what process we call systems A and B.
So it seems if randomness doesn’t solve the problem (because math), then the only conclusion is that there is a fundamental requirement for intentionality.
Since the quality is so high, I’ll add this bug report.
Bug report:
- iPhone
- Zoom in to change brush
- Can’t zoom page afterwords
In fact, I would argue that some of the most useful apps might be ones that we use less - because they accomplished the required goal.
Besides that the typescript type system is insane. It’s cool to hear about discriminated unions though.