Readit News logoReadit News
wes-exp commented on CL21 – Common Lisp in the 21st Century   github.com/cl21/cl21... · Posted by u/eruditely
emidln · 10 years ago
Why would you do that in a doc-string? If you just `declare` the types with `declare` instead of putting them in the docstring, the compiler can also take advantage of them. Then the system can automatically tell you that information back. It will also infer the return type for you automatically.

A trivial example (your editor can do this for you):

    (defun add-string (a b)
      (declare (number a) (string b))
      "Parses b and adds to a"
      (+ a (parse-integer b)))

    CL-USER> (describe #'add-string)
    #<FUNCTION ADD-STRING>
      [compiled function]
    
    Lambda-list: (A B)
    Derived type: (FUNCTION (NUMBER STRING) (VALUES NUMBER &OPTIONAL))
    Documentation:
      Parses b and adds to a
    Source file: /home/bja/foo.lisp

wes-exp · 10 years ago
There is also ftype:

  (declaim (ftype (function (number string) number) add-string))
  (defun add-string (a b) ...)

wes-exp commented on Learn to Code, It's Harder Than You Think   mikehadlow.blogspot.com/2... · Posted by u/mikehadlow
teach · 10 years ago
I think algorithm design is hard. Most students/people can't break down a problem into small enough steps for the computer to do them.

Are you familiar with the concept of "chunking" in memory research? Well, computers don't chunk but humans do. Humans tend to think about their algorithms in terms of the chunks they already know, but for computers sometimes each chunk has to be broken down into much smaller sub-steps.

And that's non-intuitive and hard. When explaining stuff to a human you get immediate non-verbal or sometimes verbal feedback if they don't understand the chunks, but computers just give a syntax error.

SECONDLY. Students have trouble making an accurate mental model of what the computer is doing at each step, so they can't trace through the code, much less create new code.

Those are the two biggies, in my experience.

wes-exp · 10 years ago
It sounds like what you're describing is not figuring out at a high level what to do, but formalizing that into low-level instructions for a computer. This goes exactly to my point. What I meant by "algorithm design" is strategy selection, which I want to be careful to separate from strategy formalization for a computer. It is the latter that I think laypeople struggle with the most, however, the fascination with algorithms often drives attention to the former. For example, it's easy to be impressed by the cleverness of binary search, but it's actually relatively straightforward to understand as a high-level concept. The harder thing for a layperson is to formalize binary search into a working set of computer steps. I think there is a certain cognitive bias at play, where the formality of fine detail seems lowly and menial, so we want to skip over it, in spite of the fact that it's actually the biggest hurdle for most people to overcome.
wes-exp commented on Learn to Code, It's Harder Than You Think   mikehadlow.blogspot.com/2... · Posted by u/mikehadlow
teach · 10 years ago
Your perspective is incorrect.

I've made my living by teaching beginners to code. I have been doing it for the better part of two decades, and I specialize in teaching students that have little aptitude for it.

I make my students code FizzBuzz. It is literally the 106th project I make them do. That is, they have completed 105 complete computer programs before getting to FizzBuzz.

And many of them still struggle with it. The nuance of else/if needing to be ordered in a certain way is something they still don't have a good grip on.

Programming a computer is very very hard for most people.

wes-exp · 10 years ago
The ill-conceived notion that parents giving children procedural instructions is somehow like programming brings me to a question for you as a teacher.

I've noticed that the industry really prides itself on algorithms and this is commonly reflected in interviews.

However, it seems to me that merely discussing algorithms, however clever they might be, is actually an intuitive human activity not unlike the example of the parent verbalizing procedural instructions to their child. Therefore, I would argue that algorithm design, though clearly an intellectual challenge in its own right, does not target the essential part that makes programming hard and inaccessible to so many people. (Disclaimer: a high-level algorithm discussion is usually followed by whiteboard coding, which I'm ignoring in this critique as a separate kind of activity).

Do you agree with this claim that algorithm design is not actually the thing that makes programming so difficult for laypeople? Can you give your take on what does make programming hard or what students struggle with the most?

wes-exp commented on Oakland releases months’ worth of license plate reader data   data.oaklandnet.com/brows... · Posted by u/oxguy3
joshontheweb · 10 years ago
Are there any legal ways of protecting yourself from this sort of data collection?
wes-exp · 10 years ago
Well there is the Steve Jobs solution: don't have license plates.
wes-exp commented on Confessions of a Right-Wing Liberal (1968)   mises.org/library/confess... · Posted by u/vezzy-fnord
wes-exp · 10 years ago
> And this meant that the great danger to the peace and freedom of the world came not from Moscow or "international communism," but from the U.S. and its Empire stretching across and dominating the world.

Can anyone explain how this statement makes any sense for a supposed libertarian at that time? Any way you look at it, the Soviet Union 1) suppressed freedom and 2) espoused militarism. I'm puzzled why it seems to get a free pass here.

