June 24, 2013 Re: OT: CS education gone wrong (Was: Re: TDD is BS?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Monday, 24 June 2013 at 02:39:30 UTC, Andrei Alexandrescu wrote:
> On 6/23/13 11:51 AM, Adam D. Ruppe wrote:
>> I think it is just an accident of history that mod_php ever got used.
>> Classic cgi implementations were still slow enough (especially with an
>> interpreted language) that people wanted to try something else, but the
>> other world of options hadn't taken root yet either (I think mod_php
>> even slightly predates fastcgi's introduction), and continues to exist
>> just out of inertia.
>
> OK so what's the way to go now? One process per request? Seems heavy to me seeing as most requests last very little.
>
> Andrei
One process/thread per CPU core + async I/O.
FastCGI as simple alternative (it is similar to CGI but does not respawn process after processing request).
|
June 24, 2013 Re: OT: CS education gone wrong (Was: Re: TDD is BS?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Monday, 24 June 2013 at 09:07:54 UTC, Dicebot wrote:
> Actually, server software with most impressive performance I have seen so far was implemented as single barebone process with all network stack and event library embedded. Slightly similar idea was propsoed here - http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.html (found via reddit)
BTW, this article is full of bullshit and hand wavy stuff. I wanted to write a article destroying it, but I then decided that I had other thing to do than loose my time :D
|
June 24, 2013 Re: OT: CS education gone wrong (Was: Re: TDD is BS?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On Monday, 24 June 2013 at 09:22:58 UTC, deadalnix wrote:
> BTW, this article is full of bullshit and hand wavy stuff. I wanted to write a article destroying it, but I then decided that I had other thing to do than loose my time :D
Yeah, it has plenty of bullshit but core idea is the same as one in project I have been engaged in and I can't write article about latter because of NDA, so using this an alternative available in the internet ;)
|
June 24, 2013 Re: OT: CS education gone wrong (Was: Re: TDD is BS?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Monday, 24 June 2013 at 02:39:30 UTC, Andrei Alexandrescu wrote:
> so what's the way to go now? One process per request? Seems heavy to me seeing as most requests last very little.
Performance wise, I've found heard very good things about async i/o (like vibe.d) and had very good experience with a process pool (on linux anyway, cgi.d's fastcgi and new embedded_httpd_processes do this, the latter hitting 6,000 requests per second for hello world on my machine!). The process pool forks ahead of time, then they take connections as they become available. Basically it puts the concurrency in the kernel's hands, which does a good job.
The zip I linked to yesterday does a simple one thread per connection, multiple requests per connection model. Doesn't scale very well, but works well and with simplicity on light loads.
|
June 26, 2013 Re: TDD is BS? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Fri, 21 Jun 2013 16:03:57 -0700 "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote: > On Fri, Jun 21, 2013 at 06:12:57PM -0400, Nick Sabalausky wrote: > > - Many of the professors are terrible programmers themselves. For > > example, I had one who openly admitted the only language he knew > > was C, and yet at one point it became painfully obvious that he had > > almost no comprehension of null-terminated strings. > > That's the beef I have with over-emphasis on CS theory. There's nothing wrong with theory in and of itself -- in fact it's foundational and very much indispensible -- but when you become so detached from reality that you think in terms of pure idealizations -- when you can *only* think in terms of pure idealizations -- that you can't even write a single line of real code without some external help, then something has clearly gone very, very wrong. > Yea. I'm convinced that the theory and the practical are both critically important. Either one is only minimally useful without the other. > > > - Many of the teachers don't even teach, they just collect the > > thousands of dollars in tuition and give you a book recommendation > > (really more of a "demand" than a recommendation). > > That's because the incentives are all wrong. Professors aren't paid to teach; they're paid to produce research. Publish or perish, so goes the saying in those circles. To them, teaching is an additional burden imposed upon them that they'd rather get over with ASAP and get back to their research, whatever it takes. Turn away the students showing up at your office hours. Bore them to death in class so they wouldn't know *what* to ask even if they wanted to. Read from a photocopy of the textbook word-for-word to pass lecture time with zero effort (I've actually been in a class where this was done). Anything, to get it over with and get back to the work that pays. > That's a good point. Although it doesn't help that (from what I've seen) the students are given basically no indication ever that the profs are there for anything other than teaching. As far as the "school" ever indicates to the students, it's a "school" rather than an R&D lab. And that's a natural conclusion for the student to make when they're forking out $100k for an alleged "education". > Some of my best teachers in university were part-time lecturers, one of whom won several teaching awards and accolades for 3 years straight. I don't know if there's even one faculty member that ever got *one* teaching award. You know, I honestly noticed the same thing. I always thought it was...interesting...in college that the best teachers I had were almost exclusively the part-timers, and vice versa. > (On the contrary, a certain faculty member > was so arrogant of his tenurehood that he'd show up on evaluation day > and tell students to their face that they can write whatever they > want and it wouldn't affect him in the least, 'cos his tenure meant > he can never be fired. And of course, he consistently gets > rock-bottom reviews from students, and incoming students are > consistently warned by said students to avoid his courses at all > costs.) > Tenure is a concept I've *always* despised. May as well just hand out Royalty status to people. It ends up the pretty much the same way. > > > Now, I'm a strong believer in being self-taught and learning from > > books, but all I need for that is a library card, not a $100k debt > > and four years of elitist attitudes from people who clearly don't > > know what they're doing anyway. > > Heh. Nearly all of my programming skills are self-taught (well, and learned from experience now that I have some number of years in the industry), but I'm no reader either. I was doing online learning long before the 'Net became cool, Actually, my first introduction to programming was the interactive tutorial disks that came with the Apple IIc. I sometimes find it kind of depressing that instruction isn't even *that* far along anymore, let alone any further advanced. > and every now and then I still browse > around learning new algorithms and stuff, while everybody else is > clicking their lives away on FB and twitter (no offense, Andrei, but I > do think FB is an evil waste of time, at least when it comes to the > way most people use it). > My biggest issues with FB/Twit are that: A. They degenerate the internet into proprietary walled-gardens (it's internet w/ orwellian training wheels, or a Dvorak put it: It's "New AOL") B. They've managed to turn every product and advertisement, ever, into their *own* advertisement with the "f" and "t" plastered everywhere you look. I even have a granola bar sitting here with FB's and Twit's advertising plastered on the wrapper, for fuck's sake. I wouldn't mind the twitfaces so much if I were able to opt-out of their constant bombardment from every fucking facet of society. But yea, the fact that, for the most part, they ultimately amount to LiveJournal anyway (itself an abomination of pointless self-indulgent minutia and drivel) doesn't help matters. |
June 26, 2013 Re: TDD is BS? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Wed, 26 Jun 2013 16:24:27 -0400 Nick Sabalausky <SeeWebsiteToContactMe@semitwist.com> wrote: > On Fri, 21 Jun 2013 16:03:57 -0700 > "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote: > > and every now and then I still browse > > around learning new algorithms and stuff, while everybody else is > > clicking their lives away on FB and twitter (no offense, Andrei, > > but I do think FB is an evil waste of time, at least when it comes > > to the way most people use it). > > > > My biggest issues with FB/Twit are that: > > A. They degenerate the internet into proprietary walled-gardens (it's internet w/ orwellian training wheels, or a Dvorak put it: It's "New AOL") > > B. They've managed to turn every product and advertisement, ever, into their *own* advertisement with the "f" and "t" plastered everywhere you look. I even have a granola bar sitting here with FB's and Twit's advertising plastered on the wrapper, for fuck's sake. I wouldn't mind the twitfaces so much if I were able to opt-out of their constant bombardment from every fucking facet of society. > > But yea, the fact that, for the most part, they ultimately amount to LiveJournal anyway (itself an abomination of pointless self-indulgent minutia and drivel) doesn't help matters. > Again though, like you said, nothing against Andrei. I completely understand the difference between a person and their employer. Hell, I used to work for a [car] insurance company! |
June 26, 2013 Re: TDD is BS? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Wed, Jun 26, 2013 at 04:24:27PM -0400, Nick Sabalausky wrote: > On Fri, 21 Jun 2013 16:03:57 -0700 > "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote: > > > On Fri, Jun 21, 2013 at 06:12:57PM -0400, Nick Sabalausky wrote: [...] > > > Now, I'm a strong believer in being self-taught and learning > > > from books, but all I need for that is a library card, not a > > > $100k debt and four years of elitist attitudes from people who > > > clearly don't know what they're doing anyway. > > > > Heh. Nearly all of my programming skills are self-taught (well, and learned from experience now that I have some number of years in the industry), but I'm no reader either. I was doing online learning long before the 'Net became cool, > > Actually, my first introduction to programming was the interactive tutorial disks that came with the Apple IIc. I sometimes find it kind of depressing that instruction isn't even *that* far along anymore, let alone any further advanced. Yeah, no kidding! In the Good Ole Days (gosh I'm old :-P) the Apple PCs used to come with *full listings of the ROM code*, schematic diagrams of PC internals, and voltage/amperage levels and pin diagrams along with suggestions of how to hook it up to homemade electronics. A far cry from today's blackboxed lawyer-guarded device rentals. Sigh. T -- Political correctness: socially-sanctioned hypocrisy. |
June 27, 2013 Re: TDD is BS? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Wed, 26 Jun 2013 13:58:18 -0700 "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote: > > > > Actually, my first introduction to programming was the interactive tutorial disks that came with the Apple IIc. I sometimes find it kind of depressing that instruction isn't even *that* far along anymore, let alone any further advanced. > > Yeah, no kidding! In the Good Ole Days (gosh I'm old :-P Heh. I admit I have little right to be talking about "getting old", but one thing I have learned: Hearing things I still think of as "normal" be referred to by people as "retro" or "ancient" or before their time certainly doesn't help one feel young ;) I've even seen N64/PS1 stuff called "retro"! That just seems so wrong - they supported *true 3D*! I don't think I'll ever get used to anything from 1990-2005 being "old" (90's==old? That just ain't right!), and I sympathize with anyone who feels that way about the 80's. You know there are *adults* now who never lived through any part of the 80's? Again, that just doesn't seem right! I can't legitimately say I'm getting old yet, but it sure as hell feels like it! > the Apple > PCs used to come with *full listings of the ROM code*, schematic > diagrams of PC internals, and voltage/amperage levels and pin > diagrams along with suggestions of how to hook it up to homemade > electronics. A far cry from today's blackboxed lawyer-guarded device > rentals. Sigh. > Yea. I had heard somewhere that at one point electronic devices often came with their own schematics, and the demise of that was part of what put Stallman down the path leading to the FSF. (Although I can kinda understand why the Core i7, etc, don't come with printed schematics - would there even be enough paper in the world? ;) ) Luckily, there's at least a good fight being put up against orwell-computing, even if it is an uphill battle. The thing I find most encouraging thing (although this is software-side) is gog.com - there's a good article on it here: http://www.forbes.com/sites/erikkain/2013/05/30/good-old-games-gog-com-and-the-drm-free-revolution/ There's also some encouraging things happening on the game hardware front: The old guard of the Nintendo/MS/Sony ivory towers will soon have some extra competition from the Nvidia's Shield, and Valve's SteamBox. Not really *entirely* open systems, granted, as neither of them compare to, for example gog.com. And they're certainly not going to kill anything from Nintendo/MS/Sony anytime soon (maybe even never, if I'm being pessimistic). But nonetheless, Shield and SteamBox are a huge increase in openness for "primarily gaming devices" - a category of devices which have barely seen a shred of openness since the 2600 (and that was open only because Atari hadn't anticipated anything like Activision happening). |
June 27, 2013 Re: OT: CS education gone wrong (Was: Re: TDD is BS?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paulo Pinto | On 6/21/2013 4:10 AM, Paulo Pinto wrote:
> Except not everyone has the authorization to place their work code in such
> public places nor the availability or desire to code after work, just to please
> job interviewers.
True, but your odds of being 'discovered' go up enormously if you make such an effort to make yourself findable with a professional online persona.
It reminds me of some music superstars who started out singing at shopping malls, dive bars, weddings, anyplace they could get anyone to listen. They'd do this grind for a couple years until someone discovered them. The Beatles is one of those that comes to mind who did this.
Anyhow, I recommend that anyone who wants to promote their 'brand' and increase their prospects do:
1. get a domain name that is "yourname.com" and put on it your resume, links to significant things you've done, etc.
2. use your own name as your handle when posting professionally
3. submit presentation proposals about your work to conferences
4. blog or otherwise write articles about your work or some neat tech thing you figured out
5. get a twitter account & github account in your own name - even if you don't use it, reserve it for when you do want to
etc. Essentially, you want to own your online persona. Read any of Donald Trump's books on how he operates, it's the same thing. Gene Simmons is another one who excels at promoting himself.
|
June 27, 2013 Re: TDD is BS? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Szymon Gatner | On Thu, 20 Jun 2013 00:15:50 +0200 "Szymon Gatner" <noemail@gmail.com> wrote: > On Wednesday, 19 June 2013 at 21:59:21 UTC, Jonathan M Davis wrote: > > > > I _do_ agree with writing the tests fora function as soon as > > the function is > > done, in which case, you're likely going to have to do more > > work on the > > function, since it'll probably fail the test, and you'll > > probably improve the > > tests some more at that point as well. But I completely > > disagree with writing > > the test before the code, which is one of the key features of > > TDD as its > > always been explained to me. > > It forces you to think about parameters it should take and value(s) it should return first. TBH, I've never found a lot of value in that. What I find "write tests first" does is force you to *guess* about params and return values. In my experience, implementation automatically roots out the necessary set of ins and outs. > > API change cost is way higher than fixing a bug inside a function or a class I very much disagree with that, unless you're talking about "write implementation, use it everywhere, do a big public release, and *then* write unittests", which is a bad thing to do anyway. Fixing a bug can often be non-trivial, but changing an API right after, or while, you're implementing it is always trivial (although it's less trivial if you've already written a lot of tests that rely on it). > also you will often realize that what you initially though was necessary turns out not to be after all. > Like I said above, I find that writing the implementation does a far better job of that then making guesses about what will/won't be necessary before implementing. |
Copyright © 1999-2021 by the D Language Foundation