Projects
-
About The F*ck
Dunno how y’all are feeling lately, but I just have a lot of curse words on my mind. And by complete coincidence (actually no really), continuing with my theme of terminal tricks I have discovered the most perfectly named, magnificent app: The Fuck. It corrects your previous console command. All you have to do is install it and type:
fuck
.Here’s an example that I have already used (twice):
➜ git push fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ➜ fuck git push --set-upstream origin master [enter/↑/↓/ctrl+c] Counting objects: 9, done.
(And yes I’ve done
git config --global push.autoSetupRemote true
but I just got a new work computer argh)It also works on typos:
➜ git stats git: 'stats' is not a git command. See 'git --help'. The most similar command is status ➜ fuck git status [enter/↑/↓/ctrl+c] On branch main Your branch is up to date with 'origin/main'.
I suppose I could make aliases for all my common typos but this is way easier. Also, it’s fun to type swears in the terminal.
It auto-configures itself after you install it and type
fuck
the first time, and even can configure itself withfish
(which I’m trying out on my work computer). Also, have I mentioned it’s fun to type swear words? -
Webpack, Explained by Someone Who Just Learned What It Is
Image by digital designer from Pixabay
What is webpack?
At a recent casual meeting of Women & Gender eXpansive Coders DC (a local group I’ve become involved with over the past year) a Python user asked me this question, and boy did I stutter out a non-answer. I think I said something like, “Webpack is a build tool that magically bundles all your Javascript for the web.”
Does that sentence actually mean anything? I mean, I think I got the basics down, but I did use the word “magically,” so negative points for that. Also, pretty sure I inserted about a million “um”s as well.
I work with Javascript pretty much daily at work, but I’ve never really put much thought into Webpack or other Javascript build tools. That’s probably a good thing – after all, it shouldn’t be something I need to think about – but I decided I should have a slightly deeper level of understanding of these tools that are ubiquitous in modern front-end development.
For this post I’ll be talking about Webpack exclusively, but know that it’s not the only tool out there.
Okay, but what is Webpack, actually?
(Most) modern websites need Javascript to run. (This site uses no JS, thank you Jekyll.) Javascript used to be just added to the top of each page where you wanted to use it:
<!--index.html--> <html> <head> <script src="notavirus.js"></script> </head> <body> ... </body> </html>
//notavirus.js window.alert("Your computer has been compromised! Click here to download our malware remover!")
And that worked fine for years. It was all we had and we were okay with that.
-
Getting Unblocked, Faster: 5 Lessons from Journalism (and One Bonus Lesson) That Can Help You Ask Better Questions
Most loyal readers of this site know that before I was a software engineer, I was a journalist. I pivoted to my new career during the pandemic and have zero regrets! But there are certainly times I am grateful for my journalism training.
Frequently those times are when I need to get unblocked. I believe I can get unblocked faster than the average person at my level because my former career has taught me how to ask questions. Here, I’d like to share those tips so that you, too, can ask better questions.
1. Find your expert, and embrace the directed question
If you’re writing about the pandemic, you need Anthony Fauci on the line. If you’re debugging React, who’s your subject-matter expert?
At work, I try to notice who’s really good at certain tasks, whether or not they’re the official on-call for that task or service. I don’t hit them up all the time, but if a question in a public channel goes un-answered, or something is extra-urgent, I’ll send a quick DM.
Outside of work, I try to do the same, although sparingly. This blog is made using Jekyll, and for the most part I don’t have to know any Ruby to maintain it, but you absolutely bet I took notes when a woman in my local women-in-tech meetup was solving leetcode problems with Ruby one-liners.
Where else to find your expert? If your company has a formal mentorship program, get matched up with a mentor, and find out what they’re great at. Then say, for example: “I know we meet [biweekly, or whatever the time period is], but I’m new to [thing], and I know that’s one of your strengths. Would it be OK if I reached out outside of our set meeting times if I have a question about [thing]?”
Are you part of a tech meetup, Discord, user group (are those still a thing)? Sometimes a polite, respectful note to a helpful person there goes a long way.
All this does not overrule the idea that public conversations are, in general, better than private ones, because if your conversation is public, more people can learn from the discussion. But realistically, sometimes you just gotta get an answer.
-
Teaching a Reinforcement Learning Algo to Play Queens
Once you have created infinite games of Queens, you need to play infinite games of Queens. I don’t have time for that, so the next logical step is to teach the computer how to play, taking humans out of the equation entirely.
A very cool data scientist I know recommended getting to know reinforcement learning algorithms. These are the AIs that do cool things like speedrun Mario. Why not train one to beat Queens? Why not, indeed. Ignoring the part where I have no experience in machine learning and don’t think much of my math skills (I was a middle school mathlete, but I still don’t think much of my math skills), this should be fun. Follow along with me as I take my first steps into machine learning.
-
Site Updates for September
Frequent visitors to the site may have noticed some minor layout changes around here.
I’ve moved my list of projects to the top of the main page. Crucially, it is now mobile friendly as well.
Projects also have tags on them now to distinguish between
apps
(something that may be useful),games
(a full-fledged, playable game) andtoys
(things I made to mess around with). I may add more categories later.On the backend, projects are now a Jekyll
Collection
which in theory gives me more control over how to render them. And, if you reshare any of my posts, they now have improved open graph metadata.