wes-exp commented on Daniel Ek and Minecraft creator Notch debate Spotify privacy policy   musically.com/2015/08/21/... · Posted by u/tooba
tokenizerrr · 10 years ago
You cannot do any of that on a computer either. As far as I know neither Windows, Mac and Linux have any kind of permission system for the applications they run. Sure, you can hack something together using sandboxing/containers/VMs, but none of the operating systems provide this by default. There have been alternate Android roms which provide the features you speak of, as well.
wes-exp · 10 years ago
> neither Windows, Mac and Linux have any kind of permission system

Actually, OS X now has the beginnings of an iOS-like permission system for location services and access to your contacts.

wes-exp commented on Airbnb JavaScript Style Guide   github.com/airbnb/javascr... · Posted by u/webnanners
wes-exp · 10 years ago
Airbnb's technical quality has been obviously crap for its entire existence. Why are we taking engineering cues from a glorified room rental site that is frequently buggy?
wes-exp commented on Ask HN: Will programming continue to be a lucrative profession in the future?    · Posted by u/thefutureholds
wes-exp · 10 years ago
The whole tone of this question smacks of "gold fever". I'm guessing you're thinking about entering the field, so I'm going to tell you what someone told me during the original dot-com bubble:

Only become a programmer if you truly enjoy it.

If you're getting into programming solely because you think it's "on fire", you're going to have a bad time. It is always possible at any given moment for various reasons that VCs could collectively pull back on tech, or some major employers could downsize, and flood the market with excess talent. No one can predict this shit. There was a time post-bubble when many programmers could hardly give away their skills let alone make big bucks. Not long later there was a time when it was a foregone conclusion that all software development was going to India. Now here we are talking like "is this money wagon going to go to infinity?" and I say stop. Just stop. Do it because it suits you. Do it because you like the work. Please don't do it for "the money" which may or may not deliver for you, ever.

wes-exp commented on California Overtime Law – Computer Professional Exemption (2013)   gotovertime.com/computer_... · Posted by u/greenyoda
wes-exp · 10 years ago
Please don't complain about one of the most fertile job environments and wish for it turn it into another Europe.
wes-exp commented on Ask HN: Why don't startups outsource/offshore development if salaries are low?    · Posted by u/tuyguntn
hyperliner · 11 years ago
Your [1] is flawed because what is core is continuously shifting as the advantages of the knowledge you can get somewhere else exceed the costs.

An example from banking:

"Morgan Stanley has about 500 people employed in India doing research and statistical analysis. About 100 of Goldman Sachs’ 3,000 employees in Bangalore are working on investment research."

http://www.nytimes.com/2008/08/12/business/worldbusiness/12i...

wes-exp · 11 years ago
Be careful not to conflate offshoring with outsourcing, which the article does. Some startups will have their own employees overseas, but my point is specifically about outsourcing to other companies.

u/wes-exp

KarmaCake day984July 11, 2011View Original