HNHacker News
TopNewBestAskShowJobs

pcote

218 karma · joined December 5, 2010

I hack around and make things a lot. Oftentimes, it gets thrown out there onto my Github. Occasionally, I'll even write the odd blog entry or two.

- Blog ( http://hundredminutehack.blogspot.com ),

- Github ( https://github.com/pcote ),

- Youtube ( http://www.youtube.com/cotejrp ).

submissionscomments
pcote··on The Triumph of Stupidity (1933)
Complication kills, not complexity. Complex systems are made up of simple independent pieces. Those pieces work together naturally often leading to new behaviors. Because they are independent, they can also adapt easily to changes in the environment.

Complication is different. Complicated systems have dependencies that are more tightly bound together. Because of this, they can't adapt as easily to environmental changes. Consequentially, this creates conflict between system and environment that can often be destructive or violent.

Or at least that's my social hypothesis. I based my idea on the Rich Hickey "Simple vs. Easy" talk on software complexity. I think his ideas could be generalized to societies as well.

https://www.youtube.com/watch?v=rI8tNMsozo0

pcote··on Interview by a 15 Year Old
If we were to start from scratch? Every kid should learn to be themselves. Let their individual educations naturally sprout forth from that.
pcote··on Java 8’s new Optional type doesn't solve anything
Not entirely true from what little I know about Haskell. Haskell might put MORE of the burden on the compiler but it doesn't put ALL of it there. The following generates a runtime exception. (not a compile time type error)

head []

pcote··on Negative Impact of English on Math Learning
The simplest thing English speakers could do is get rid of the spoken words for 10 - 19 entirely. But what would you replace them with?

Tenty-one, tenty-two, ect? No. It sounds two much like twenty-one, twenty-two, and so on.

Replacing the tens with "onty" words makes sense because "on" is closer "one". There's no translation step needed in thinking "Onty-eight minus Onty-two" and coming out with six.

It would be a simple solution to the tens problem but hard with respect to getting people to adopt it.

pcote··on Method of loci
It's not so hard. The easiest way to start is with the place you live. You just pick out the most notable aspects of different parts of the rooms and start matching items to them. Like anything else, it takes practice. Over time, that aether should clear right up.
pcote··on Method of loci
I can vouch for spaced-repetition being an excellent training tool. It isn't just for words though. My uses for it range from individual terms to small training exercises. When I find a new solution to a problem I have, I often make a spaced-repetition card for it. You can learn a lot by making a daily habit of it.
pcote··on Reasons to love SQLAlchemy
What I like about SQLAlchemy is that it gives me a choice. I went with Core because I wanted the sense of security from building SQL queries with a library instead of out of strings.

Since the ORM wasn't forced on me, I was able to come around to it on my own. I've started to warm up to it recently even though I can't say I'm totally sold on it. The nice thing I can say about the ORM as of right now is that I don't feel like I'd be throwing away my core experiences to embrace it.

pcote··on 14-Year-Old Boy Arrested for Bringing Homemade Clock to School
There were debuggers in the electronics shops that I remember. They were called multimeters. You debugged by deducing where voltage, current, and resistance levels were in your circuit.

I've also made my share of brittle programming projects where one errant line could act like a "loose wire" and take down everything.

pcote··on Pixar in a Box – Khan Academy
I think the name "Pixar in a Box" sounds like a neat play on words on the term "Particle in a Box" from quantum mechanics. Sometimes, it's called an "infinite potential well".

So the title appears to come from the suggestion that there'a a well of infinite potential in terms of creative usages of math in computer animation. Or at least that's what I read into it.

pcote··on Scheme vs. Python (2011)
You can mutate closed-over variables in Python. Here's an example....

def some_function(val):

    def say_stuff():
        print("message is: {}".format(val))

    def mutate_me(new_mutation):
        nonlocal val
        val = new_mutation

    say_stuff.mutate_me = mutate_me
    return say_stuff
if __name__ == '__main__':

    f = some_function("hello")
    f.mutate_me("goodbye")
    f()
pcote··on I Spent Spring Break Teaching Girls to Code
At first, I was confused. The goal of most software projects is to cut costs and increase revenue for some line of business. How does bringing more women into programming help?

I asked my wife this question. Her answer.... It achieves the goal because women traditionally earn less money than men for the same job. I was stunned. Maybe she's right.

pcote··on Show HN: “Who is hiring?” Map
What interests me the most is how some states seem to almost repel the kinds of startups that would post on HN. The northern midwest looks particularly bad on this map.
pcote··on A Year of Spaced Repetition Software in the Classroom
Example from something I added today....

-------------------------------------------------- Front: Setup a flask view that requires basic authentication. Use the httpauth extension.

Back: How did it go? --------------------------------------------------

I have a lot of cards like this where I put the onus on myself to code up my own samplers.

My hobby is one where I'm playing around with Magic the Gathering data in JSON format. Over the past week, I designed a database, wrote SQLAlchemy scripts to populate it, and built up some RESTful web service views over it in Flask. It's been a lot of fun.

There'a a natural harmony where my performance on Anki reviews boosts my project work and vice versa. If there's a "key thing" to it all, it's that I have a project flow that works for me and makes me happy with the whole process.

pcote··on A Year of Spaced Repetition Software in the Classroom
Like with anything, there's a time to practice a craft and a time to perform it. All SRS does is optimize those practice sessions. It's still up to me to go beyond that and work the projects.

Stackoverflow and documentation serve to complement my Anki deck. I learn what I need and apply it to my project. After that, Anki cards get created.

Ultimately, I just see "stuff that you can google" as supplements to memory rather than replacements for it.

pcote··on A Year of Spaced Repetition Software in the Classroom
At the last programming job I was fired from, I was deemed to be a slow and all around poor performer. About a year ago, I started doing my own version of Jack Kinsella's Janki method. As a result, I've leveled up to what some call a "full stack" web engineer.

SRS is a fun way to learn or else I wouldn't have kept at it so long. I would even go as far as saying it's made my personal projects a little bit easier for me to execute on. However.....

What I don't know is how applicable this is in the "real world". SRS systems don't translate well in the "Learn-in-5-days-or-die" approaches to IT training. As for benefits for work-related development and maintenance, I don't have a clue one way or the other.

pcote··on Ask HN: How do I test that I'm improving as a software developer?
I do practice programming exercises which get scheduled through Anki flash cards. I relearn things as I go. Then I look at my stats for a sec.

After that, I move on to working on my projects. Some stuff comes easier than it used to for me. Some stuff kicks my butt. Ultimately, it reinforces two things...

1. I've gotten better in some respects.

2. I'm still a lot worse than I previously realized.

pcote··on Programming is not math
Imperative programming probably isn't math. Math describes things and their relationships. It doesn't tell other parties what to do.

That being said, imperative language has certain limits. When one party gives orders to one or more other people, then human language does the job fine. But when it's multiple people telling each other what to do, that's when human speech ranges from unpleasant to downright undecipherable.

So you get the same thing with imperatively coded programming processes that need to act concurrently in the same area. Confusion and fighting over resources is just the natural result.

pcote··on Lisp Is Too Powerful
I consider Python to be the scripting language of "everything else". In the apps I use frequently, Python scripting support shows up in Blender, GEdit, and Linux Mint.
pcote··on Everything about Java 8
>Operator overloading is easy and common in Python, but in my (limited) experience, it's used to create new classes which respond to existing operators with existing semantics, e.g. to make new number classes.

In Python, it's called "special method attributes" and they can do a lot more than just create classes. The __eq__ attribute returns a straight boolean for example in response to the "==" operator. And yes, by the way, you actually can accidentally alter attributes in the calling and callee objects if you aren't careful.

pcote··on Everything about Java 8
Why? Sure, overloading a "+" operator can be elegant looking. But the aesthetic gain vs. maintainability doesn't seem to be worth the tradeoff 99% of the time. I certainly wouldn't want to be the one who has to debug the thing because someone accidentally side effected one of the "operands".
pcote··on PyCon Code of Conduct changed to avoid public shaming
Childishness, silliness, and lewdness is a core part of what Monty Python was about. Monty Python's style of humor was encouraged in the Python programmer culture from the beginning. It's ironic that Pycon's policy would prevent me from publicly reciting some of my favorite Flying Circus skit lines.
pcote··on Echo JS - JavaScript News
The first thing this has me thinking is that it looks like a "subreddit" of HN. I'm surprised to not have seen or heard of a Reddit style site with HN voting rules on it.
pcote··on Echo JS - JavaScript News
Same reason there are still plenty of Java projects out there that stick a "J" in the start of the name.
pcote··on Fizz Buzz: Enterprise Edition
Oh, you want metaclasses? How about this?

print(type("",(),{"__call__": lambda self, start, end: [(n, (lambda x: ("fizz" if x % 3 == 0 else "") + ("buzz" if x % 5 == 0 else ""))(n)) for n in range(start,end+1)] })()(1,50))

pcote··on Fizz Buzz: Enterprise Edition
# That inspired me to have a bit of my own fun. Here's my awful Python take on it.

[(n, (lambda x: ("fizz" if x % 3 == 0 else "") + ("buzz" if x % 5 == 0 else ""))(n)) for n in range(1,51)]

pcote··on Taking the Leap
Interesting skydiving analogy. The overall advice maps pretty closely to general guidelines for going into the literal sport.

1. Cut personal costs to a minimum.

Skydiving is an expensive sport. You can and will spend thousands just to get the lowest level USPA license. Plan to make cuts so you can plan to jump regularly. Being too cheap or having an irregular jump schedule is not good for you, especially when starting out.

2. Do not take funding.

In a few cases, a drop zone might let you clean bathrooms and pack parachutes in exchange for student jumps. However, taking out loans isn't worth it in the long run.

3. Connect with mentors and peers and listen to them.

Skydivers are full of opinions some of which are well-intentioned. However, the wise student will listen to their skydiving instructor and take advice from non-instructors ( or "peers" in general) with a very big grain of salt. This includes advice from the Internet.

4. Don't tie yourself to one idea.

It's smart to have a plan but you have to make sure you have a plan B or C both in freefall and while flying a parachute. The situation on any given skydive can turn on a dime and you have to be ready to react without panicking.

5. Don't make plans or set deadlines.

The tag line for that is a bit deceiving with respect to what the advice here actually says. You DO want to plan your skydive. The bit about "not looking back" once you commit I can buy. Once you're out of the plane, it's obviously too late to change your mind and go back in.

pcote··on The Fireplace Delusion
>I sure hope even the most enthusiastic gun owner doesn't give guns to children to play with.

In some families, a father will put a loaded gun in the hands of his 12-year-old son and have him shoot at targets. You are right. It's never okay to give a kid a gun to "play with". However, giving a kid a gun to teach him respect for firearms is a little different.

pcote··on Seattle drinking den bans Google Glass geeks
Yeah, I thought of the smart phone angle of this too. The other day I was part of an airplane evacuation drill and I noticed someone filming me with his smart phone after all was said in done.

On one hand, I knew his intent was to film the activity and not me personally. On the other hand, I still felt a little annoyed about it. I might have said something if not for the fact that this technology is everywhere anyways.

pcote··on Amazon stops selling Sim City V over game issues
>Work for our small team. We won't destroy your work.

A small team might not. However, they also won't have the resources typical a larger triple-A product either. Nor will your game have a marketing team behind it to draw gamer attention with.

Without that, your game has to have a combination of cleverness and buzz. The latter requires a certain degree of luck.

pcote··on Python for Ruby Programmers (LA RubyConf 2013)
Using list comprehensions as a replacement for filter and map I can see. I don't really see where you're getting at as far as substitutes for 'reduce' are concerned. For me, the 'operator' module is a justification for using 'reduce', not a replacement for it.
← PreviousPage 2 of 4Next →