Hacker Newsnew | past | comments | ask | show | jobs | submit | ArikBe's commentslogin

I think this depends on the student. I do not have a CS degree. I dabbled in Python, but the first programming course that I took was Harvard's CS50 MOOC. I really appreciated learning C because it taught me about the underlying system through concepts like memory management. I agree that Python is friendlier, but I feel like C trains a particular mindset. Python may be more suitable for those who want to get off the ground quickly.


The thing about languages like C is that they will teach students to do many things by rote that they aren’t equipped to understand until later. I’m talking about things like includes, using a compiler, << and other facets of basic I/O, defining a main function.

Python allows students to hit the ground running much faster. Once they learn the very basics, then it can make sense to introduce something like C, but not require them to temporarily ignore magic incantations with the promise they’ll understand them later.


When teaching new students Java, the first step is "type these exact lines character for character, you won't understand what they mean for the next year, but you need to type them at the start of every new program.", which can be a little rough.


that's a fault with the teaching method, not the language.


You have to create a class with main method, just to start. And you need to know, what are access specifiers, what are classes and static methods. Of course, you can just ignore them as something you just have to do, but I think buy design OOP is not an additional requirement but starting point in Java.

But, it is not like you have to use them, in that case why start with a complex language as a beginner anyway? It will either be too much of details or too much of magic to remember.

(Digression : in my beginner days I was using C as a glorified assembly language with control flow redirection only through, (wait for it) goto. Even after grew up to 700 lines. Only while doing a java port I got used to using methods because java does not have goto)


Not anymore! With Java 11 you can (finally) have top level code immediately execute as if it was run in main method. Only took 25 years.


Well, I am not sure about Java 11. It took 25 years, yes and organization I work has just entered the java 8 world completely. It was originally written in Java 7 and it took 5 long years to completely transition to Java 8. Even then (Java got a repl now!!!), I am skeptical of the language in terms of beginner friendliness.

So, if you are going to read some code from the world you should be familiar with the archaic notations anyway. Even in frameworks, which java shops in neighborhood is mostly about, has intro docs with terms from almost 15 years ago and assumes people who read are aware of it. The thing that really bothers me (not that it is bad in an objective way) is how much old java platform has OOP encoded to its DNA. And it is great at it.

It is a language meant to be used by people who are familiar with writing such code. The FP is really enjoyable, but kind of ugly and seems retrofitted into the OOP. In general, I like opinionated crisp languages, but Java is getting away from that. In nutshell, it is disorienting for me now a days.


no it's not. The language _requires_ those incantations, but to explain it all to a beginner requires a lot of time and effort which, to the student, doesn't look like any payoff (until they have internalized it completely, and understands their meaning).

It's the same as human learning natural languages - you have specific grammar and rules you _just_ follow, without understanding their etymology or how it evolved to be this way (and their uses).


And python requires its own boilerplate incantation. One is neither considerably less verbose than the other, nor any less cryptic. Both take exactly two lines. The python incantation simply "feels" simpler to you, because you as a seasoned programmer comprehend the 'intent' behind it as being simpler. But this is more likely to relate to our inability to perceive from a point of ignorance that which we already understand.

A good lesson could start by explaining what these do by way of dissection and for the purpose of orientation, without going down the rabbit hole.


This resonates with me. When I was an undergrad about 25 years ago most intro to programming classes were taught in C. There were a lot of concepts I struggled with at the time that now I find trivial. In retrospect, what I was really struggling with was some of the lower level gnarly bits C exposes to the programmer.

While it's good that I know how those things work, I did not need to understand them to just get a basic understanding of strings, data structures, etc. For instance it wasn't that I couldn't grok linked lists, I couldn't grok pointer manipulation at the time. But that still meant my code didn't work.


it's really a big-endian vs little-endian matter, if you think about it.

Starting with C means sitting down, thinking hard and taking the time to understand how the basic model of a computer works, along with all the issues and annoiances that come with it.

Starting with python really means leaving out the details and just getting into programming and maybe one day you'll wonder ow stuff actually work underneat.


I TA'd an introductory computer architecture course (basically, start with a MOSFET transistor and end up with "here's how you write malloc/free"), which was students' first introduction to both assembly and C. That experience helps solidify that you really want to students' first experience with programming to be a high-level language.

