Pickadate.js - <AUTHOR> https://github.com/amsul/pickadate.js <comment><USER2> A few random comments...

This value is not what it says:

        SECONDS_IN_DAY = 86400000,

That's the number of _milliseconds_ in a day. Instead of a magic precalculated number, why not create all the relevant constants so the values become perfectly clear:

        HOURS_IN_DAY = 24,
        MINUTES_IN_DAY = HOURS_IN_DAY * 60,
        SECONDS_IN_DAY = MINUTES_IN_DAY * 60,
        MILLISECONDS_IN_DAY = SECONDS_IN_DAY * 1000,

Personally, I find these kinds of string constants get in the way:

        STRING_DIV = 'div',
        STRING_TR = 'tr',

The string 'div' is never going to change to something else, is it? It would be better to just use the string directly where you need it.

This is an amazing and scary piece of code:

        /**
         * Get the count of the number of
         * days in a month, given the
         * month and year
         */
        getCountDays = function( year, month ) {

            var
                // Set flip based on if month is
                // before or after July
                flip = ( month > 6 ) ? true : false

            // If it's February
            if ( month === 1 ) {

                // If it's not a leap year
                // then 28 otherwise 29
                return ( year % 4 ) ? 28 : 29
            }

            // If it's an odd month ID
            if ( month % 2 ) {

                // If it's after July then 31
                // otherwise 30
                return ( flip ) ? 31 : 30
            }

            // If it's an even month ID
            // and it's after July then 30
            // otherwise 31
            return ( flip ) ? 30 : 31
        }, //getCountDays

It also calculates leap years incorrectly - try getCountDays(1900,1). February 1900 had 28 days, not 29.

Why not let JavaScript do the work for you?

        getCountDays = function( year, month ) {
            var msInMonth = new Date(year,month+1) - new Date(year,month);
            return Math.floor( msInMonth / MILLISECONDS_IN_DAY );
        },

This will handle all leap years correctly.

You can probably do something similar in your createDate function to avoid the manual tests.

Also the name getCountDays is not very informative. Maybe getDaysInMonth?

The settings options use names_with_underscores, but that's not very idiomatic in JavaScript (except for capitalized constants). camelCaseNames would be more comfortable.

<comment><USER2> Just a followup on my "amazing and scary" comment. The "amazing" part is a genuine compliment: you found a pattern in the number of days in each month that I never noticed (the 'flip' trick). Being able to see these kinds of patterns and take advantage of them is an invaluable skill in programming.

The problem here, of course, is that it makes the code a lot harder to understand. To understand and verify the function, I'd start by writing out a table of the days in each month while reciting the "30 days hath September" rhyme. :-) Then I'd have to go through all the the flip and non-flip cases in the code and compare against my table.

Let's imagine that JavaScript didn't have convenient date calculations so we couldn't use the updated function I posted above. If that were the case, what would be a simpler way to code the function? Just _use_ the table of months directly. After all, there are only 12 months to deal with, so it's very simple:

        getCountDays: function( year, month ) {
            var monthDays = [
                31,  0, 31, 30, 31, 30,
                31, 31, 30, 31, 30, 31
            ];
            return monthDays[month] || getFebDays( year );
        },

where getFebDays() handles all the special cases for leap years ( /4, /100, /400, etc.)

Now, with the exception of February, it's trivial to see at a glance if the function is correct.

</comment></comment><comment><USER3> From the demos it appears that this doesn't have keyboard support. That seems like a major drawback from an accessibility standpoint.

It does look nice and easy otherwise, though.

<comment><USER4> Fork, fix and contribute.

<comment><USER5> Done:

<http://news.ycombinator.com/item?id=4812223>

It is even done without html5 input/type=date so probably is compatible with IE4

</comment></comment></comment><comment><USER6> A javascript date picker? Is HN being very expertly trolled?

<comment><AUTHOR> No. DatePickers, along with Forms, are the bane of my existence. More choices that are brought to light, the better.

<comment><USER7> There you go - this will make your life easier then:

