realSlavojTrump
realSlavojTrump on Hacker News
Iirc that particular bit of code is the power logic. You can file an issue on my fork if ys like me to write more on this when im not on a broken phone.
Blatant and rude sarcasm: you dont need to answer because a freshman cs student would know the answer.
It is an interesting case study. The code has failed to run for myself and the five other people i handed the project to with different configs. There are no tests that validate the project works. Its certainly work to be proud of, insofar as maybe its worked for some subset of people in the past.
Edit: I was excited to work on this code and spent a healthy amount of time reading through all of it to find great places to contribute. After writing a small pr, mostly a throwaway to test the waters, I was greeted with unmitigated assholery by the main devoper and their irc crew. I kept the logs from an irc conversation i had about the pr as a reminder of how not to act towards developers on projects i work on.
You can get around some of the pain of haning error types in catch statements if you are comfortable paying the price for a locally defined function:
result = try Something() catch err h!(e)=throw(e) h!(e::MethodError) = SomethingElse() h!(err) end
This pattern works well if an error case should return a default value and all others should throw.
Of course you could just write blog posts instead Kappa
To suggest that pull requests are a good hiring signal (as the author does in explicitly endorsing the "screening" of open source maintainers) ignores this bias. That can be positive or negative, depending on your commitment to diversity in our field.
If I was going to read a refactoring book while waiting for the second edition, I would take a look at “Refactoring to patterns.” (https://industriallogic.com/xp/refactoring/) R2P combines the best parts of Fowler’s Refactoring and the Gang of Four design pattern book.
Notably: it emphasizes the fluid nature of Refactoring and design patterns. Every Refactoring to a pattern in the book is shown in a few different ways, each explaining some of the trade offs. It has the same recipe book feel that Fowler’s book has and it lends itself to browsing and reference.
The recipe-driven approach makes it easy to carry out the refactorings and provides a fun new way to think about modifying code.
Imho, the section on the “Compose method” Refactoring in R2P makes the purchase worth it. How can such a dead simple Refactoring make code so much nicer? Read the book to find out ;)
I view every livestream I watch as a one sided code review and refactoring session, and spend most of the time watching reasoning through how they are coding and if there are things that could be clearer. I learn lots from that... including new idioms that I like or despise.
I’ll also watch streams where the coder needs help, so I’ll pitch in over chat to help with problems. I’ve taught several people suprising amounts through twitch chat and despite twitch delay.
Just try watching a stream or two! Check the creative communities on twitch and select programming or game development!
https://medium.freecodecamp.org/lessons-from-my-first-year-o...
The things that I’ve settled into when streaming that I tack onto that wisdom: -stream for at least 2-3 hours per session
-always double check your mic, I forget to unmute.
-downmix your mic to ensure you’re heard evenly
-noise gate and noise suppression are a must
-run obs on your pc but stream all of the code itself from vms. This solves most privacy problems and spares a lot of the common obs-on-screen issues you’ll see during streams. Also makes it easier to transition
-MAKE YOUR FONT BIGGER
-pay attention to chat! I’ve got 1440p monitors, so I keep my 1080p vm on the main screen and my chat / todo list stays on that as well
-set up notifications with stream labs (they’re fun and make people follow in cascades)
-pick reasonable stream titles. I’ve lost pretty much all of my viewers one stream due to a bad title
-consistency is king
-if you’re expecting undesirables, aggressively configure nightbot. Defaults and twitches built in mods will not be sufficient and white Supremecists will get around those settings easily.
I haven’t chosen to do a webcam but I know streamers can pull high enough views without them, so it’s just up to you and how consistent you want to be. I can share more of my experience if you like.
Twitch coding is the best and it prepares you for pair programming and whiteboard interviews where you have to talk while thinking through a problem.