One of the problems with teaching is a phase-ordering problem: what order do you teach the concepts in? As GP notes, C starts you off with a lot of boilerplate that isn't going to become relevant until a month or two down the line. Concepts like functions, libraries, the insanity that is the C preprocessor are distractions when your first challenge is just getting people to understand the mental model of how a procedural program works (i.e., understanding what x = 5 really means!). On top of that, C imposes a mental burden of understanding the stack versus the heap and the relevant memory management concerns. And then you get into C's string handling...

I suspect many of the people commenting here are in the class of people for whom programming was obvious and easy, and never struggled with any of the concepts. This class of people will do fine with any language being used to introduce the concepts, because they're not really learning the concepts. Where the language matters most is for those for whom programming is not obvious, and they need help identifying which parts of the material is more fundamental than others. Giving these people a language that is more forgiving of mistakes is going to go a longer way to democratizing CS education than insisting people start by learning how computers really work.

That isn't to say that this isn't something that should be taught pretty early on: far from it, I think a computer architecture class should be the second or third class you take on the topic. Delaying the introduction of C until computer architecture means that you can use C as a vehicle to introduce all the other parts about computers that are important, such as 2's complement arithmetic, ASCII, what the stack and heap are, etc.


>Starting with C means sitting down, thinking hard and taking the time to understand how the basic model of a computer works, along with all the issues and annoiances that come with it.

Then perhaps ASM would be an even better starting point?


Personally, I dislike all the 're-learning' process. However, by 'Python', I had to re-learn quite a few concepts when I touched C ground. Of course, it was a 'A-Ha' moment to put in positive way.


You might say it really "took you on"!


Puts/gets negates the need for includes and >> isn’t in C.

Also Python has a horrific main method syntax and duck typing is ultra confusing early on.


Ifmain style main can be omitted for beginners (no syntax for main). Duck typing can be explained easily : we need something that has a food method.


In C, you learn to modify a letter to upper or lower case, by finding its ascii number, and adding to it, or subtracting from it, a magic number.

In Python, you just use the .lower() or .upper() function.

One and done. Move onto your next problem.

In C, you hope to not trigger an array-index-out-of-bounds error, resulting in a segmentation fault. Then, not understanding what you did wrong, and then having to fire up the debugger to find your needle in the haystack.

Hours later, you’re just like, I just want to modify a string. Why is it so difficult?


This is a silly argument. You have to do the exact same thing in python if you don't want to use a standard method/function. There's nothing stopping you from using a standard function in c either.

Your rant should be about bad teaching of bad habits instead


What I’m trying to point out, is that C has a lot of compromised and poor design decisions made, as a programming language.

Maybe it was because it was designed in the 1970s, when computers were more primitive. But better alternative languages were designed back then that didn’t have the failings of C.

But these designs permeates throughout the language. So eventually errors keep coming up.


Totally agree you need to learn C before getting too far, but it can make intro programming more challenging than it needs to be. Since this is supposed to be an ML-targeted curriculum it seems like Python is a better start. However, as I said, it’s an eternal debate. At least we have choices!


