HNHacker News
TopNewBestAskShowJobs

cnees

296 karma · joined October 15, 2017

submissionscomments
cnees··on My Tungsten Cube (2019)
We put a $600 tungsten sphere on our secret wedding registry as a joke, along with lobster flavored pillow mints, etc. It arrived in the mail. My husband's high school friends had pooled their resources. Now it's on the mantle, resting amongst warm woolen pom-poms.
cnees··on Ask HN: I've realized I'm a bad software engineer and I'm over 30, what's next?
You've taken on a new challenge, and that's great. You're missing a few elements of coding style, particularly the elements that make code easier to read and maintain for a team of engineers. That means you're new to devoping on a team, not that you're bad overall. Your co-workers may take these things for granted, but you have your own skillset, like the abilities to manage time, hit deadlines, and solve problems completely independently. (Those will be seem to be missing for a while as you grapple with a new codebase, company, and team, but they're still there!) Think of learning coding style on the job just like learning a new language on the job, and ask your co-workers to be patient and point out how you can improve while you adjust and onboard. It'll go faster than you expect!
cnees··on Teaching Students How to Cheat During the Pandemic
I still remember the first one or two hundred digits from high school. I guess I could say I cheated by going back in time and memorizing it. Perhaps I'd just insist that I didn't cheat at all, wink wink.

In high school, it definitely crossed my mind that I could hide earphones under my hair or wear a bracelet with a different color of seed bead for each digit. That's one of the slower methods, and it's easy to catch if you're looking for it, but it works in person and doesn't require a screen.

cnees··on Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
Thanks!

I use scroll position to keep the state. In effect, each square is in a div with overflow:hidden. (In the actual code I used <i>, not <div>, which might've been to save bytes because the server is so slow). It has a fixed visible height, the height of the square. Above the fold (before scrolling) is the un-clicked square, and below the fold (what you see after scrolling) is the clicked square.

Since overflow is hidden, you have to use an in-page anchor link to scroll to the clicked state. The unclicked version of each cell is an anchor to the clicked version.

cnees··on Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
To emulate Minesweeper's not-a-bomb-on-the-first-click experience, I start the board off with a generous region revealed, and then to emulate flood-filling, I make blank cells sit in an invisible (overflow hidden) scroll box that scrolls to a revealed version of the region when you click the blank cells, which have relative links. That only works for rectangular regions, but I remember having a way to make it work with irregularly shaped regions and being too lazy to implement it because it was going to be even trickier and uglier than what I was already doing. I'll leave that as an exercise for the reader. :P
cnees··on Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
No way! I've done exactly the same thing. (https://news.ycombinator.com/item?id=15479160) At first I thought this was my own thread! I guess there's a healthy overlap between loving Minesweeper puzzles and CSS puzzles. :)

I used HTML/CSS so I could implement it on a Neopets page, which meant I couldn't use forms, inputs, or CSS3, which means it's less feature-complete and the approach is completely different. The final result, though, is still the same delightful Minesweeper experience.

http://www.neopets.com/~Cism

Codepen link (so you don't have to be signed into Neopets to see it)

https://codepen.io/qaz/pen/bGEzyrJ

Enjoy!

cnees··on Ask HN: Have you been laid off?
Academia.edu is still conducting interviews (now remotely) and hiring at full speed. It's on solid footing financially, it's adapted well to remote work, and for the last three and a half years I've found it to be a really fun workplace. I can't recommend it enough without sounding like a recruiter. Here are the openings: https://www.academia.edu/hiring
cnees··on The missing semester of CS education
University of Michigan had this as an elective three or four years back, and it's served me well to understand things like piping, output redirection, and reflog. I'm glad MIT's making this public. It seems like it could fill a big gap for people who don't have the mentorship to know what they don't know.
cnees··on Cloud Cities of Venus - Why So Set on Colonizing Mars? There’s Better Options
This is a really interesting read. If we’re willing to live afloat, we can begin with Ocean Cities of Earth and expand to Cloud Cities of Venus as necessary.

Mars might still be easier to terraform than Venus, if we develop the technology, so maybe that’s part of why it became the focus. But if we could terraform Mars, perhaps we could just reterraform Earth.

cnees··on Ask HN: What people skills do you wish you learned earlier in your career?
Ask not how they can give you a rich experience, but how you can try to give them one.
cnees··on Ask HN: What are your other favorite communities other than Hacker News?
Neopets.com :)
cnees··on Ask HN: How to transition from academic programming to software engineering?
Here are some principles that inform my taste in maintainable code:

- Each function should do just one thing.

- Don't reuse a variable if making a new variable with a new name would describe the value better.

- Give functions verb names that describe what they do. If that's hard, they may be doing too many things.

- A function should either change something or return a value (command-query separation)

- Any data should have a single, canonical source of truth. https://en.wikipedia.org/wiki/Single_source_of_truth

- When deciding between making code DRY https://en.wikipedia.org/wiki/Don%27t_repeat_yourself or not, decide if future changes should affect both places at the same time (use DRY) or not (probably doesn't need DRY, maybe shouldn't have it.)

- Avoid spooky action at a distance https://en.wikipedia.org/wiki/Action_at_a_distance_(computer... and if you can't, refactor or at least add comments.

- Write modular functions that can be used without understanding much about the function beside what the name/arguments tell you.

One measure of your success in this area is how quickly someone who'd never seen your code could describe what it does.

cnees··on Ask HN: How to transition from academic programming to software engineering?
Your coworkers are your best resource.

- Ask them to review your code and suggest changes

- Look for questions of taste and ask more. It may feel intuitive to them, but if you dig in you can often find a good reason/principle behind it.

- Read your coworkers' code

- Read the comments people leave on others' code

cnees··on Ask HN: Which books have made you introspect?
The Bible. The book of Mark is a good place to start, or Romans, since you’re more interested in introspection. I’ve been meaning to reread a book by a Holocaust survivor called The Hiding Place.
cnees··on What’s the waiter doing with the computer screen? (2012)
“That’s the best use of a computer I’ve ever seen,” my CS prof told me as I wrote pseudocode on my MacBook with a pencil.
cnees··on Google Duplex: An AI System for Accomplishing Real World Tasks Over the Phone
Maybe I won’t have to overcome my fear of scheduling appointments after all.
cnees··on French Universities Cancel Subscriptions to Springer Journals
As a programmer, it’s hard not to wish we had git-for-publishing, git-for-Photoshop, git-for-homework, etc. it’s just such a powerful system! I think the steep learning curve is the reason it hasn’t already caught on beyond where it’s absolutely essential in software engineering. Maybe that means we need a more approachable git. It would also mean getting people onto the platform. Maybe a platform that already has the users could gradually introduce a version control system piece by piece.
cnees··on French Universities Cancel Subscriptions to Springer Journals
Supposing one of the scientist social networks implemented the refereed peer review process for some or all papers they host, funding it with ad revenue, APCs, and/or freemium instead of charging universities and readers, what more could they do to improve the system? Better post-publication review/redaction/amnendment for work we don’t realize is wrong until much later? A rating system?
cnees··on French Universities Cancel Subscriptions to Springer Journals
I’ve been reading these comments because I’m always seeking ideas for how to distribute peer review and provide signals about paper quality. How could we leverage the Internet and a large group of authors and papers to show readers which papers thrown online are of citable quality? Surely there’s something we can do beyond counting page views.
cnees··on To Change Habits, Try Replacement Instead
Someone I know switched to only biting one nail. I switched to biting more gently, not actually biting through the nails. Keeping your nails clean and trimmed may help.
cnees··on Ask HN: Is it 'normal' to struggle so hard with work?
+1 for jump roping. Besides daily exercise, you can pull out the rope and get back into a good mental state whenever it feels impossible to focus. If you're not looking to drop $35–75, here's a very affordable rope that'll do the trick: https://www.officedepot.com/a/products/836084/Champion-Sport...
cnees··on Ask HN: Is it 'normal' to struggle so hard with work?
Burnout drains your motivation, but unlike depression, it goes away when you go on vacation and lose the deadlines. Read up on it a bit, and if it sounds like what you're experiencing, do what Google tells you (take a break, focus on intrinsic motivation over extrinsic, align your motivation with your goals, take care of your body, etc.) and it will clear up. It may be that's not the problem, but I'll share some of the ways I overcame it in college because they apply to motivation in general.

