Better HN
topnewbestaskshowjobs
Log inSign up

songzme

2,994 karma · joined Sep 13, 2012 (14y ago) · 564 submissions

My name is Amay and I teach people about JavaScript at c0d3.com
Submissions

1.

Text Generation Web UI(github.com ↗)

2 points · by songzme · 3y ago · discuss

comment 3y ago · link · parent

I used to be addicted to youtube too, and when looking for a browser extension I found that just adding /etc/hosts entry (on a mac ) works well enough for me that I don't need an actual plugin. 127.0.0.1 youtube.com www.youtube.com

It's fast, and when I need to use youtube I just uncomment out the line in vim.

3.

Database Pooling Using Pgbouncer(github.com ↗)

2 points · by songzme · 3y ago · discuss

comment 3y ago · link · parent

good idea. FYI you can also `sudo vim /etc/hosts` and map any websites to 127.0.0.1, effectively blocking them. Your comment inspired me to do that thank you!

comment 4y ago · link · parent

if I want to replicate what the author did, what drawing tool / software should I get to do the initial drawing? I use ubuntu so preferably something compatible with that.

comment 4y ago · link · parent

I recently got interested in looking at the planets and constellations and I want to suggest these to anyone who is interested:

This book introduced me to how the earth moves and how to find any constellations in the sky: https://www.amazon.com/Stars-New-Way-See-Them/dp/0544763440/

My area has pretty bad light pollution and so having this binoculars really helps to see the hard to see stars (The wide angles helps you see several stars at once so I prefer it to the telescopes): https://smile.amazon.com/gp/product/B084R99W8Q/

comment 4y ago · link · parent

> recursion is "useless in industry"

From my experience its true. I have never written recursive code in my 12 years of professional experience (primarily JS).

But during interviews, I have written recursive solutions many times to solve some of the harder problems.

comment 4y ago · link · parent

I've been a SWE for 12 years and has been teaching people how to code during my free time ever since I started coding (so more than 12 years of teaching).

I have taught around 30 students over the past 12 years who went from knowing nothing to getting a SWE job and from my limited dataset I have observed that:

1. Students who were taught for/while loops first has a hard time grasping recursion. I suspect it is because following the recursive callstack gets tricky and feels unintuitive. This inspired me to try a curriculum where I teach students recursion first and don't expose them for/while loops until they are prepping for interviews.

2. Students who were taught recursion first has no problem understanding for/while loops when they were exposed to it.

For people who are curious, I used to teach students at my local library but recently created a free online curriculum at: https://c0d3.com

comment 4y ago · link · parent

thanks these books look interesting to me added them to my kindle!

comment 4y ago · link · parent

thank you so much I will go learn Kubernetes and Terraform and how they work

comment 4y ago · link · parent

sorry I should clarify the parts I don't know. I know how to build a full stack app with user accounts, deploy it to the cloud, then add websockets. I own https://www.c0d3.com

I don't know how to create server instances on the fly.

comment 4y ago · link · parent

Does this mean that it is final and that come winter I don't have to reset my clocks anymore?

A bit sad because I have always correlated 12pm as the sun being at its highest point (except daylight savings time, but I mentally adjust for that). Now the sun will always be at the highest point at 1pm.

13.

Ask HN: How to build something like Repl.it?

2 points · by songzme · 4y ago · 5 comments

comment 4y ago · link · parent

I thought about it, and I decided not to. TBH, I like vesting stocks and the stock growth helps me work alot less than I need to ( get to quit, take a year off and live off selling the stock, then go back to work).

With contracting I would have to save and every hour I don't work is an hour I'm not getting money its a bit stressful to think about.

comment 4y ago · link · parent

okay I will try this thank you for the suggestion!

comment 4y ago · link · parent

I really struggle with 1:1s primarily because:

1. Do you want career growth?

No, and its hard to tell that to my manager. More growth leads to more responsibility, which is more stress. I'm happy where I am and I don't want promotions.

I'm afraid to tell my manager that, because which manager wants an unambitious engineer? There was someone like that on our team and he was laid off in the last layoff round, so I have to "pretend" I'm working towards the next level.