you learn Python to get the basics: what are variables, what are values, what is control flow, what are functions, what are modules, how does it fit together as code to perform tasks. Worrying about the memory and the underlying machine can come later. The biggest problem with Python as a beginning CS course is that it´s not a great language to learn about types (meaning it's more difficult to learn the cluster of related concepts expression, value, type, variable).


I guess I have different thoughts about what the basics are. I would advocate to start with assembly, but I’m biased because I started with assembly. Things like what is memory? What is a register? What is the Program Counter? What (really) is the call stack and how does it work in memory? Fetch-decode-execute? Jumps, conditional branches, loops. Address modes.

If you know these things, then you know how the computer actually works, and a lot of the mystery of C is behind you already.

Then you can start introducing stuff that’s built on top of it all like types, if statements, pointers... build the building from foundation up, don’t start on the second floor and tell the student not to go downstairs yet.


That's not a good way to teach someone to code and there's a reason why absolutely no curriculum on the planet does it that way. If you're teaching someone how to operate a car you start by showing them which pedal is the gas and which is the brake, not by explaining to them how a differential works. The pedagogical basics and the lowest level system primitives are not the same thing.


Bottom up vs top down. A lot of people benefit from a top down approach, especially those who haven't already decided they want to heavily invest in the subject.


From https://www.atlasobscura.com/articles/trousers-pants-roman-h...

Like with GPS and the internet, innovations from the military sector slowly spread to civil society. By 397, trousers, in all their odiousness, were becoming so common that brother-emperors Honorius and Arcadius (of the Western and Eastern empires, respectively) issued an official trouser ban. The ban is cited in a code named for their father, Theodosianus, which read: “Within the venerable City no person should be allowed to appropriate to himself the use of boots or trousers. But if any man should attempt to contravene this sanction, We command that in accordance with the sentence of the Illustrious Prefect, the offender shall be stripped of all his resources and delivered into perpetual exile.”

“What the ban basically does is that it bans civilians from wearing a military outfit in the capital,” says Elm, “so one could see it as an indirect way to make it easy to distinguish civilians from military men at a time where tension was high.” Four years prior, Emperor Valens had been killed in battle within Roman borders, and a third of the army had been wiped out. So banning trousers could have been a way to make sure that the capital was easier to police, and that fighters were kept out.

The ban could also be read as the desperate attempt of late-period emperors to cling to a sense of Roman identity at a time where the empire had become a melting pot of traditions, after hundreds of years of expansion and cultural appropriation. Long hair and flashy jewels soon joined boots and pants as forbidden fashion.

“Barbarian influence on fashion was something that emperors wanted to control, but then their own bodyguards, which presumably they trusted, were barbarians,” says Elm. “So rather than anti-barbarian, they were mostly anti-barbarian-identity.” Restoring concepts such as “purity” and “identity” is not uncommon in fading empires—authoritarian ways to make rulers feel in control at home in the face of external weakness.


> “So rather than anti-barbarian, they were mostly anti-barbarian-identity.”

Indeed. The Roman empire was not really "anti-barbarian" (except in its final throes): the Roman Emperorl considered himself to be the ruler of the whole world and all people in it, so the "us vs them" mentality was weaker than we may think. For instance, whenever Rome conquered some province, it usually granted citizenship to the local ruling class, so as to foster assimilation. Also, for a really long time barbarians were accepted at the "frontier" (limes) and sent to provinces that needed manpower, or to the army (which allowed them to become citizens, once discharged). Things only started to get out of hand after the battle of Adrianopolis (378), when the limes became unguarded and basically all Goths, displaced by the Huns, swarmed across the empire.


Conquering people and telling them they are now your subjects is anti those people.


Yes of course it's not ethical or good. But lou1306's point is that the Romans didn't think the barbarians were bad, but rather saw that the barbarians had some good stuff (land, fighting ability) and wanted to take that stuff for their own. That is, the Romans weren't motivated by hate or the desire to destroy, but by greed and desire for power.


Agree. Another issue, when discussing this topic, is that Romans are believed to have adopted the Greek culture after the conquest of Greece. This is indeed mostly true, but not when it comes to the attitude towards foreigners, which could not be more dissimilar.

Greek culture was much more insular. Greek poleis really considered themselves to be superior to anyone who did not speak their language (which is what "barbarian" actually means). And, while they did invest in colonies, they were never really interested in conquering territories where other cultures were already present. Needless to say, this kind of attitude does not lead to burgeoning territorial acquisition.

Romans were much more aggressive and warmongering, but they also showed some degree of acceptance of the cultures they assimilated. They allowed provinces to keep some of their pre-existing laws. They were fine with people worshipping their non-Roman gods, as long as they also recognized the divinity of the emperor. And, as I said, they routinely employed barbarians at all levels of their society (not just for slavery, as it is sometimes assumed).


By today's standards, it is. However, we should not use today's worldview to judge another era's way of thinking. Also, a citizen was not just a "subject". A citizen from a conquered province could rather easily become senator [1], and some even became emperors (e.g., Septimius Severus was born in Leptis Magna, in modern-day Lybia, from a Punic family). Also:

> "they are now your subjects"

Nope, they were always the subjects of the emperor. That's the point of calling yourself an emperor. And it's not limited to Rome: the Persian and Chinese emperors also claimed their power to be universal.

[1] That was also true in Republican era. There's even a running joke in the Asterix comics series, where the chief of the Gallic village recurringly says that Caesar offered him a seat in the Senate if he surrendered.


The whole point of my comment is that it isn't just up to the emperor, claiming your power is universal has always been a douchebag move. Claiming much power at all for that matter.


For those looking for the rest of the series, it's here: https://www.mathventurepartners.com/blog?offset=157373689900...

This looks like a series on how to build a relatively straightforward operating model with a focus on cash balance and "founder value" (I guess that's attributable equity to the founder)

If you're interested in valuation, it's worth checking out Prof. Damodaran's work or an online resource such as Macabacus modeling guide: https://macabacus.com/operating-model/introduction


MultipleExpansion.com is another good (and free) modeling resource.

Damodaran is good for understanding valuation - not necessarily financial modeling.


Thanks! I did not know about MultipleExpansion.

And yes you are right that Damodaran - although the spreadsheets on his site can be useful as well.


Out of personal curiosity, what supplement brand do you take? I live in Ams as well and the season is...horrible.


I take GAL D3 or D-complex+K2 Forte (https://www.gal.hu/en/spd/VIGAD303001/GAL-D3-vitamin and https://www.gal.hu/en/spd/VIGAKKF02001/GAL-K-complex-Forte). They are quite transparent on how they source and extract the ingredients.


Currently I take the one from physalis: https://www.hollandandbarrett.nl/shop/product/physalis-vitam...

You can probably play around with the brands and doses a little. I think the important thing is to take gel capsules with oil inside and not solid pills. Vitamin D is fat-soluble so I think solid pills don't get absorbed very well.


This imgur album provides a good overview of the kinds of interactions that occurred before the shutdown:

http://imgur.com/gallery/VhlAW

From what I understand the bot started interacting with /pol/ (4chan) - and I guess - /b/ as well.


China holds US debt treasuries.

China sells US debt treasuries in exchange for dollars.

China sells the dollars it raised to buy Yuan.

Demand for the Yuan increases, hence the Yuan becomes more valuable, hence its exchange rate vis-a-vis the dollar appreciates (it will also appreciate vis-a-vis other currencies).

Dollars are being dumped into the market, so the dollar should decrease in value.

A more valuable Yuan means that China's currency is more expensive, hence its exports become more expensive (and drop) and its imports become cheaper (and rise).

Other people now own US debt, for which they will receive interest payments and a repayment when the debt is due.


In terms of supply and demand what you say makes sense, but:

> China sells the dollars it raised to buy Yuan.

The Yuan is a highly controlled currency that does not behave like other normal free market, floating currencies.

The Chinese government sets the exchange rate as was shown just weeks ago when they devalued the Yuan and Trump call that move the start of a China/USA currency war.

> Demand for the Yuan increases, hence the Yuan becomes more valuable

If the Yuan was free floating that might be true, but even then, since China is a net exporting nation they want a low Yuan, so that their exports are cheaper and their imports are more expensive. So why would they want to drive up the Yuan?

I'm really not sure what is going on but everything they are doing (i.e. selling US bonds) goes against what one would expect.

The only thing I can think of, because of the turmoil in China (i.e. the share market shock, property bubbles etc) they are a bit short of cash and rather than print money (which would causes inflation) they are raising money by selling some of their US bonds.


China cannot just set the exchange rate arbitrarily, well, without creating huge artificial imbalances that even they can't get away with. Instead, they make their peg real by buying/selling RMB and dollars. So if china wants to prevent the RMB from tanking (and believe me, they do) they need to buy satisfy the demand for dollars bought buy exchanging RMB, just like they buy dollars to provide dollars. China bought treasuries in the first place to park USD from trade surpluses somewhere that wouldn't cause their currency to appreciate, and now they are selling that to prevent depreciation. Balance must be maintained, one way or the other.


If the Yuan was free floating that might be true, but even then, since China is a net exporting nation they want a low Yuan, so that their exports are cheaper and their imports are more expensive. So why would they want to drive up the Yuan?

What they want is a very slowly appreciating Yuan. This shows that the economy is growing, and it gives China more buying power overseas, but it keeps imports affordable. This is what has happened over the past 10 years, since the government allowed the exchange rate to float. (see https://www.google.com/finance?q=CURRENCY%3ACNY&ei=bD_fVZnNN...).

The issue is that over the past month, the Yuan has actually started to DECREASE in value against the dollar, which is a sign that the economy is slowing. That's scaring the crap out of China investors, who have baked in a very high growth rate into their pricing. That's what's driving the government to put their rate control machine into reverse -- instead of trying to keep the rate from growing too fast (to favor exports), they are doing what they can to keep the rate from falling any further.


>The Yuan is a highly controlled currency that does not behave like other normal free market, floating currencies.

They "control" it by using free market tools: buying and selling yuan in the open market.


More like, there is capital flight from China because there are economic problems and yuan devaluation is anticipated.

When people liquidate yuan assets and buy overseas assets, they sell yuan to the central bank, buy foreign currency.

In order to buy the yuan, China's central bank needs to supply foreign currency. To acquire the foreign currency, they sell foreign assets, e.g. Treasurys.

It's not so much they are trying to push the yuan up, as trying to prevent it from falling too precipitously as people sell it.

They are accommodating the capital flight by supplying foreign assets, instead of letting the yuan fall sufficiently sharply to the point that would stop capital flight, because investors would no longer expect further depreciation.


in a nutshell, as hopefully others have explained better...

before

- yuan is undervalued relative to market-clearing price

- central banks sells yuan to prevent it from rising too quickly

- selling yuan, it acquires dollars in exchange

- it builds currency reserves, invests in Treasuries

now

- yuan is overvalued relative to market-clearing price

- central bank buys yuan to prevent it from falling too quickly

- buying yuan, it needs to offer dollars in exchange

- it sells Treasurys for dollars, sells off currency reserves


Jennifer Sheehy-Skeffington and Johannes Haushoffer wrote at length about the behavioral economics of poverty:

http://static.squarespace.com/static/52522308e4b0bcf2bc4dab4...

The whole PDF is in fact dedicated to outlining strategies for the reduction of poverty.

The study quoted in the article about scarcity and cognitive performance by Mani et al can be found here:

http://psych.princeton.edu/~psych/psychology/research/shafir...

I used it as the main document guiding my Msc. thesis research into poverty, cognitive function, and healthy meal choice.


This is your MSc. thesis that you are referring to? For anyone else interested:

http://thesis.eur.nl/pub/30170/MA-Thesis_Arik_Beremzon_41620...


In the press conference shortly after the flyby, one of the staff (I can't remember her name) said that the speed depends on the position of the probe relative to the ground antenna. So not only is transmission not 24 hrs, but when the probe appears to be on the horizon, transmission speeds are slower.


Lately I've been checking out the real time reporting page for the DSN (http://eyes.nasa.gov/dsn/dsn.html), and frequently one of the three big dishes at Goldstone, Arizona, USA, Madrid, or Canberra is allocated to a satellite, but is not right then doing any communicating, presumably because it's waiting for the earth to turn enough to get line of sight.

Right now New Horizons is downloading at 2.11 kbs to Canberra, the max with both amplifiers transmitting with opposite circular polarizations. For a bit of comparison, Rosetta is talking to Goldstone right now at 104.86 kbs, with a received power 3 orders of magnitude stronger. And Voyager 2, which doesn't have much to say, is still plugging away with a smaller Canberra antenna at 159 b/s, and a received power about that of New Horizons.


In a previous submission on YC (https://news.ycombinator.com/item?id=9836651) some commenters were weary of an article that wasn't published in a journal. This one has been published in "Research in Endoctrinology"[1]

[1] http://www.ibimapublishing.com/journals/ENDO/2014/459119/a45...


The banlieues are the suburbs (of Paris). The word has become terminology which is used in international media. It's valid English: http://en.wikipedia.org/wiki/Banlieue

The BAC are the "Brigade anti-criminalité", that term is more obscure. Basically a special unit of the police. http://fr.wikipedia.org/wiki/Brigade_anti-criminalit%C3%A9


In fact, we «banlieusards» from Paris have a tendency to consider ourselves as «THE» banlieue. The most emblematic one. But most big cities have one of their own. Marseilles, Lyon and Lille have theirs.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: