Readit News logoReadit News
CatAtHeart commented on What makes code hard to read: Visual patterns of complexity (2023)   seeinglogic.com/posts/vis... · Posted by u/homarp
stared · a year ago
My pet peeve:

    function getOddness4(n: number):
      if (n % 2 === 0):
        return "Even";
      return "Odd";
While it is shorter, I prefer vastly prefer this one:

    function getOddness2(n: number):
      if (n % 2 === 0):
        return "Even";
      else:
        return "Odd";
Reason: getOddness4 gives some sense of asymmetry, whereas "Even" and "Odd" are symmetric choices. getOddness2 is in that respect straightforward.

CatAtHeart · a year ago
I personally prefer the former as you can visually see the return one level of indentation below function name. It shows a guaranteed result barring no early-exits. Something about having the return embedded lower just seems off to me.
CatAtHeart commented on Show HN: Asterogue, my sci-fi roguelike, is now playable on the web   asterogue.com... · Posted by u/chr15m
CatAtHeart · a year ago
One suggestion is to allow for HJKL or WASD movement. Arrow keys are fine and intuitive, but not in the best location. I remember playing nethack years ago and it had the HJKL system.
CatAtHeart commented on Waffle House's Magic Marker System   kottke.org/24/03/waffle-h... · Posted by u/Tomte
nerdjon · 2 years ago
I don't think Waffle House has locations in any major Urban location.

I really wish we had them in Boston also. It is an experience that even other diners don't really replicate.

Especially the price, I am always shocked when I go to visit parents just how much you get at Waffle House for multiple people for what I am used to spending on just myself.

But it is more than that. The size, the layout, the code words for how you want your hash browns, etc.

CatAtHeart · 2 years ago
To your first point, they are prolific throughout the South. Very prominent in Atlanta
CatAtHeart commented on Nonograms - Japanese Crosswords   nonograms.org/... · Posted by u/clouddrover
CatAtHeart · 2 years ago
Hungry Cat Nonogram [Google](https://play.google.com/store/apps/details?id=com.tuesdayque...) [iOS](https://apps.apple.com/us/app/hungry-cat-nonogram/id73774447...) was always my favorite of these as it had full-color puzzles.

It was also called "Hungry Cat Picross" until Nintendo trademarked "Picross" and went after everything branded with it. This actually caused me to learn about the nonograms as I had assumed the type of puzzle was always called picross.

CatAtHeart commented on Managing Kitchen Fruit Flies with a Little Shop of Horrors   blog.zaccohn.com/Fruitfli... · Posted by u/zacharycohn
CatAtHeart · 3 years ago
We bought a cheap standalone bug zapper and put it on the counter and it has been a life saver for the fruit flies. Ours come from bananas, we think, and washing them after bringing them home from from the store seems to help some too.

The best part is, working from our offices in separate rooms, my wife and I will hear a zap and both shout "Good job bug zapper!"

CatAtHeart commented on The best engineering interview question I've ever gotten   quuxplusone.github.io/blo... · Posted by u/db48x
CatAtHeart · 4 years ago
For anyone else who was initially confused like I was: On first look, I thought the solution had to involve exploiting commands over telnet to inject a mult command. It took me until looking at part 2 to realize it involved actually modifying the source code (which makes sense in retrospect). If you are looking to actually try and solve it, keep that in mind and don't look at part 2 :)
CatAtHeart commented on Huawei MatePad Paper – eInk Tablet   consumer.huawei.com/en/ta... · Posted by u/gadders
dotancohen · 4 years ago
You're satisfied with a device that is accepting pre-orders and hasn't shipped yet?
CatAtHeart · 4 years ago
The "pre-order" label is mostly due to supply chain delays. Currently there is a ~month lead time. I ordered mine back in late January and it is arriving this week.
CatAtHeart commented on Wild boars are able to open traps to free their fellows   nature.com/articles/s4159... · Posted by u/giuliomagnifico
ginko · 5 years ago
How is that even a pun that's supposed to work? 'lamb' sounds nothing like 'run'.

(also young goats are called kids, but that's a bit too much hairsplitting even for me)

CatAtHeart · 5 years ago
It's a pun on the phrase `on the lam` which means running away (from the law)
CatAtHeart commented on How I store my files   unixsheikh.com/articles/h... · Posted by u/iio7
Gurdt · 5 years ago
Can someone point me to the flaws of my method? I simply use Google Drive.

Me and my partner have multiple devices (tablet, iPhone, Android phone, multiple Mac and Windows laptops) and we just sync folders to our desktop. We just store everything we don't want to lose in Drive. We share folders we both need. Photo's we take on our phones are automagically backed up in the cloud, music and movies are streamed.

My house can burn down overnight and we won't lose any valuable data.

CatAtHeart · 5 years ago
Although I'm not sure of the rate, people have reported getting banned from google services without notice for seemingly no apparent reason. And there is little recourse to unlocking their account. It's something I personally don't worry about, but something to consider when relying on their services for backing up data.
CatAtHeart commented on The Missing Semester of Your CS Education (2020)   missing.csail.mit.edu/... · Posted by u/EndXA
silicon2401 · 5 years ago
An immediate flaw with this course is only suggesting VIM. Why not Emacs and Nano? I despise VIM and absolutely adore Emacs, but after getting emacs pinky have transitioned to nano for light editing needs, Sublime for universal productivity, and Intellij for Java development.

If you're only going to teach one editor, why an editor that's so arcane in comparison to something similar to a text editor like Sublime or Atom? If you're going for a terminal-compatible editor, why not Emacs or Nano? If you want the most workplace-ready tool, why not Intellij or VS Code? And my main question, why not at least teach a few and empower the users to really explore and find the best tools for them? To me this smells of people who don't want to help students equip themselves for success and instead want to teach them the "right" way to do things.

CatAtHeart · 5 years ago
There are vim bindings in most (if not all) popular IDEs so learning the base keystrokes can be lifted up to these at a later point.

They did explain that they based there decision based off the most popular command line editor (based on a stack overflow survey). Although it would probably be good to at least reference other popular / useful ones for exploratory purposes, for a quick overview course I think focusing on vim makes ample sense.

u/CatAtHeart

KarmaCake day25July 8, 2019View Original