2. Do you want more interesting work?

Also no, I'm perfectly happy maintaining our current codebase, not interested in new and shiny projects because my most interesting time is spent at home with my kiddo.

Any tips on how I can handle my 1:1s?

comment 4y ago · link · parent

I spend alot of time on Discord on multiple servers. With this outage, I couldn't access any of the servers I'm involved in, which gives me some time to look at open source self hosted alternatives:

https://revolt.chat/ - very similar to discord

https://rocket.chat/ - more similar to slack than discord

https://fosscord.com/ - feels a bit incomplete, I had a hard time using their fosscord instance

comment 4y ago · link · parent

oh I see so when node v17.4.1 is released, I would be able to run

node server.js --experimental-fetch

comment 4y ago · link · parent

sorry if this is a stupid question, but how do I try this out? I ran node with the experimental flag on a file that calls fetch:

node server.js --experimental-fetch

Got 'fetch is not defined' reference error.

20.

Elon Musk's Jet(twitter.com ↗)

6 points · by songzme · 4y ago · discuss

comment 4y ago · link · parent

you could start by creating a repository on github and gitlab, they have resources to help you track your source code with git and push your code to your repository. Then now you code is available for everyone to see.

Next, you want to create a readme file so someone new to your project could read it and understand how the code works. You can also start creating issues of features / bugs you plan to do.

comment 4y ago · link · parent

Universities are places where you go for intellectual pursuit of your interests, which is why majors like "study of russian history", "Anthropology And Archeology" exists. The major may be useless for employment, but the study helps preserve history and can be very interesting for the students who are passionate about it.

Somehow, society wrongly started associating universities for corporate job preparation.

I think people are starting to realize that if you want to get prepared for work, you should go to a trade training (like bootcamps). If you are priviledged enough to pursue your interests, then universities are a great place to be.

comment 4y ago · link · parent

Stuff like postfix and dovecot also make my eyes cross

I've been using nodemailin to receive all emails as POST requests. Set the DNS ip address to a vps on hostwinds (they don't seem to block incoming port 25) so it worked for me right away.

https://www.npmjs.com/package/node-mailin

https://www.hostwinds.com/

comment 4y ago · link · parent

> I’ll be teaching my child possessions mean wealth

That's what my mom taught me.

> just how do you intend to compete with that? Because in that case, my lineage will take your resources.

I didn't turn out the way my mom would have wanted. In my case, I realized that maximizing material wealth did not make me happy.

comment 4y ago · link · parent

I teach my kids to buy less, reuse as much as possible (like keeping the glass jars to make pickles, etc).

Fix up old furniture instead of buying new ones.

Eventually you'll learn to build an emotional attachment to things and value reliable old stuff that you've improved over time. Its a good thing.

comment 4y ago · link · parent

Eliminate expectations. It seems like 100% of my negative feelings stem from having expectations of people around me. I would say this single practice has the most impact in reducing my negative feelings in the past 2 years.

comment 4y ago · link · parent

> Myopia being primarily down to the eyeball growing too long is extremely, extremely well supported by research

Here's a link to a research about the eyeball shortening in adults: http://europepmc.org/article/med/3688185

I think you misread, there is no disputing the fact that eyeball gets longer, I remember him explaining that you have myopia because your eyeball got longer.

comment 4y ago · link · parent

There are some things that has tremendous value to me but are offered for free.

A few months ago, I found out about https://endmyopia.org/ and have been following their principles to improve my eyes. I've since learned about how my eyes works and went from -2.75 to -2.25.

If I could have paid a service to heal my eyes naturally without lasik, I would have done it, but the site offered everything for free.

comment 4y ago · link · parent

My baby is due in 4 weeks. My wife and I shopped for weeks trying to buy a 2nd hand crib that was affordable (We ended up getting one for free from a neighbor on nextdoor).

Never did it cross my mind that I could just use a cardboard box! I will definitely make a cardboard box for my upcoming baby, use it as much as I can, and see if I could get by without a crib! Perfect DIY project for a stay home dad, cribs always felt excessive to me.

12345
19