1) I reengaged with a friend. I was so busy and stressed that I went months at a time without making social plans, and when a she wanted to get coffee, the first thing through my mind was how taking a few hours off from studying would make me that much more overwhelmed. She told me about burnout, and that's how I realized I was in a temporary state that I could get out of. Beyond that insight, just talking with a friend and breaking my isolation was the right thing to do for my social and mental well-being.

2) I switched from an accomplishment-oriented schedule (I'm done once I finish this task) to a time-based schedule (I have two weeks to do this assignment, and it will take me up to 20 hours, so I'll spend 2 hours on it per work day; that leaves six hours for these other projects, eight hours for sleep, and eight hours of free time.) I made a spreadsheet so I could see how much I was accomplishing and see that I'd have time to finish everything.

This made a big difference. There was always more work to do, always some long term project that wasn't finished yet that I felt like I had to work on, but scheduling time for it made it possible to take free time without worrying I was being lazy and I was never going to finish. It made my work, even huge projects, feel manageable.

3) I reevaluated my motivation. I was motivated by a sense of duty and obligation to work hard and make the most of my education, by grades, and by not wanting to fail. Hearing someone say, "Hard work pays off," was a great reminder to me that there were better reasons for what I was doing. Looking back, my hard work really did pay off. My education prepared me for my current job, which I love going to even on Mondays. It was very encouraging to look forward to the payoff and remind myself that my work was adding up to something.

4) I gave myself a break. I made it through the term by changing my time management and reevaluating my motivation, and the next term, I signed up for a lighter workload. I made it through college, and I've avoided going through burnout again by keeping an eye on my working hours and my motivation.

TL;DR: Take care of yourself, make some progress each day, don't forget your real motivations in the midst of your proxy motivators, take time off when you need it, and know that you're doing a good job and your work will pay off.

cnees··on The paradigms of programming
“Then I look for a general rule for attacking similar problems, that would have led me to approach the given problem in the most efficient way the first time. Often, such a rule is of permanent value.“

I like this. It’s a rule for finding useful rules. I wonder if I can get good at this kind of analysis.

cnees··on Neopets HTML Guide
Every once in a while I run into another programmer who started on Neopets, and it makes me happy. :) When I interviewed for my job, they asked me my “programming story.” I remember struggling to make my petpages compatible with Firefox, Safari, and IE5. I remember learning Dreamweaver so I could apply to adopt cool Neopets. I wrote tens of thousands of lines of HTML in TextEdit to make an interactive Lite Brite, and more recently I built Neopets-compatible Minesweeper. (http://www.neopets.com/~wire) These are the projects that made me give CS a shot even though I had no idea what it would be like and even though I was nervous to enter a field with a bad reputation for its attitude towards women. I’m so glad I did.

So many people learned the joy of coding from that site. Sadly, it can’t be that for the next generation because its code filters are almost as obsolete as this guide. HTML5, CSS3, multiple classes on an element, and the word “position” in a stylesheet aren’t supported. TNT, if you’re reading this, please take some time to invest in the part of your site where people learn and create.

cnees··on Show HN: Minesweeper game implemented in HTML/CSS
Thanks! That's a nice way to solve it! It looks like when you shrink it, it fits two pixels into the space of one by averaging their colors. I should be able to fix it by putting a margin above the bomb so it's not adjacent to the square you click on.
cnees··on Show HN: Minesweeper game implemented in HTML/CSS
See also: HTML/CSS Lite-Brite

https://codepen.io/qaz/full/wzams/

cnees··on Show HN: Minesweeper game implemented in HTML/CSS
Code: No JavaScript, no CSS3. https://github.com/cnees/minesweeper

Gameplay: Each number tells you how many of the tiles touching it (on sides and corners) are bombs. This board is designed to be solvable without guessing.

Pro Tip: You can undo a move by clicking on the square and typing Shift+Tab.

Discussion: Can you figure out how it works? Can you think of a way to implement flagging, game-over, or other features? Know of any other HTML/CSS hacks?

← PreviousPage 3 of 3