[http://dojotoolkit.org/reference- guide/1.8/dijit/form.html#d...](http://dojotoolkit.org/reference- guide/1.8/dijit/form.html#dijit-form)

<comment><AUTHOR> Too bulky in my opinion. I don't need 90 percent of the things in that sdk.

<comment><AUTHOR> I should add, I also feel like these big frameworks have all the components and dont do a good job of each component. I rather use something that is by itself but the author is passionate about the widget and it is the best it can be.

<comment><USER7> It should not be a matter of "feeling", but testing things out. Usually frameworks like Jquery UI, YUI, dojo toolkit do a very good job, jquery doesn't provide any widget infrastructure, but still it does a good job afaik.

</comment></comment></comment></comment></comment></comment><comment><USER8> One issue: when you change the input type from "date" to "text", you lose the common backend format that date input fields are supposed to have. With a normal date input element, input.value returns a date in the format "yyyy-mm- dd" regardless of the display format (in Chrome, at least), and the submitted POST/GET variables reflect the same format. With your date picker, I get values like "31+October%2C+2012". Is there any way to modify your library to mimic the former behavior? Otherwise, you might want to note in your docs that this date picker might require tweaking your server side form processing code.

Here's an article describing the behavior in Chrome: [http://updates.html5rocks.com/2012/08/Quick-FAQs-on-input- ty...](http://updates.html5rocks.com/2012/08/Quick-FAQs-on-input-type-date-in- Google-Chrome). That behavior's in line with the current spec: <http://dev.w3.org/html5/spec/forms.html#input-author-notes>.

EDIT: I just realized that the OP might not be the author, so I'll just add an issue on GitHub.

</comment><comment><USER9> [https://github.com/amsul/pickadate.js/blob/gh- pages/pickadat...](https://github.com/amsul/pickadate.js/blob/gh- pages/pickadate.js) the code is a giant var statement. I don't know why, but somehow that bothers me.

<comment><USER10> The lack of semicolons and the use of jshint bothers me.

<comment><USER11> The fact that the code is very neat and is well documented bothers me.

Also the fact that javascript is a lot more readable when you put a blank line between every two lines bothers me (a lot!).

And that it works perfectly and looks great, man that bothers me.

<comment><USER12>
        // If datePassed is true
        else if ( datePassed === true ) {

Yes, _very_ well documented. >.>

<comment><USER13> Indeed. In fact, I'd posture that the comments, after the first, are wrong; the lines' intents are to _set_!

        // Set the element as readonly
        element.readOnly = true

        // Get the date today
        DATE_TODAY = P.getDateToday()

        // Get the date to select
        DATE_SELECTED = P.getDateSelected()

        // Get the month to focus
        MONTH_FOCUSED = P.getMonthFocused()

        // Get the date ranges
        DATE_MIN = P.getDateRange( SETTINGS.date_min )
        DATE_MAX = P.getDateRange( SETTINGS.date_max, 1 )

</comment></comment></comment></comment></comment><comment><USER14> >6k and a jQuery dependency? Dates aren't as hard as they used to be. I'm working on a pure-JS datepicker for modern browsers that will clock in at under 5k minified, with no dependencies. Take a look at my work so far here: <https://github.com/potch/fortnight.js>

(Edited to correct that the likely final minified size will be closer to 5k. Hoping to add accessibility features and localizability.)

<comment><USER15> Freezes up Chrome 23, Firefox 16.0.2 (shows "stop this script?" box) and Safari 6.0. Opera does not freeze, but the UI is very slow, suggesting something is still wrong.

<comment><USER14> I believe I made a huge mistake in my calendar rendering code. Hoping it's fixed now. Sorry for freezing!

<comment><USER15> It's still happening. Now (unlike before) it does show the widgets, but Chrome goes up to 100% CPU and nothing happens when I click the widgets.

<comment><USER14> I can't reproduce- what version of chrome are you using? I'm re-evaluating all my loops to increase general safety.

<comment><USER15> Your date arithmetic jumps through some weird hoops to accomplish something really simple. To increment a date by one day, for example, can be done like so:

          d = new Date(base);
          d.setDate(d.getDate() + 1);

Changing rel() to do this fixes the loop problem, but something else is surely wrong, because the result page now looks like this: <http://i.imgur.com/ZUAJg.png>

</comment></comment></comment></comment></comment></comment><comment><USER16> <http://jqueryui.com/datepicker/> <http://chipersoft.com/Kalendae/> <http://www.eyecon.ro/bootstrap-datepicker/> <https://github.com/dangrossman/bootstrap-daterangepicker>

</comment><comment><USER17> Very nice.

1) I think you should put a little tiny triangle / down arrow on the right side of the text-box to give it the official "selection" ui signal.

2) I think you should NOT grey out dates that have already passed and are not selectable but instead keep them the same black color as the others, just <strikethrough> them. They're really hard to see when grayed out that much and it confused me a little bit when I first saw the month.

</comment><comment><USER18> Nice. It needs a way to "click off" the picker to close it, without choosing a new date. E.g. the date is pre-selected, I open it, and then I want to close it again without changing the date. I intuitively expected that if I click the original field it will toggle off again, or I clicked elsewhere on the page it would close, like a lightbox overlay.

(tested on iPhone iOS 5.1)

</comment><comment><USER19> Would love a matching time picker. Anybody know of a good one?

<comment><USER20> Here's one: <https://github.com/perifer/timePicker>

Demo: <http://labs.perifer.se/timedatepicker/>

(I'm not the author.)

Edit: Added link to demo since that's the first thing I usually look for.

</comment></comment><comment><USER21> Deperately needs localisation support. In the UK weeks start on Monday, not Sunday as they do in the US. This is a big deal.

<comment><USER22> Is it really critical? If you take the datepicker of the TFL official website (<http://www.tfl.gov.uk/>) they start the week on sunday too. But I agree it can be a pain when you assume the first day is monday.

<comment><USER21> Yeah, I've booked travel on the wrong dates before because I've selected the dates visually. Really annoying. As you've spotted it's an endemic problem in the UK, and it needs fixing. Even Apple get it right, and they have a strong bias to USA-ify (at least more than, say, Microsoft).

</comment></comment></comment><comment><USER23> I like this, but as others have mentioned keyboard input/editing of dates would be nice.

While we're on the subject of date pickers, is there a favorite among HN users? What have you all used for your web apps?

</comment><comment><USER24> Does December work? :3

<comment><USER25> That was my first question too! So I tested it and it comes with December. Actually, it has all of the 12 months - no sacrifices there. Amazing stuff.

<comment><USER24> Phew, thanks for this. Now I can sleep at night again.

</comment></comment></comment><comment><USER26> What I would really love is for someone to provide both a date _and_ time picker. For some reason everybody is concerned only about the date.

</comment><comment><USER27> I found the copy on the demo page to be very clever in anchoring different emotional cues to specific days of the year.

</comment><comment><USER28> There is some strange bug in which I cant navigate more than one month before or after. It happens after I fill the initial date box. And then as I play around with the other dropdowns, I suddenly won't be able to move more than one month back or forward in any of the dropdown pickers.

</comment><comment><USER29> Could really use a paired time picker. Good script though.

<comment><USER7> These pair nicely:

[http://dojotoolkit.org/reference- guide/1.8/dijit/form/DateTe...](http://dojotoolkit.org/reference- guide/1.8/dijit/form/DateTextBox.html#changing-constraints-on-the-fly)

<comment><USER30> I'm still completely baffled that Dojo doesn't seem to get as much love as it should.

<comment><USER7> It has a reputation for bad docs etc... But they corrected a lot of that recently

</comment></comment></comment></comment><comment><USER31> This is a beautiful interface, but it doesn't provide any practical way to select dates in the distant past. "What is your birthdate" is one of many example questions that couldn't be answered without tens of dozens of clicks.

If it supported keyboard input, that problem would be solved.

</comment><comment><USER32> HTML5 has type="date" for input fields. It'd be kinda cool if this could automatically use those in situations where the browser doesn't support the picker natively. Unless I totally misunderstand the point ;-)

<comment><USER33> Support for input type="date" can be tested by creating an element like that and checking the type attribute. But how can you tell if the browser has support for the native picker? You can't. That is why this picker takes the approach of changing the type date always to text to prevent double date pickers.

<comment><USER32> _But how can you tell if the browser has support for the native picker? You can't._

That's what I was wondering. If there were a way, it'd be pretty awesome to use a library like this as a polyfill rather than as a separate thing you attach to text inputs.

<comment><USER34> You can. Modernizr will tell you if the browser supports the native picker. <http://modernizr.com/>

<comment><USER33> It doesn't tell that. From Modernizr wiki[0]: "webforms UI: datepicker, colorpicker UIs cannot be detected, only the associated constraint validation"

[0]: <https://github.com/Modernizr/Modernizr/wiki/Undetectables>

</comment></comment></comment></comment></comment><comment><USER35> These libraries always make me sad by neglecting to include a time picker.

<comment><USER36> this is a cool and easy addon to jq.ui datepicker <https://github.com/trentrichardson/jQuery-Timepicker-Addon>

</comment></comment><comment><USER37> Looks great. I like that it is big with plenty of spacing. Most date pickers seem to squish together the numbers without any apparent reason.

It'd be so helpful if makers of these js elements put screenshots of what the element looks like on top 3 mobile devices. Of course, this raises the question that they would need access to these devices. Which raises the question, for people who do mobile-heavy web dev, how do you test things rapidly beside having an iPhone next to you to constantly hit refresh?

<comment><USER38> iOS Simulator with desktop Safari's inspector if needed. If it is a more simple page then a separate browser window resized to mobile size.

<comment><USER37> Thanks! Also just found browserstack.com

</comment></comment></comment><comment><USER39> Looks like a really nice jQuery alternative from yui3 calendar (<http://yuilibrary.com/yui/docs/calendar/> )

</comment><comment><USER40> This doesn't seem to work on IE9 (either that, or I just don't understand how it's supposed to work). All of the examples appear to me as plain old editable text fields.

</comment><comment><USER41> I really like the datepicker on <https://www.google.com/flights/>. I wish someone would clone it for jQuery.

<comment><USER42> It seems to be far faster than the rest of the datepickers people have linked to on this page, as well. Feels great to use.

</comment></comment><comment><USER43> "Bind it like this: $( '.datepicker' ).datepicker()" - so the very first instruction is an incorrect reference to JavaScript 'binding' as something that extends or provides features to an element, vs what it truly does: change the scope reference of the 'this' keyword in a function. Oh jQuery, thank you for obscuring the actual JavaScript language for developers everywhere ___sigh_ __

</comment><comment><USER44> Looks great! And with a few (minor) modifications I was able to get it to work with a non-jQuery framework! Thanks for that. I'm getting fed up with all of these ".js" projects that rely _heavily_ on jQuery when they don't need to. I'm going to keep this library in mind for a project I'm working on.

</comment><comment><USER45> Nice work, thanks for the contribution. Will definitely use. Funny thing to, just created a web app that centers around a calendar and date picking. Was using jQuery UI datepicker but with some tweaking, I might use this.

</comment><comment><USER46> > whereas jQuery UI datepicker is 42kb minified

For anyone who cares, the Closure Compiler gets jQuery UI Datepicker down to 30kb (11kb gzipped).

Not quite as drastic as he claims but still significantly larger compared to his 6.7kb (2.8kb gzipped).

<comment><USER7> What functionality is sacrificed for size?

</comment></comment><comment><USER47> Some more missing stuff: does not allow to block specific days or weekdays (e.g. sundays) that should not be picked. Also time ranges (hover over a days and the next x days get highlighted) would be nice.

<comment><USER48> Just submitted an "issue" about that: <https://github.com/amsul/pickadate.js/issues/6>

</comment></comment><comment><USER49> <http://strtotime.net/>

</comment><comment><USER50> Looks cool but on iOs it won't let you close the picker unless you select a date other than what's selected. Touching the input again might be a good way to close it.

</comment><comment><USER51> When pairing this up with jqueryui js on the same page, none of it seems to be working. Not sure why, seems to not have the proper name spacing?

<comment><USER51> So i guess im answering my own question here. jqueryui names their datepicker under the same function name, I have to have jqueryUI and dont have the capacity to install a custom version of jquery ui to remove datepicker so this is basically useless to me.

</comment></comment><comment><USER52> Can it default to the native date selector on mobile?

</comment><comment><USER53> I'd like a second click in the date field to dismiss the date picker. That doesn't happen in the demo at least.

</comment><comment><USER54> Would be great if you make an option to be able to pick two dates (intervals) just like in Google Analytics.

</comment><comment><USER55> I do so wish this came out about a week ago. I had to resort to jQuery UI's datepicker for a thing at work.

</comment><comment><USER56> Very nice library! One question though: how easy would it be to make the datepicker responsive?

</comment><comment><USER57> +1 on years - for selecting your birthdate, it'd take quite a while. Besides that, nice job!

</comment><comment><USER58> Arrows should be added around the year for quicker traversal through years.

</comment><comment><USER59> pickadate is just as opinionated as jquery ui. why must component writers insist on hard-coded (and non-customisable) use-cases. there's simply no need to mandate an `input` element.

<comment><USER60> You might enjoy my attempt. No jQuery dependency and binding to an input field is optional.

<https://github.com/dbushell/Pikaday>

</comment></comment><comment><USER61> Some missing features: \- Week starting on mondays \- Week numbers

</comment><comment><USER62> The messages and dates they use on the demo page are fantastic.

</comment><comment><USER63> Why am I not able to pick today's date? (November 20, 2012)

</comment><comment><USER64> new builds of this have resolved all these issues: <http://amsul.github.com/pickadate.js/>

</comment><comment><USER65> How does this differ from the jquery UI datepicker?

<comment><USER66> Weighs 6.66kb (2.8kb gzipped) whereas jQuery UI datepicker is 42kb minified (or 30kb (11kb gzipped) via the Closure Compiler).

<comment><USER67> How much of that code on UI is for accessibility or backwards compatibility

</comment></comment></comment><comment><USER68> How is this better than the Bootstrap datepicker?

</comment><comment><USER69> For non-phones, what about a 4x3 grid of months?

</comment><comment><USER70> You should add it to <http://microjs.com/>

<comment><USER44> I thought the idea behind microjs was libraries/frameworks that _didn't_ require monoliths (like jQuery).

<comment><USER70> Doi, didn't read thought it was a stand alone date picker.

</comment></comment></comment><comment><USER71> Wish it allowed me to type in the box..the interaction is a bit confusing..

<comment><USER72> This was actually the first thing I tried, half expecting it to smart match the text.</comment></comment>


Los Horcones - <AUTHOR> http://en.wikipedia.org/wiki/Los_Horcones

<comment><USER2> I can't believe I forgot about his place, as a kid we used to tell each oher scary stories about the place when we passing through the area.</comment>


Elo ranking for more than two players games - <AUTHOR>

Does anyone know a good way to rank the participants of an endless tournament (as it happens, a darts tournament) ?<p>- The total number of participant in infinite<p>- The number of players may vary in each game, but is finite<p>- Each player can participate to an infinite number of games<p>- Each game as only one winner<p>We use quite a rudimentary system right now compiling the number of victory balanced by the number of players in each game but there is a huge bias : the more you play, the more you earn points. <comment><USER2> Your system can be summarized as the ACBL masterpoints system, where people earn points for winning but never lose points for losing. Then, the rating just measures how often you play, with better players needed to play fewer games for the same points.

How elo works:

\- Each player contributes points to a pool (based on their relative ranking) and the winner gets all the points.

So you can generalize:

\- Each player contributes points to a pool (based on their relative ranking) and the winner gets all the points.

This guarantees that "average sum of all ratings" remains constant over time.

However, no matter what system you pick, it will have flaws. If people try to maximize their rating, then they will choose to play or not play based on who are the other players. For example, if the method you pick penalizes you for playing with weaker players, then people who want to maximize their rating will refuse to play against weaker players.

You will always have a situation where the points a player contributes won't correlate to his actual chance of winning.

</comment><comment><USER3> A simple way would be treat it exactly like your favorite two-player, win/lose-only Elo system. In each game, each player is either the single winner (in which case, they are treated as winning against every other player) or a loser (in which case they are treated as losing against the winner only.)

If you have a ranking of players within the game and not just a single winner and everyone else a not-winner (which would be the case with games where everyone who completes the game has a score, and the high score wins), you can treat each game as a pairwise contest between each pair of players, with a win, lose, or draw between the pair based on their ranking within the game.

</comment><comment><USER4> So what you describing is an FFA (free for all) game.

I would let the points the winner gets equal the points the losers lose and spread the lost points across the losers according to their ELO ranking.

To prevent inflation, you could decay player's points, when they have not played for a while and you could add a winning tax according to the inflation rate.

<comment><AUTHOR> Thanks, so you propose that every player starts with a stack of points.

I do not really understand the way you propose to apportion the points among the players, could give an example ?

I do not want to check inflation, since I want to figure out who is the best player, not who is the most implicated.

<comment><USER4> >>Thanks, so you propose that every player starts with a stack of points.

Isn't that essential to the ELO system?

Let's say you have a game with four players with these levels: a=1, b=2, c=2, d=3

Player b wins. So player a loses 1 point, player c loses 2 points and player d loses 3 points. Player b gets 6 points. If you add a tax, 1 point gets lost and Player b gets 5 points.

Well, you are not responsible for the inflation. The inflation is created through new players, who get their starting value.

If you do not want to decay the points of inactive players, you could add the mentioned tax, so that the new points added to the system each day are equal to the points eaten by the tax on each game of a day.</comment></comment></comment>


Here are 3 Important Pages Missing from a Lot of Web Sites - <AUTHOR> http://www.standingdog.com/blog/adding-these-3-pages-to-your-web-site-could-help-your-seo/

<comment><USER2> Really sad if true. Most sites that have these pages will only fill them with legal boilerplate.</comment>


Run Ringmark test in your browser - <AUTHOR> http://www.rng.io/

<comment><AUTHOR> 40 out of 110 tests of Ring 1 failed on iPad 2 iOS 5.0.1. Interestingly even css3 transitions failed, which I observed they do exist.</comment>


A 3-Instruction Forth for Embedded Systems Work (1991) - <AUTHOR> http://pygmy.utoh.org/3ins4th.html#

<comment><USER2> This isn't quite a programming language - it "lacks a data stack" - which is to say, it can't even pass parameters. This makes its relationship to Forth - the quintessentially stack based language - rather tenuous.

It's really more of a DSL to remote control an embedded processor from a bigger processor running actual programs.

</comment><comment><USER3> This approach works really well with any number of tethered device scenario. You can use the same basic approach to debug distributed Erlang program, work with tethered mobile devices, or even work on many core machines. If you are trying to explore the behavior of a system interactively, you really need peek, poke, and run.</comment>


College Competitiveness Reconsidered - <AUTHOR> http://www.insidehighered.com/news/2009/10/27/hoxby

<comment><USER2> I'd be curious to know how selectiveness changes over the next few years when you subtract out seats taken by foreign students. China in particular exports a rapidly increasing number of students, many of whom will go to US schools.

<comment><USER3> At the very elite level I'm not sure it would really change much, but I'm not sure I fully understand what you're implying so I'll defer to you for clarification.

The article makes a good general point but misses many of the nuances that define college admissions. For one, schools, at least at the top, admit students in the context of the class and not necessarily on the basis of individual merit. This explains in part why students at a school like Harvard are not uniform 4.0 2400 students. There is value in diversity, so admissions committee will select students from different family backgrounds, states, race, etc. and adjust their gpa/sat requirements accordingly.

Second, I disagree with the author's premise that students are motivated to apply to top schools because of the per student resources spent. I'm sure this has some residual effect, but the REAL value added by going to a top school are the fellow students, reputation, and post-graduation opportunities. There is not much difference in your large 100+ student general econ class from one school to another.

I wonder instead if the increase in selectivity is due more in part to simple population ratios. Baby boomer offspring have been hitting the college circuit for the past few years which accounts for the large increases in applicants. It also helps explain the contrast in selectivity at the high and low ends of the spectrum.

<comment><AUTHOR> _This explains in part why students at a school like Harvard are not uniform 4.0 2400 students._

The main reason Harvard's class does not consist solely of students with 2400 on the SAT is that such students are too scarce.

[http://talk.collegeconfidential.com/college- admissions/41382...](http://talk.collegeconfidential.com/college- admissions/413821-sat-score-frequencies-freshman-class-sizes.html)

Here's a FAQ about demographic trends from 2008, which perhaps needs a bit of adjustment in light of the current economy:

Population trends in the United States are not the only issue influencing the competitiveness of college admission here. The children already born show us what the expected number of high school students are in various years, but the number of high school students in the United States, which is expected to begin declining in a few years, isn't the whole story.

[http://www.nytimes.com/2008/03/09/education/09admissions.htm...](http://www.nytimes.com/2008/03/09/education/09admissions.html?pagewanted=2&_r=1&hp)

First of all, if more students who begin high school go on to college, there will be more applicants to college even with a declining number of high school students. And that is the trend in the United States and worldwide.

Second, colleges in the United States accept applications from all over the world, so it is quite possible that demographic trends in the United States will not be the main influence on how many students apply to college. The cohorts of high-school-age students are still increasing in size in some countries (NOT most of Europe).

Third, even if the number of applicants to colleges overall stays the same, or even declines, the number of applicants to the most competitive colleges may still increase. The trend around the world is a "flight to quality" of students trying to get into the best college they can in increasing numbers, and increasing their consensus about which colleges to put at the top of their application lists. I do not expect college admission to be any easier for my youngest child than for my oldest child, even though she is part of a smaller birth cohort in the United States.

And now I would add to this that at the very most selective colleges that have just announced new financial aid plans, next year's (and the following year's) crush of applicants will be larger than ever. When colleges that are already acknowledged to be great colleges start reducing their net cost down to what the majority of families in the United States can afford, those colleges will receive more applications from all parts of the United States, and very likely from all over the world.

The Economist magazine published a brief article about these trends in April 2008.

[http://www.economist.com/world/na/displaystory.cfm?story_id=...](http://www.economist.com/world/na/displaystory.cfm?story_id=11058525&CFID=4596233&CFTOKEN=12382953)

<comment><USER3> The point I made regarding uniform students was to emphasize that admissions committees admit students based on the profile they want the class to look like and not just on the individual merits of the student themselves. I think this is an important point that often gets overlooked by applicants.

Good points about the demographic trends. I'm still not very convinced. The points you raised are just as speculative as mine. True a higher % of hs students may be going to college, but is that rate of increase faster than the rate of decline in the total number of applicants? In a few years the bottom will fall out, can the % of hs students attending college rise to meet that gap?

I see your point about the trend in international students. Though I find it doubtful that any elite US school will ever have more than 10-20% of their class be composed of non-US students.</comment></comment></comment></comment>


SICP Goodness – Why you don't need looping constructs - <AUTHOR> https://www.lvguowei.me/post/sicp-goodness-looping/ <comment><USER2> Actually you don't need another contruct than goto. You don't even need functions.

But for some reason given the choice, people use them.

It makes things easier to reason about for most day to day problems.

I train people in programming for a leaving. "Map" is harder to understand than "for" to most of my students. "Reduce" harder than manual looping. Recursion harder than iteration. Immutable harder than mutable.

Now I always end up teaching the entire toolbox. Those are all very useful concepts that I use in production and I do want my students to have a large solution set to their future problems.

But there is a clear pattern in my teaching experiences.

<comment><USER3> >Actually you don't need another contruct than goto. You don't even need functions.

>But for some reason given the choice, people use them.

There is no choice when it come to functional programming because the paradigm is based on Alonzo Church model of computation known as Lambda calculus which is declarative: Everything is an expression or, more specifically, a function. Because of that, statement like goto are forbidden. Goto is from the Alan Turing model of computation known as the Turing machine which is imperative; everything is a statement.

Guy Steele said that the lambda expression in Scheme is the ultimate GOTO because it's like an unconditional jump while remaining declarative and functional.

</comment></comment><comment><USER4> Beware the conclusions drawn from the first read through the writings of our functional programmer forefathers (and the second, and the third), for "a little knowledge is a dangerous thing". The unprepared mind of the imperative programmer is especially prone to following the revelations of the old masters before achieving real understanding.

A while ago, I was working in company X, that sold a web platform for job boards, with multiple big and famous clients. One time, there was a bug in our platform, that had to do with a for-loop with an always-true condition. The loop -which was in our core platform code and so deployed in every single website we maintained- caused untold havok, as resources disappeard down a black hole and all our servers dropped to their knees and asked for mercy.

In the aftermath of the incident, when an explanation had to be given to those UpStairs running the show, it was put to them that the cause was an (effectively) unconditional loop. Now, as a lowly junior dev, I was not present in the deliberations but, given what followed, I can imagine the conversation:

      Those UpStairs: "How can we ensure that the same thing never happens again?"

      Senior Software Person: "Well, there is no way to ever be 100% safe. A for-
      or while-loop can always go wrong."

      Those UpStairs: "Is there any alternative to for- and while-loops?"

      Senior Software Person: "Not really. I mean, there is recursion of course..."

      Those UpStairs: "Recursion? What is that?"

Shortly after, we had a big emergency meeting to discuss What Should be Done to Avoid the Same Problems in the Future, where we were instructed to not use the looping constructs of the langauge in which our platform was written, anymore. Instead, we should only ever use recursion to write loops.

The language of our platform was C#, mind. A language that (to my knowledge, and certainly at the time, around 4.0) does not even support tail-call optimisation. Not to mention, it's just as easy to go into an infinite recursive loop as it is to go into an infinite imperative loop, if not easier.

Suffice to say that nobody followed the instructions given from On High, either because they found it too much work, or because they found it too stupid, or because they were just busy pulling their hair out.

<comment><USER5> It's just as easy (if not easier) to make a mistake with a recursive call such that it never terminates. Why did your team suggest it as an alternative and why was it accepted? TBH the whole story seems very hard to believe.

<comment><USER6> Imagine "Those UpStairs" is angry, panicked and shouty. Imagine "Senior Software Person" is put-upon and long past arguing with "Those UpStairs".

I can see it.

<comment><USER7> Been there, had that rammed up good and hard. I can see it.

</comment></comment></comment></comment><comment><USER8> I would say that schemes looping constructs are too limited for comfortable use, but that tail call elimination makes implementing your own constructs very easy. I have reimplemented racket's for loops for guile using named let loops [0] which was not only pretty easy, but it was also easily understood and optimised by the guile compiler. The end result is as fast as a hand rolled named let for almost all cases (I still haven't found one where it is measurably slower, but I have only tested it in the repl where the compiler can make lots of assumptions)

For that reason alone I think tail call elimination is a must, especially in today's transpiling world.

[0]: [https://bitbucket.org/bjoli/guile-for- loops](https://bitbucket.org/bjoli/guile-for-loops)

<comment><USER9> ES6 used to mandate TCE but it was removed. No browser other than Safari implements TCE for JavaScript. Apparently the main reason is an inaccurate stack trace on exception.

<comment><USER10> The latest spec still talks about tail call optimization. The big objection was to replace implicit tail calls with a syntax to specify functions that might tail call.

With TCO being part of the spec and the potential replacement spec killed off, browsers really need to start getting with the program.

JavascriptCore (safari), Node v6, duktape, jerryscript, XS6, etc all have proper tail calls. It breaks the community to not implement them. It's not a standard if its not standard.

<comment><USER11> Explicit or implicit doesn't matter for compiling to JavaScript. Explicit tail calls are much better that no tail call support at all.

<comment><USER10> I agree, but the companies behind explicit calls dropped it, but are refusing to implement the current spec too. Their stupid politics endanger the js ecosystem.

</comment></comment></comment></comment></comment><comment><USER12> I made it a goal of mine about 10 years ago to avoid explicit for-loops. It turns out using declarative style makes things more readable and safer and better optimized by the compiler. I can usually tell the purpose of the loop by just reading the function name (map, filter, ..) and the lambda. Sometimes parallel comes for free. Plus, all those off by one errors, iterator errors from erasing elements, etc. are all eliminated :)

<comment><USER13> > It turns out using declarative style makes things more readable and safer > and better optimized by the compiler.

I don't think most of my loops are straightforward maps or filters of a single iterable. I need to reference various data sources and execute actions with side-effects. To do that using a functional framework, something like Haskell's mapM ("monadic map") is required. But that brings quite some mental overhead and I find it way too constraining for the typical case.

> more readable and safer and better optimized by the compiler.

I doubt these are in general qualities of non-builtin constructs vs builtin ones. But yes, too much builtin and non-orthogonal functionality leads to detrimental complexity.

In any case I don't think it matters much to most compilers whether you write a loop using syntactic sugar or as labels and jumps.

<comment><USER12> I haven't really encountered a loop that there isn't a function for. There ought to be some exhaustive list of all the different kinds of loops in computer science textbook. But Most of what you need is in Zip, fold, map, reduce, filter, find, sort, reverse, transpose, permute, concat, any, all, max, min, cycle, take, ..

I've periodically done microbenchmarks of inner loops over the years and the various gcc outputs of the c++ loop functions are always performing slightly better than if I hand rolled. Perhaps with gcc7 or clang this is different.

<comment><USER13> > Zip, fold, map, reduce, filter, sort, reverse, transpose, permute, concat, > any, all, max, min, cycle, take, ..

Cool, so if that's all we should just use those. But wait, what about those dozens of megabytes of data, should we really zip/transpose/concat them? We should use non-strict evaluation then...

<comment><USER14> You can use lazy lists / streams even with strict evaluation, you just have to be explicit.

<comment><USER13> Point being, I'd rather not have this complexity. Do you mean to explicitly take each next value from the stream? And then possibly throwing all this "lazy" work away? Or memoizing the work and writing extra code that checks if the work was already done when the data is accessed? And then probably forgetting to get rid of the data when it's no longer needed?

No thanks, that's even worse. It's honest, but that doesn't make it a good idea. I like to do one thing at a time, not jump around like a wild horse. Turns out optimizing for not jumping around too much also makes programs simpler overall.

I've recently cleaned up some code of this kind. Defines objects with unsuitable lifetime and tries to be smart about reusing work instead of planning out in which order to do things in the first place. While the actual task was not difficult, the code was incomprehensible, to state it in a diplomatic way.

<comment><USER15> Not sure where you get all this idea of complexity from, lazy streams are used in functional languages a lot for data processing and they are not incomprehensible, also imperative languages like rust has iterators that are more used than for/while loops.

<comment><USER13> Well, I described the situations from which I get my ideas of complexity... Regarding iterators, I'm fine with their usage depending on what they _do_. However I don't think it's a good idea to iterate over an abstract stream that under the hood does sorts and zips and folds. Because you lose control and understanding how much intermediate data will be produced (constant small amount? 3 times the amount?), and in what order code gets executed.

And if you think consciously about the intermediate data you probably can use it for a whole lot of other things!

In Haskell, unexpected memory expansions and duplication of work can happen. And these problems are not nice to debug.

I might be generalizing too much, though. Maybe you're talking about short- lived web applications that never see a large amount of data, or something like that.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> However, if iteration and tail-recursion are equally powerful constructs, the implication that recursion is morally superior to iteration seems misplaced.

<comment><USER17> You can use tail recursion to create abstractions in a compositional manner that cannot be created compositionally with iterative constructs.

For example, if you can express a finite state machine (FSM) as a number of mutually (tail) recursive functions. Then you can reuse this FSM as part of a larger FSM via a tail call. You can't do this with the iterative constructs in C et al---the whole FSM must be defined in one spot.

<comment><USER18> So do the tail recursion in C.

Any decent compiler will handle it just fine. If you want to include crappy compilers, well, then we need to include the same for LISP and Scheme. Whatever the language specification may claim about tail recursion is not relevant when you sit down to produce code for the actual system at hand.

<comment><USER19> A Scheme compiler that doesn't do tail recursion isn't crappy; it is incorrect/nonconforming. A C compiler that doesn't do tail recursion still conforms to the abstract language semantics.

In Scheme, local functions are used for looping (via tail recursion). C doesn't even have those (other than as a GNU C extension).

</comment></comment></comment></comment><comment> Const-me I prefer looping constructs over recursion, almost every single time.

Loops are closer to what CPU actually does. A compiler is therefore simpler to implement and will likely contain less surprises.

It's easier to use a debugger on procedural-style or OO code (step in/over/out, local variables) compared to recursive functional style advertised by SICP.

In most runtimes, call stack is limited to a small size, couple of megabytes. Stack overflow exception is hard to handle in reasonable way. When instead using a loop with a stack container for state, it can be much larger, also easier to handle overflows i.e. implement soft and hard limits.

<comment><USER20> Explicit recursion is really a foundational primitive upon which other abstractions should be built, including looping constructs. It is similar to goto, in that it is a form of unstructured programming. Functional programmers prefer using maps and folds.

Loops are not necessarily close to what a CPU actually does either, especially one supporting vector operations or out-of-order execution. Loops imply an ordering which may or may not be actually exist and many compilers _are_ complicated by their presence.

Debuggers are a problem for any suitably high-level abstract code. Would a step-by-step word-at-a-time debugger help to debug a SQL query or even a complex arithmetical expression from Fortran? There is no getting away from the fact that high-level domain-specific code needs high-level domain-specific debuggers to be built alongside.

<comment> Const-me > functional programmers prefer using maps and folds.

I know and I don't think these are always good things.

> Loops are not necessarily close to what a CPU actually does either

Indeed, not necessarily, but very often. Unless automatic vectorization is involved, long loops are very often quite close to the machine code uploaded to CPU. Inside the CPU it's free to do whatever, but on the public API, it's still loop instructions.

> the fact that high-level domain-specific code needs high-level domain- > specific debuggers to be built alongside.

That's not a fact, that's your opinion. I don't code SQL nor Fortran, mostly C++ and C#, sometimes Python and others. The debuggers I have in corresponding IDEs are already built, they are sufficiently high-level for domain specific code, but the debuggers themselves aren't domain specific, they are pretty general purpose.

<comment><USER20> > I know and I don't think these are always good things.

Maps and folds do make structure explicit though. For example, it is very easy for a compiler to vectorise a "map" operation. Folds will always terminate.

> The debuggers I have in corresponding IDEs are already built, they are > sufficiently high-level for domain specific code.

But does your debugger allow you to visualise the intermediate steps of an arithmetic expression? Does it understand Iterables/Enumerables and allow you to capture and inspect them? Can it handle concurrency and parallelism, or help you make sense of callbacks for non-blocking IO etc? My point is that the debugger is simply not as general purpose as most claim it to be. It sees the world word-at-a-time and only allows you to step statement-by-statement. It does not understand the composite data structures or control structures that you have built. This is less of a problem with low-level code, as typically there is limited abstraction. But it will be a problem for any sufficiently high-level abstract code (functional or otherwise).

<comment> Const-me > it is very easy for a compiler to vectorise a "map" operation

For a general map function, it's insanely hard problem. It's only trivial if the map function is trivially simple e.g. `return x*2`.

> does your debugger allow you to visualise the intermediate steps of an > arithmetic expression?

No, and I write my code in a way so the expressions aren't too complex. When they grow to be that complex, I break them into multiple steps, keeping intermediate results in separate variables. BTW my primary motivation is readability, debugging is secondary.

> Does it understand Iterables/Enumerables and allow you to capture and > inspect them?

I think so.

> Can it handle concurrency and parallelism, or help you make sense of > callbacks for non-blocking IO etc?

Sure, debugging async-await code in .NET is almost as simple as old school non-scalable blocking IO code.

> But it will be a problem for any sufficiently high-level abstract code

Not a huge problem in practice. There're simple ways to implement support for your custom composite data structures, e.g. natvis files in VC++. Also, in .NET you can run any code in debugger's immediate window, while execution is paused. These simple methods aren't effective in 100% cases, but often they are sufficient to debug, therefore saving a lot of time because no domain- specific debuggers are required.

<comment><USER20> Wow that's fantastic that Microsoft have extended the debugger to understand streams and async/await code, this of course only works because they develop both the abstractions and the debugger. It's probably not so easy for the rest of us to extend it for our own abstractions.

<comment> Const-me > It's probably not so easy for the rest of us to extend it for our own > abstractions.

Depends on the abstraction. For idiomatic stuff it's relatively easy to extend the debugger, see e.g. [1] about writing custom debug visualizers for very complex objects (for reasonably complex there're much simpler ways).

For non-idiomatic stuff such as extending the language by modifying the compiler, or e.g. post-processing the compiled output, I don't know because I never needed debugger support.

[https://docs.microsoft.com/en- us/visualstudio/debugger/creat...](https://docs.microsoft.com/en- us/visualstudio/debugger/create-custom-visualizers-of-data)

</comment></comment></comment></comment></comment></comment></comment><comment><USER21> Does anyone know a good time in one's career to take time out and spend it on going through SICP and videos lectures with it?

I have a STEM (non-CS) degree but very recently, started working as a programmer. Doing my first internship at a 'techy' corporate company. One of the things I'd be doing on the side is to go through [https://mitpress.mit.edu/books/elements-computing- systems](https://mitpress.mit.edu/books/elements-computing-systems). The video introduction to it just gives me goosebumps to this day. I don't know why. It's fascinating.

Than there is other paradigm books such as "pragmatic programmer", "Thinking Like A Programmer", "Design Patterns: Elements of Reusable Object-Oriented Software", etc.

So far, I've done plenty of reading on Algorithm & Design Structure and leetcode here and there. In the past, I didn't qualify for internship at Google, Amazon or M$ as a software developer/engineer. I feel the reason why I didn't was because I didn't have a "computer science" keyword mentioned anywhere on my resume. Hence, my hope is after getting through "Element of Computing System" & Design Pattern, I'll be able to shove in "computer science" keyword one way or another on my resume.

<comment><USER22> > Does anyone know a good time in one's career to take time out and spend it > on going through SICP and videos lectures with it?

I guess any time is good. It's generally a class you take as a freshman or sophomore. People who attend top engineering schools generally played around with these topics in high school or even in elementary school.

Also, it looks like MIT stopped teaching SICP.

[https://news.ycombinator.com/item?id=11628080](https://news.ycombinator.com/item?id=11628080)

> In the past, I didn't qualify for internship at Google, Amazon or M$ as a > software developer/engineer. I feel the reason why I didn't was because I > didn't have a "computer science" keyword mentioned anywhere on my resume.

Or you are competing against the best of the best CS students from around the world. People who aren't blown away by introductory stuff like elements of computing systems or who are just looking into SICP. I really don't think missing a keyword is why you didn't get the internship at google, amazon or microsoft.

> Hence, my hope is after getting through "Element of Computing System" & > Design Pattern, I'll be able to shove in "computer science" keyword one way > or another on my resume.

I've never had computer science on my resume though I majored in it. For my internships, I just listed the courses/projects I worked on. For my first job, I just listed the degrees I had ( BS and BA and the gpas for both ), along with the projects I worked on and the internships I had. After that, I just listed the university and degrees and my work experience. "Computer science" isn't something I ever listed in any resume. But then again, I was never really good at writing resumes.

I think you are really overthinking things but feel free to do what you want. If you are so intent on putting computer science on your resume, why not just major in computer science?

</comment></comment><comment><USER23> I believe this is the place to ask a question I've been wondering about. WebAssembly currently doesn't support Goto labels and several people are pushing for it: [https://github.com/WebAssembly/design/issues/796](https://github.com/WebAssembly/design/issues/796)

Now I'm aware that mutually recursive functions can be gracefully used to implement state machines and that the issue of jumping into the middle of a loop from a goto seems to be prized.

The former (mutually recursive function) seem to solve that problem, not necessarily in almost a general senses, however perhaps preventing some of the most nasty things Goto can do.

I'd like to know if mutually recursive function requires the underlying machinery to provide gotos. In my view, that would fully justify them. If not, then tail-recursion might be the only thing missing from WebAssembly.

<comment><USER24> Why would you be worried about the "nasty things Goto can do" in an assembly language? IMO assemblies are about exposing the underlying machine's capabilities (be it physical or virtual) in the most straightforward way possible. I don't expect an elegant abstraction, I leave that to the higher level languages.

I don't know much about WebAssembly so I don't know if gotos have a place or not but if they're useful and the only reason for not adding them is cargo- culting "gotos are teh 3v1l" it's a bit silly.

<comment><USER20> I respectfully disagree that Web Assembly really "exposes the underlying machine capability" in any meaningful sense. The situation we are in today, is that many assembly ISAs are no longer fit for purpose. A modern C compiler will spend a lot of work recovering data-flow dependencies (e.g. SSA form) only to then remove them when outputting e.g. x86 assembly. The CPU then has to recover much of this information again for out-of-order execution etc.

IMHO, the Web Assembly folks should focus on a simple, elegant core language that is easy to define and easy for a JIT to optimise. The machine architecture, whatever that may be now or in the future, should be secondary. Personally, I would never have called it "Web Assembly" either.

<comment><USER24> That sounds very reasonable to me but if my (very limited) understanding of WebAssembly is correct then it's mainly meant as a target for compilers, not something you'd routinely write yourself unless you wanted very tight control over the code or maybe micro-optimizations, as such it doesn't make a lot of sense to object to certain feature from a code maintainability/language ergonomics point of view IMO.

I'm not saying anything about what WebAssembly should or shouldn't look like, I haven't got the faintest idea about that, I was just criticizing the argument of the parent about the "nastiness" of goto that felt out of place in this context. If 99.99% of all wasm code is generated by compilers then it should mostly aim at providing a target that lets compiler output efficient code, not something that would be nice for humans to write or add arbitrary limitations to prevent coders from writing "nasty" code.

<comment><USER20> > it's mainly meant as a target for compilers, not something you'd routinely > write yourself

Yes absolutely. That's why they should not cave in to pressure to add semantically redundant features just to make a particular project or application slightly more convenient.

In order to meet the objectives of easy to define and easy to optimise, it will be necessary to agree on a core set of foundational primitives and stick to them.

</comment></comment></comment></comment></comment><comment><USER25> Loops are theoretically interesting and rich and with the right tools even the most complex cases can be written clearly and reasoned about easily. [https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/E...](https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EWD316.4.html) is a good example of how mathematical reasoning is just as applicable to "imperative" programming as it is to "functional." [https://en.wikipedia.org/wiki/Hoare_logic](https://en.wikipedia.org/wiki/Hoare_logic) describes the syntax used.

</comment><comment><USER26> Luckily I had been exposed to recursion previously, what blew my mind while watching the SICP videos was the implementation of car and cdr using only lambda and the realization that the language could go without variables.

</comment><comment><USER27> Lisp only replaces looping with recursion, it doesn't eliminate it. APL does.

<comment><USER19> Lisp idioms like (mapcar function list) replace both looping and recursion with an aggregate operation, similar to APL; it's just not obsessively condensed into a single character syntax.

</comment></comment><comment><USER28> The title should be "why you don't need looping constructs if your language supports tail recursion".

</comment><comment><USER29> Technically you don't need loops, that's true.

But from a pragmatic standpoint, it's just too easy for someone to turn a tail-recursive function into non-tail recursive, causing a stack overflow eventually.

So when working in a large team, with run-of-the-mill programmers, I'd stick with loops.

<comment><USER30> Would an annotation help, e.g. a `tailcall` keyword, which will trigger an error for non-tailcalls?

<comment><USER31> Fwiw, Scala does exactly that with its `@tailrec` annotation.

</comment></comment></comment><comment><USER32> Yes, you can use recursion to loop... What was this post trying to tell me?</comment>


Fast Image Resizing with AWS Lambda - <AUTHOR> https://petar.io/post/fast-image-resizing-aws-lambda/ <comment><USER2> "resizing 1000 images (around 1.2 GB) to 2 thumbnail sizes in 3s"

Did I miss something in this article? Why I cannot found this metric?</comment>


Ask HN: Are there are any good alternatives for MS Project? - <AUTHOR>

Are there any good alternatives for MS Project?
I have used MS Project in the past on my job and love its functionality.
Now I need project management tools to use in my own company and I find MS Project to be quite  expensive considering that I want both my test/req lead and programming to be able to break down their assignments into sub-projects and give visibility to the rest of the team.
Are there any stable and cheaper alternatives to MS Project?
I have tried Open Project, found it has quite a lot of bugs and wouldn't want them (or myself) to waste time trying to overcome those bugs.
I have also tried an online service 6 months ago (it mostly did gantt charts), it was horrendously slow and impractical for that reason. <comment><USER2> We are working on an alternative <http://gantto.com>

It is still Beta and we are very actively working the kinks out. If you find it is close to serving your needs and send us your requests, we will do our best to make them happen for you.

<comment><AUTHOR> Thanks for informing. May have some useful suggestions, will leave it on gantto.com.

</comment></comment><comment><USER3> Asked a similar question at serverfault. Hope you find this helpful.

[http://serverfault.com/questions/64010/is-there-an- alternati...](http://serverfault.com/questions/64010/is-there-an-alternative- for-ms-project-server)

<comment><AUTHOR> Thanks</comment></comment>


Ask HN: Can you trust Amazon S3 and RDS? - <AUTHOR>

I'm curious to know what everyones thoughts are regarding trusting storing the only copy of your data in S3, or the Relational Database Service which has its own set of backups (which apparently use S3).
The 99.9999999% durability is quite attractive but obviously that is only theoretical and doesn't include events such as serious bugs on their side, human error in deleting your account somehow or someone gaining access to your Amazon account through no fault of your own.
Note: I'm excluding the possibility of my own code deleting the data since we're using a read-only key for S3 and binary logs on RDS. Having my main account details stolen is obviously a risk too, but one that I'm ignoring in this discussion. <comment><USER2> Why single out Amazon? You should have the same concerns with any provider. If you lose sleep because you are unsure of your provider then the only option is to host/manage/backup yourself. Regardless of who hosts it there will be human error and technical glitches. It isn't about if something will happen it is when. Design in such a way as to minimize recovery time and effort. Plan for failure.</comment>


Israeli Court Enforces for the First Time a Creative Commons License - <AUTHOR> http://cyberlaw.stanford.edu/node/6589 <comment><USER2> Actually, I'm not even sure CC was the basis for this ruling, but rather Israeli copyright law.

The main issue in this case was the dispute whether 15 images used illegally count for one violation of Israeli copyright law, or 15 - one per each image used.

In this case, plaintiffs were awarded damages for 15 violations of the Israeli copyright law, in accordance with Israeli copyright law, which apparently makes it very clear that each publication is to be seen as a separate work of art.</comment>


Ask HN: Best value/price dedicated servers in US and Europe? - <AUTHOR> We've video/image processing apps and need powerful hardware with uptime guarantees. Dedicated servers are the most cost effective, no virtual or Amazon SWS. What do you use? Currently we have servers that cost around 100$/mo for a Xeon 1270 with 16gb ram, but the uptime is not that great, downtimes are frequent.
We know plenty of more expensive solutions (for instance for metadata & cdn we use Softlayer which is expensive and more reliable), but we need cheaper options. thanks! <comment><USER2> Uptime guarantees are rarely worth the paper they're printed on. Most will give you some lame credit if they exceed the very generous amount of downtime they allow (e.g. 99% = just under 4 days a year downtime).

The only way to get real uptime is to have dedicated on-site support. Which is to say "someone to yell at" when the system(s) go down. But that type of service is quite expensive indeed (add an extra 0 to what you're currently paying minimum).

For $100 you're going to get shoddy support and some downtime. All you can really do is buy $100 systems with different vendors so that if one vendor is offline you can push the workload to the other two.

But then of course you need to design your infrastructure to move workloads around, and that within itself is a lot of work...

<comment><AUTHOR> Agreed, we do have several vendors and do distribute the workload as much as possible. In our experience when a server goes down the whole data center has problems, so even if it's more inconvenient the best is to really have an assortment of vendors.

</comment></comment><comment><USER3> Europe: [http://www.hetzner.de/uk/hosting/produktmatrix/rootserver](http://www.hetzner.de/uk/hosting/produktmatrix/rootserver) and [http://www.1and1.co.uk](http://www.1and1.co.uk)

<comment><USER4> I'd avoid Hetzner. A competitor/malicious user can take down your site by DDoS'ing it for a short time.

<comment><AUTHOR> And this is not true of the others? I've not seen guarantees against that in any of the other vendors...

<comment><USER4> Hetzner have a policy of null rooting IP and not responding to reinstatement requests resulting in significant downtime.

OVH are similarly priced yet have good DDoS protection for free.

</comment></comment></comment></comment><comment><USER5> We are using Hetzner. Xeon 1270 with 32GB RAM costs €69/mo [http://www.hetzner.de/hosting/produkte_rootserver/px60](http://www.hetzner.de/hosting/produkte_rootserver/px60)

Their SLA is 99.9%

</comment><comment><USER6> OVH is pretty cheap, promises a 99.95% SLA. [http://www.ovh.ie/dedicated_servers/enterprise/](http://www.ovh.ie/dedicated_servers/enterprise/)

</comment><comment><USER7> I'm using Linode and I'm happy with it, check out their pricing. [https://www.linode.com/pricing](https://www.linode.com/pricing)

</comment><comment><AUTHOR> forgot to mention our current providers: ioflood for US, and serverloft for EU.

</comment><comment><USER8> Cheap root server providers, mostly in Germany if nothing mentioned otherwise, all with own infrastructure (no resellers) and my personal experience. Note that prices mentioned in Germany are almost all the time incl. VAT, so you might be able so save 19% on those prices.

[https://www.hetzner.de/us/hosting/produktmatrix/rootserver](https://www.hetzner.de/us/hosting/produktmatrix/rootserver) \- Hands down my favorite. Very powerful hardware for the price, very professional, good network

[https://www.webtropia.com/en/](https://www.webtropia.com/en/) \- extremly cheap, many different offers, good quality, good option if price is very important

[https://www.hosteurope.de/en/Server/](https://www.hosteurope.de/en/Server/) \- The "Root Servers" they sell are actually VMs. High price but good quality

[https://www.strato-hosting.co.uk/server/dedicated/](https://www.strato- hosting.co.uk/server/dedicated/) \- Belongs to Deutsche Telekom, big company, I never used their dedicated servers (the VMs are crap though)

[http://www.server4you.com/dedicated- server/](http://www.server4you.com/dedicated-server/) \- cheap, big company, quality is ok. Other brands are Serverloft, Plusserver, unmetered.com

[https://www.1and1.com/server-dedicated-tariff](https://www.1and1.com/server- dedicated-tariff) \- big company, good network, not that cheap

[http://www.euserv.com/en/dedicated- server/index.php](http://www.euserv.com/en/dedicated-server/index.php) \- many different offers, good support, good value

[https://english.keyweb.de/products/server/dedicated- server/](https://english.keyweb.de/products/server/dedicated-server/) \- never used the dedicated servers, VMs are crap

[https://www.ip-projects.de/produkte/premium-rootserver/](https://www.ip- projects.de/produkte/premium-rootserver/) \- no personal experience

[https://contabo.de/?show=server](https://contabo.de/?show=server) \- Small company, good offers, good support

[https://www.manitu.de/root-server/](https://www.manitu.de/root-server/) \- Small company, very good support

[http://www.seflow.net/dedicati/](http://www.seflow.net/dedicati/) \- ITALY, small company, very cheap, good

[https://www.online.net/en/dedicated- server](https://www.online.net/en/dedicated-server) \- FRANCE, very big company, very cheap, good network

[https://www.digicube.fr/index/comparatif](https://www.digicube.fr/index/comparatif) \- FRANCE, extremly cheap, network not that good

[http://www.kimsufi.com/us/en/](http://www.kimsufi.com/us/en/) \- FRANCE and CANADA, very cheap, good quality, very good dDOS protection. Other brand of OVH is SoyouStart

[https://www.leaseweb.com/bare-metal-server/all- servers](https://www.leaseweb.com/bare-metal-server/all-servers) \- NETHERLANDS, very big company, very professional, kind of expensive, DCs in different countries

<comment><USER9> Note that scammers and spammers are well aware of the cheapest dedicated server providers and love to use them for hit and run attacks. That often results in subnet ban for the whole provider's datacenter. Although if you're only after backend hardware resources and not care about SEO, email deliverability and such - then this list is good.

Otherwise be aware.</comment></comment>


A Look at Palm's Latest OS - <AUTHOR> http://gadgetwise.blogs.nytimes.com/2010/09/16/a-look-at-palms-latest-os/?src=twr <comment><USER2> Palm/HP is in a tough spot, but it's possible for them to go up with a bit of luck.

They need mindshare, solid hardware, and apps. The 3 are codependent. Good hardware and apps help mindshare, and having market interest and a good phone attracts app makers. If they mix their timing just right they could come in at third place behind apple and google.

They are doing good things right now on the app front. More and more good iPhone games are coming to WebOS. HP is having a lot of their software engineers spend a bit of time writing for WebOS as a sort of 20% project.

If they can get an exciting headset (not just good, exciting), and a marketing campaign that puts it in enough impulse buying hands, then win those users over with webOs + good app selection, they have a chance.

However, if they release a half hearted handset with little marketing, their base wont' expand and it will slowly but surely fall into obscurity.

<comment><USER3> Yeah, I love my Pre, but the hardware already feels dated. It's crazy how much progress is being made in mobile devices every year now, reminds me of desktops in the mid 90s. You buy one and feel like it's out of date a month later.

What really killed them was launching exclusively on Sprint. With hardware evolving as fast as it does, by the time it made it to Verizon and AT&T it was just no longer compelling. While I actually love Sprint, there are a lot more people on Verizon and AT&T.

I really think market share will take care of any lack of apps. More advanced hardware, a more attractive design, and a better marketing campaign would take care of that. I think HP has a real shot, though maybe my love of WebOS has me biased.

</comment></comment><comment><USER4> As difficult a situation as Palm is in, I was reading that article thinking Nokia is in far worse shape. WebOS remains just a promising also-ran next to iOS, Blackberry, Android, and presumably WP7, but MeeGo doesn't even rate mentioning, and Symbian is a walking corpse.

<comment><USER5> 90% of potential cell phone customers aren't looking for a smartphone, they don't currently have any sort of phone and guess who makes all the cheap waterproof rugged phones.

hint - the next billion customers don't live near Apple stores.

<comment><USER6> You'd be surprised. Worldwide mobile phone ownership is up to 5 billion[0]. Meanwhile, much of the first world has already transitioned to smartphones.

If you wanted to jump on the cheap phone trend, you're ten years late. Whatever margins existed once are now gone. Nokia, the king of cheap phones, just fired their CEO and replaced him with a software guy from Microsoft. Apple, HP and Blackberry know exactly what market their fighting over.

[0]: <http://www.poder360.com/article_detail.php?id_article=4704>

<comment><USER7> Is that five billion individual owners? That's pretty impressive! Current estimates put the whole world population at just under 7 billion.

<http://www.census.gov/main/www/popclock.html> has it at about 6.8B, and a Google search on "current world population" turns up similar figures.

<comment><USER5> Last stats I saw showed that for W Europe the average user had owned >5 handsets.

</comment></comment></comment></comment></comment><comment><USER8> HP/Palm have one possible advantage: bundling for the enterprise. Give away a Palm phone with each purchase of a PC by corporate accounts.

Apple essentially does this in the consumer market. MacBooks and the iPod Touch get bundled together during back-to-school season.

<comment><USER9> I don't think the enterprise cares about cost; they care about control. For example, my work blackberry requires a 10 character password (that's not qwertyuiop, apparently), and they disable changing the wallpaper, ringtones, use of the camera, and sending text messages.

Why? Because it's a checkbox, and clicking it seems like work. ("Yes boss, I did do a lot of work today. I ensured that nobody can steal our intellectual property by disabling the cameras on all the blackberries!" "Great work!")

</comment></comment><comment><USER10> I have a Palm Pre.. I got one early on, was a huge fan, but now I fully believe the platform is dead. All you ever hear about is iPhone or Android. That aside, the Palm experience totally sucks. It would be amazing if the phone didn't freeze on me while trying to view a webpage and listen to an MP3 at the same time. No, that's asking too much

<comment><USER11> I have a Pre plus, uptime is in weeks (out of updates, I had to reboot it only once in 6 months), and the interface is really far ahead for multitasking, and I multitask a lot with it; mp3 + web + contacts + an app or two all the time, and it rarely hiccup if ever.

<comment><USER12> Umm, don't mean to burst your bubble but the iPhone could do all that from day 1, sans "multitaskin"g. Is this word now becoming as meaningless as "bricked"?

<comment><USER11> Wow, apple fanboi? I was talking of the fact that my Pre plus is fine, not commenting on what other platforms do or don't.

That, and I despise Apple Walled Garden anyway so the qualities of the iPhone are moot. And iOS 4 multitasking sucks, ergonomically. They messed up, even multitasking on jailbreaked iPhones 3.x was better, though far from as neat as the WebOS version.

</comment></comment></comment></comment><comment><USER13> _The idea is to link windows by task, rather than by the application that runs them._

To me, this is a profound idea. It's the same thing that "Code Bubbles" does for developers.

<http://www.cs.brown.edu/people/acb/codebubbles_site.htm>

</comment><comment><USER14> Great OS, but it came to market too late. Not to mention WebOS was half broken when it was released. It STILL does not have voice recording capabilities, which eliminates a ton of app-potential. I love it...but it is too little, too late, Palm.

<comment><USER15> I don't think it came to the market too late. It had a lot of potential to be a solid #3 competitor in the mobile space behind Android and iPhone. I think their main problem was their crappy hardware they put the OS on.

<comment><USER16> I'd say it came to the market too late _to not have huge marketing behind it_. I bet we'll see Windows Phone 7 which is far later do much better (at least in terms of market share/units shipped). Yeah, crappy hardware hurt badly, too.

<comment><USER17> But it did have tremendous marketing behind it. I saw those very creepy Palm commercials all over the place. Hell we had a huge Palm banner hanging in Downtown Denver for like 6 months.

I think Palm suffered from a serious issue with brand identity. It just seemed like people weren't sure what those phones were supposed to be exactly. Were they blackberry competitors? After all, they had a really crappy keyboard. iPhone competitors? The form factor would suggest otherwise.

<comment><USER16> True, good point. I amend my earlier statement to be "huge _good_ marketing".

Also, I assume that Windows phones will be on (nearly) all carriers, whereas Palm was (and is?) stuck on Sprint in the US. That's worked out OK — though we'll never know how much better it could have possibly gone — for Apple, but for various reasons, including lateness to market with a broadly desirable smartphone, I don't think that's been as feasible for Palm.

<comment><USER18> Palm's on Verizon and AT&T now, as well as a bunch of other carriers outside the US.

</comment></comment></comment></comment></comment></comment><comment><USER19> Looks like they reinvented HyperCard for 2010. I love it.</comment>


What are your biggest pain points with productivity tools today? - <AUTHOR> I personally hate the fragmentation of data, notes, tasks, and events across my calendars, to do lists, email, pen/paper, computer, etc. I also believe in the notion that your brain should primarily be used for thinking, and not storage.
What would an ideal productivity or personal management app look like?
Esp features that promote task completion and continuous improvement. <comment><USER2> As a business analyst I have two pain points:

1\. Lack of a data dictionary

2\. Lack of a good sql editor that can easily connect to different cloud and is highly customizable.

<comment><AUTHOR> can you give an example how the UX should be for a data dictionary?</comment></comment>


The Linux Kernel, CDDL and Related Issues - <AUTHOR> https://softwarefreedom.org/resources/2016/linux-kernel-cddl.html <comment><USER3>
        anything that has knowledge of and plays with fundamental internal
        Linux behaviour is clearly a derived work. If you need to muck around
        with core code, you're derived, no question about it.

In 100+ places, the zfsonlinux/zfs.git master branch has to change its compile-time behavior depending on the details of the kernel it is being compiled for. i.e., out of 100+ yes-no questions, you only get a working zfs.ko if you answer each one in the same way the kernel does. To me, this indicates a strong likelyhood that zfs is way towards the "muck[s] around with core code" end of the spectrum.

(The 100+ places I cite are actually a count of 121 uses of the macro ZFS_LINUX_TRY_COMPILE while configuring zfs at zfs-0.6.5-166-gd2f3e29; each one presumably corresponds to one or more #ifdef sites in the actual source code of zfs, each one adapting to a change in the internal details of Linux from 2.6.x to the present day)

<comment><USER4> Compiling against headers is a fairly standard autotools technique for writing portable software. It avoids the mess of doing an `#ifdef` on the kernel version, which allows people to build against arbitrary git commits to Linus' tree and also kernels where things where API changes were backported. In either case, you can have different kernel headers than what your kernel version suggests.

That being said, the actual number of kernel header API checks is 63. The duplicate use of ZFS_LINUX_TRY_COMPILE occurs when the code explicitly checks each version of an interface used in different kernel versions. It is basically an if-else chain. If one does not match, another is checked. Ideally, we should explicitly check each version (rather than assuming that on failure, an older API is in use), but not all checks do that yet.

We could reduce them to 0 if we just went by kernel version, which is what just about everyone else does, but it is not as good. That being said, this inspired me to think of a way to reduce all 63 checks to 1 check based on the kernel version unless something turns out to be wrong. I put the idea into the issue tracker:

[https://github.com/zfsonlinux/zfs/issues/4375](https://github.com/zfsonlinux/zfs/issues/4375)

<comment><USER3> "Compiling against headers is a fairly standard autotools technique for writing portable software"

I agree entirely. But are you arguing that, in general when a program Z links to a library L to run, it is not important for the license of Z and the license of L to both permit it? A conclusion like this eviscerates all Copyleft licenses, so I am loathe to accept it.

I have harped on the close relationship between the organization of zfsonlinux's zfs.git and the linux kernel in multiple threads, because the core claim coming from Canonical is that the code in zfs.git is somehow essentially independent of the linux kernel. They do not articulate what this means or how we can determine whether it's the case in general. So far no definition I've considered seems to paint zfsonlinux in the same light that canonical have claimed.

</comment></comment></comment><comment><USER5> _The kernel is built with APIs for the attachment of modules---which in a user space program might be called "plug-ins"\---which can be statically linked with the kernel or dynamically loaded into kernel space by a running kernel. As with any such interface in a GPLv2 program running outside kernel space, we can assume that within kernel space the overwhelming preponderance of such modules or plug-ins can be assumed to fall within the scope of the copyleft on the kernel._

I don't think I'm understanding this passage correctly. Or if I am understanding it correctly, I'm not sure I see the logic. How is this passage intended to be interpreted?

I think it's saying that if a user space program has an API that allows plugins to be written, the plugins should be considered derivative works of the main program. Thus if the main program is distributed under a standard copyright, any 3rd-party plugin is copyright infringing in the absence of specific licensing to allow it.

Is this true? If anyone would know it would be Eben, but this seems at odds with the purpose of such an API. On the other hand, "As with any such interface ... we can assume ... that the overwhelming preponderance ... can be assumed to fall within the scope of the copyleft" doesn't sound like the sort of precise legal prose Eben normally writes.

</comment><comment><USER6> From Eben Moglen's wikipedia page:

 _Moglen is closely involved with the Free Software Foundation, serving as general counsel since 1994 and board member from 2000 to 2007. As counsel, Moglen was charged with enforcing the GNU General Public License (GPL) on behalf of the FSF,[4] and later became heavily involved with drafting version 3 of the GPL._

I'm comfortable calling him the leading legal scholar of the GPL.

</comment><comment><USER7> Is SFLC Shooting Open Source in the Foot? [http://info9.net/wiki/tmarble/posts/is-slfc-shooting-open- so...](http://info9.net/wiki/tmarble/posts/is-slfc-shooting-open-source-in- the-foot/)

</comment><comment><USER8> How is the situation with OpenZFS and Linux any different from Minecraft Server and Bukkit? It seems that the act of distributing a combined work is what causes problems, in that Spigot or zfs.ko binaries cannot be shared but one can freely build those things by oneself. No one's DMCAed BuildTools, for instance, even though CraftBukkit and Spigot binaries have been (and probably should be).

</comment><comment><USER9> Here's what I don't understand: Since this apparently has been an issue for quite some time for highly visible projects like OpenSolaris and ZFS - <USER2> hasn't this been accounted for in a new version of GPL? More specifically, why hasn't Torwalds spawned a Linux license he's fully on board with?

<comment><USER10> > why hasn't Torwalds spawned a Linux license he's fully on board with?

Changing a licence in an open source project can be difficult. Unless you've specifically had all contributors sign away their ownership of their contribution, then you can't change the licence without their permission, as they've only given permission for their contribution to be used under the current licence. When you have 1000s of contributors, the problem swiftly becomes impractical to solve.

I'm not aware of whether the linux kernel asks contributors to give up their rights in such a way, or otherwise has some provision for changing the licence terms.

<comment><USER9> I can see that. Here's why I think it could work nonetheless:

(1) Torwalds is one of the people able to drum up the OSS community. If people hated him so much as to not follow him on a technical detail, they'd develop for BSD rather than Linux.

(2) the reason GPLv3 has mostly failed seems to be mostly due to the controversial nature of the changes while the change for more compatibility with another free license seems straightforward

<comment><USER11> Torvald's has said in the past he won't ever change the license of Linux.

The GPL normally has a clause that says the source code has to be licensed under "this license or a newer version of the GPL". Projects that have moved from GPLv2 to GPLv3 did so because of this clause in the license. Torvalds specifically removed this clause.

I doubt Torvalds is concerned about whether or not users can use ZFS. He's defended the existence of closed source kernel modules (ex graphics drivers, network drivers). There's even the quote in the article that Torvald's didn't consider Andrew File System derivative of the kernel. Further, users can use ZFS-FUSE; there's no question that ZFS-FUSE doesn't infringe. Finally, Oracle owns sole copyright to ZFS; they can re-licence it.

Linux will never move from GPLv2 and I'd be really surprised if Torvalds saw the ZFS issue as a problem with the GPLv2 and not an Oracle problem.

<comment><USER9> Thanks, good answer. Is Torvalds legally correct with his defence of non-GPL kernel modules? I mean his position makes total sense to me technically, I just find it a bit strange that he wouldn't push for an OSS license that unambiguously allows for such kernel modules, s.t. everyone could shut up about this issue. I also understand though if his position is that it's just not a problem that needs to be solved (since he doesn't think that contributors would end up suing distributors about this issue).

</comment></comment></comment></comment></comment><comment><USER12> asking to make sure that i somewhat understand. The point is that licenses can allow for literal readings or equity readings, ie. the spirit of the law. On its face, debian is fine as it makes it easy to set up zfs but is separately distributing two binaries. Canonical is distributing one binary with the zfs linked inside of the kernel, which a literal reading can allow. However the equity reading disallows as although all source code can be released, it must be under gplv2. Therefore, we are in a holding pattern to see whether stakeholders will take the literal or equity reading of the license and will proceed accordingly?

</comment><comment><USER13> "The Linux Kernel" is a tautological pleonasm. "Free gift" "New Beginner" "true fact". Linux is a kernel. Everything else, is not Linux.</comment>


Ask HN: Simple exercises for a python beginner? - <AUTHOR> I've been helping a complete beginner to learn the basics of python.  He's got a basic understanding of loops, conditionals, and input and print statements, plus a few functions, and knows how to use a text editor to write code. He really wants some simple programming exercises he can do to help him consolidate his knowledge.  I've given him a few exercises I made up, but we are looking for more.  Is there a good resource for this ( not project Euler! ), or do people here have any ideas? <comment><USER2> Try out my free book:

<http://learnpythonthehardway.org/>

It's 1/2 done, but the first half is a really good start for someone totally new to programming and the language.

Also, submit tickets if your friend runs into trouble spots so I can clear them up.

<comment><AUTHOR> Thanks. I've just gone through it. It looks like a great way to cover a lot the basic texture of things that most programming books ignore. I'm recommending it to him. I will be interested to see how you deal with the more complex topics.

<comment><USER3> There is something pretty similar... You might want to lookup on euler problems in python.. <http://pyeuler.wikidot.com/> really cool stuff....

</comment></comment></comment><comment><USER4> Implement (without looking) or re-implement (after looking) the examples and exercises from the following or similar books; the book's language doesn't matter:

The C Programming Language, <http://en.wikipedia.org/wiki/The_C_Programming_Language>

The Elements of Programming Style, [http://en.wikipedia.org/wiki/The_Elements_of_Programming_Sty...](http://en.wikipedia.org/wiki/The_Elements_of_Programming_Style)

Writing Efficient Programs, <http://en.wikipedia.org/wiki/Jon_Bentley>

Programming Pearls, <http://netlib.bell-labs.com/cm/cs/pearls/>

The UNIX Programming Environment, [http://en.wikipedia.org/wiki/The_UNIX_Programming_Environmen...](http://en.wikipedia.org/wiki/The_UNIX_Programming_Environment)

And, er, Learning Python, <http://en.wikipedia.org/wiki/Learning_Python>

<comment><USER5> C and Unix as a prerequisite for Python? I don't think so. Python is much higher level and has richer features.

I think he is better of learning from more pythonic sources, and learning programming in general.

<comment><USER4> No. Not to learn C. These books, and others like it (for C and any other language (including Python)) have exercises.

The guy was looking for exercises.

You can implement the exercises in whatever language you're learning. Python, for example.

</comment></comment></comment><comment><USER6> I think Codingbat is a good place to begin/start with python, and it's also good for exercises. As they have an online interpreter, you get a definitive yes/no answer, with elaboration where things go wrong. <http://codingbat.com/python>

<comment><USER7> Their interpreter seems to be broken. eg. for <http://codingbat.com/prob/p126968> the following solution seems ok:

        def centered_average(nums):
            sum(nums[1:-1]) // (len(nums) - 2)

but gives me an error: 'sum is not defined'.

Also, all of their examples use two spaces, not four (the python standard)

</comment></comment><comment><USER8> Google python class starts with really easy stuff, and it's pretty well written. <http://code.google.com/edu/languages/google-python-class/>

</comment><comment><USER9> There's an MIT OpenCourseWare class (6.00) that is an introduction to Python and computer science. If your friend wants to do the problems in that course, there are people working through it together on Curious Reef (disclaimer, it's my website): [http://curiousreef.com/class/mit- opencourseware-600-introduc...](http://curiousreef.com/class/mit- opencourseware-600-introduction/2010/jan/)

You can post your work, view others' work, leave comments, and ask questions. 29 people have done at least the first lesson so far. It's one of the most active classes on the site.

</comment><comment><USER7> Depending on your friend and how he learns, he might find that solving real problems consolidates his knowledge faster than more exercises. Pick a library that does something that he's interested in, and which gives some immediate feedback, and let him at it. Pygame, pyglet and django spring to mind, or some sort of web scraper or GUI automater (eg. pywinauto) to interface with the real world. <http://openbookproject.net/py4fun/> also has some simple (ish), but relatively real world problems.

</comment><comment><USER10> Thanks everyone that is posting information. I am the person that my friend Robin is currently helping with. I was fine up to the for - statement and on.I will be graduating from High School next year and am going for my degree in the computer programming field. Any recommendations please email me at firstname.lastname@example.com or give Robin a email at firstname.lastname@example.com

</comment><comment><USER11> One of our primary tasks as engineers is integrating other libraries. I'd suggest picking a task like mysql integration, reading json (<http://undefined.org/python/#simplejson> maybe? I'm java not python) or whatever. This teaches a key concept : code modularity.

</comment><comment><USER12> Old, but still good:

<http://www.pythonchallenge.com/>

<comment><USER13> If I could up vote this comment again, I would. The Python Challenge helped me tremendously by providing enough bite sized "projects" to learn the innards and idioms of the language.

</comment></comment><comment><USER14> <http://inventwithpython.com/></comment>