Live data from Hacker News

I'm learning to code by building 180 websites in 180 days. Today is day 115

blog.jenniferdewalt.com

161–170 of 370 posts

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#162

Earlier quoted context omitted.

Wow! that's happened with me so many times. I'll start on a project and I'll always theorize all the best features, and then best technologies to use and I end up switching so many technologies and then going on a tangential curve to learn them, and then I eventually quit the project :(

I used to have this problem (and still do to some extent) but it's not impossible to improve. Pick an idea and commit to completing it in the way that you envisage it now, even if midway through you discover a new technology or better way to do it, stick to what you originally planned. There is always a better way to do something and if you allow yourself to be distracted by a "better" way of doing something midway t…

"The best code isn't always perfect code, the best code is code that exists."

I totally agree to this one.

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#163

Earlier quoted context omitted.

seconded. day 46 you wrote a snake game using canvas manipulation? i call shenanigans.

Did you look at the source? It's like 160 lines of code. Experienced programmer could do this in one hour, and I'm sure someone with 1.5 months of javascripting could do it in a day.

> It's like 160 lines of code.

Which is precisely the reason why I am skeptical. I would find it more believable if she wrote 500 sloppy lines. Maybe I am a bad programmer but I often write elaborate code without much elegance and then go back and enjoy reducing the number of LOC without the code loosing expression which to me equals elegance (ie the code is still easily readable and understandable just with a lot less code so just squeezing everything in one line doesn't count). Recently I refactored a project a junior dev wrote by the factor of about 100 by rewriting it and using basic OOP (it was a copy and paste nightmare).

This piece definitely showcases Jennifers dedication and is nice self-marketing but using this as a measuring stick for newbies would be unfair and unrealistic.

edit: Upon reflecting why it strikes me as odd is that when I started out programming I focused on one website I wanted to build and kept adding features rather then building as much different stuff as possible. Hence I probably can't assess whether her accomplishments are realistic.

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#164
post #33

Earlier quoted context omitted.

seconded. day 46 you wrote a snake game using canvas manipulation? i call shenanigans.

view the source for her snake game you'll see it's actually not that unlikely: http://jenniferdewalt.com/js/snake_game.js following a few tutorials after a google search for "create snake game canvas javascript", it actually seems very likely: http://css-tricks.com/learn-canvas-snake-game/ http://thecodeplayer.com/walkthrough/html5-game-tutorial-mak...

The snake code looks very similar to this tutorial[1].

1. http://cssdeck.com/labs/classic-snake-game-with-html5-canvas

Tutorial: //Get the directions document.onkeydown = function(e) { var key = e.keyCode; //console.log(key);

			if(key == 37 && dir != "right") setTimeout(function() {dir = "left"; }, 30);
			else if(key == 38 && dir != "down") setTimeout(function() {dir = "up"; }, 30);
			else if(key == 39 && dir != "left") setTimeout(function() {dir = "right"; }, 30);
			else if(key == 40 && dir != "up") setTimeout(function() {dir = "down"; }, 30);

			if(key) e.preventDefault();

		}
Jennifer's code: $(document).on('keydown', function (e) { var key = e.keyCode;

		if (key == 37 && snake.dir != 'right') {
			setTimeout(function () {
				snake.dir = 'left';
			}, 30);
		} else if (key == 38 && snake.dir != 'down') {
			setTimeout(function () {
				snake.dir = 'up';
			}, 30);
		} else if (key == 39 && snake.dir != 'left') {
			setTimeout(function () {
				snake.dir = 'right';
			}, 30);
		} else if (key == 40 && snake.dir != 'up') {
			setTimeout(function () {
				snake.dir = 'down';
			}, 30);
		}

		e.preventDefault();

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#167
post #29

Earlier quoted context omitted.

Before I started the project I freaked out and wrote down a list of every idea I could think of. Sometimes I feel like I'm going to run out of ideas but I usually get inspired by what I've been working on. I spend about 10 hours a day working on the project which doesn't leave time for much else. Most of that time is spent coding the day's website and I spend about an hour at the end of the day writing the blog post.…

I'm extremely impressed by how far you've gotten in this. I've seen a lot of these "create something every day" quests but they're usually in the first few days when posted. 10 hours a day spent on this seems like a huge commitment to me. I clicked the link to your blog but didn't see anything more to the motivations of this project. Have you posted any more details on what made you choose to devote yourself to this…

I had been thinking about how people communicate with each other on the internet and I got really interested in how websites facilitate that communication. I figured learning how to code would be a good way to see how those websites work and maybe even get to help build them myself.

I wrote a little about this here - http://blog.jenniferdewalt.com/post/53231496490/week-11-lets...

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#168

I have to ask: How on earth do you find the time to do this? As much as I'd love to do this in order to get my hands dirty on web development and out of systems, I can't ever fathom having the free time available every day consecutively. I mean, for someone "learn(ing) to code" on Day 1 and by Day 15 doing "Dropping Boxes", it just seems a little far fetched. Obviously you have had a good portion of coding experience…

seconded. day 46 you wrote a snake game using canvas manipulation? i call shenanigans.

I'd guess she reused code from previous sites.

Lately, I've been dumping heavily into a wiki while I work. Every command line snippet or reusable looking piece of code gets dumped in there. After about a week, it became really useful, and a month on it's amazing.

But yeah, if you write a site that uses canvas manipulation to draw a bouncing ball, all that work is already done when you want to use it for snake.

I like this story, because people do end up in situations where they have a lot of time (students on holiday, unemployed people, maybe stay home parents), but few use it in such an inspiring productive way

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#169

I have to ask: How on earth do you find the time to do this? As much as I'd love to do this in order to get my hands dirty on web development and out of systems, I can't ever fathom having the free time available every day consecutively. I mean, for someone "learn(ing) to code" on Day 1 and by Day 15 doing "Dropping Boxes", it just seems a little far fetched. Obviously you have had a good portion of coding experience…

seconded. day 46 you wrote a snake game using canvas manipulation? i call shenanigans.

"canvas manipulation". You make it sound like it some kind of strange hack. How else would you use a canvas element? People highly overestimate the complexity of making HTML5 games.

Re: I'm learning to code by building 180 websites in 180 days. Today is day 115

#170

Earlier quoted context omitted.

I saved up some money so that I could learn to code full time.

Do you think your art background helped you develop the focus and dedication to work on projects for such long periods of time? Most programmers couldn't manage that.

What on earth do you mean by this?
Post reply on HN