News for hackers. Stuff that matters.
Re:Lessons learned from implementing a text editor related t... by mmjaa on Monday August 28, 2017 @08:25AM (#15116047)
The more I read, the more I felt that the author was long-windedly discovering FSM's, only describing them using the language de-jour - i.e. JavaScript-ecosystem-ism's.

Is this the state of things today - that kids start off as highfalutin' "developers", whereby 95% of their apps are written by others (because: "npm -i <all the things>"), and then .. eventually, from the top-down, trickle through the stack learning "the things", giving it all a new fancy name, and blogging about it? Because to me, this seems more like devolution at work in the computer science industries, not some kind of radically derived insight.

I'm not trying to be overly critical, but for a lot of us, "discovering that C-based apps are, weirdly, similar to what us React-ites are doing" sure seems like a step backwards from real stack competency.

Re:Lessons learned from implementing a text editor related t... by fnl on Monday August 28, 2017 @09:23AM (#15116339)
I don't think the article was that bad for "junior-JS-to-JS-dev talk", which I think is clearly the main audience. Yes, I'd agree, for any seasoned dev, an article about the basics of functional programming, state machines, and the basics of unit testing and API design is a tad boring ;-). But that's no reason to get that upset about an article that clearly wasn't written for such an audience. Rather, such a response is not exactly encouraging those "kids" to learn complex programming concepts/languages in the first place, I think, and instead seems a bit offensive, to be honest.
Re:Lessons learned from implementing a text editor related t... by jnbiche on Monday August 28, 2017 @09:54AM (#15116502)
> such a response is not exactly encouraging those "kids" to learn complex programming concepts/languages in the first place, I think, and instead seems a bit offensive, to be honest.

Yes, exactly. I mean, this dev is someone who clearly is working toward a deeper level of understanding of CS concepts, and here some people seem to be criticizing him for that. It's frustrating.

Re:Lessons learned from implementing a text editor related t... by MrBingley on Monday August 28, 2017 @10:29AM (#15116732)
Ah, but you forget, then we can't browbeat the JavaScript-kiddies with our own seasoned superiority. (adjusts monocle)
Re:Lessons learned from implementing a text editor related t... by fnl on Monday August 28, 2017 @10:37AM (#15116789)
Hmm; I guess that means a solution would be to personalize HN rankings on the similarity of voters' earlier votes on other articles with your own voting behavior (as a proxy for article preference...) :-)
Re:Lessons learned from implementing a text editor related t... by zbtaylor1 on Monday August 28, 2017 @12:38PM (#15117901)
> It's frustrating.

It really is. This "community" can be very unwelcoming. I'll never understand what motivates people to shit all over content they consider below them.

Is it really that hard to pass by without shouting "I'm smarter than you!" at everyone?

Re:Lessons learned from implementing a text editor related t... by DarkTree on Monday August 28, 2017 @01:54PM (#15118634)
> I'll never understand what motivates people to shit all over content they consider below them.

Almost always rooted in the person's own insecurities

Re:Lessons learned from implementing a text editor related t... by carapace on Monday August 28, 2017 @04:28PM (#15119803)
Some of us are just tired of people who don't respect the people and work that came before them.

There was a guy at the second-to-last place I worked who didn't know who Alan Kay was! What's worse, he wasn't ashamed of his ignorance.

At the last place I worked someone was refurbishing an old "expert system" written in CLIPS [1], he asked my advice and I said, "Consider using Prolog." He said, "What's Prolog?"

These are guys getting paid six figures and they do not care to educate themselves on the background of their chosen field. It's lame.

Could you imagine a physicist who didn't know who Newton was?

[1] https://en.wikipedia.org/wiki/CLIPS

Re:Lessons learned from implementing a text editor related t... by jnbiche on Monday August 28, 2017 @08:46AM (#15116150)
> The more I read, the more I felt that the author was long-windedly discovering FSM's

Then you missed the main point of the post, which was event flow, not state management. I'm wondering if sometimes older devs (I'm one) read these posts in anticipation, just waiting to find something that they recognize from elsewhere, just so they can say "aha, that's just X, nothing more!". In this case, you did recognize that yes, you can use a FSM to store application state, but the point of the article was much more event flow, specifically unidirectional UI architecture. It's not a new thing, by any means, but I thought it was a well-written post on how she/he expanded their understanding of this pattern.

> giving it all a new fancy name, and blogging about it

Are you suggesting that in this case, unidirectional UI flow is just another name for a FSM?

Re:Lessons learned from implementing a text editor related t... by LolWolf on Monday August 28, 2017 @09:19AM (#15116308)
I guess technically everything physical is an FSM with enough states, but that wouldn't be a particularly strong statement. That being said, I'd argue a lot of such posts are of that form (one big idea that's well-known in TCS) modulo some amount of additional cool/novel/well-exposed/interesting stuff I didn't know before (the latter of which is what I really read the post for).
Re:Lessons learned from implementing a text editor related t... by mmjaa on Monday August 28, 2017 @09:50AM (#15116476)
>Are you suggesting that in this case, unidirectional UI flow is just another name for a FSM?

Yup. The UI reads its current-state data, which comes in on an event queue, and renders the display accordingly.

This is a state machine.

Re:Lessons learned from implementing a text editor related t... by jnbiche on Monday August 28, 2017 @10:02AM (#15116561)
Well, as someone else said, just about anything physical could be modeled as a state machine. That doesn't mean we use the term state machine to describe just about everything physical.

Are you seriously suggesting we abandon terms like "unidirectional UI flow" and just describe those architectures as state machines? You would be missing the most important part of the term, which is the flow of events. State machine says nothing about that.

I mean, if you're reducing the event flow of a UI to a state machine, why use the term MVC, right? It's just a state machine at heart, right? A lexer? Oh, that's just a state machine, forget about the term lexer. The various Markov models? Oh, just a state machine. etc. etc.

Re:Lessons learned from implementing a text editor related t... by jasode on Monday August 28, 2017 @10:11AM (#15116615)
>just about anything physical could be modeled as a state machine. [...] Are you seriously suggesting we abandon terms like "unidirectional UI flow" and just describe those architectures as state machines?

Fyi ... a meta observation about this type of discussion: https://en.wikipedia.org/wiki/Lumpers_and_splitters

It's an invisible underlying theme of many programming debates and the participants often don't realize it's happening.

(Personally, I like "splitting" for communication of nuance to others but I also like "lumping" to understand that many things are variations of an underlying principle. E.g. a "file system" is a "database" which is lumping but if I want to communicate to others, splitting is better and I'll call it the "Mac HFS file system" instead of "Mac database" which would just confuse the hell out of everyone.)

Re:Lessons learned from implementing a text editor related t... by jnbiche on Monday August 28, 2017 @10:21AM (#15116688)
I do understand the semantic disagreement we're having here, but most of all I'm upset (really upset this morning) about the tone he/she and others here have toward someone who is exploring new CS ideas and techniques and learning things, for God's sake. And also, taking the time to write up what they learn, which is a step farther than I get on most weeks. It just makes me sad to think that "Hacker News" is so down on someone who seems to be the prototypical curious hacker who is just starting out his programming career.
Re:Lessons learned from implementing a text editor related t... by jasode on Monday August 28, 2017 @10:35AM (#15116777)
>I'm upset (really upset this morning) about the tone he/she and others here have toward someone who is exploring new CS idea [...] It just makes me sad to think that "Hacker News" is so down on someone who seems to be the prototypical curious hacker

I totally understand your frustration.

This 17 or 18-year-old[1] didn't meet mmjaa's standards[2] to write about programming and apparently, many HN'ers feel the same way.

Maybe that's how the majority of HN community wants it to be. I honestly don't know.

[1] https://news.ycombinator.com/item?id=15116484

[2] a common "get off my lawn!" type of sentiment[1]: "To me, the "Full Stack" developer is simply someone who cares about whats happening under the hood. The "millennial developers" simply don't." -- https://news.ycombinator.com/item?id=14990097

Re:Lessons learned from implementing a text editor related t... by mmjaa on Monday August 28, 2017 @11:45AM (#15117347)
> exploring new CS ideas and techniques

The point is, this isn't a "new CS idea and technique" - in fact, this technique is as old as computer UI's themselves.

I have no idea how old this developer is, my only issue is that there is a re-invention of terminology and a whole new ontology being defined here, for something that has been a stock-standard CompSci concept for decades.

Its one thing to call me out as a grumpy old fart "not on my lawn"-ist - but its another thing to call out people who constantly re-invent the wheel and give it a new coat of paint, too. That is really my only motivation: to indicate that there is very little to be gained, productively, from ignoring the lessons of the past, "re-discovering" something, then slapping a new label on it. This doesn't do our industry any good - yet the practice is rampant. It seems, ever generation of CompSci graduates or so, someone gets the idea to invent something cool, which they've never heard of before, and proclaim that it is a unique insight into the field - whereas the fact is, its just a new coat of paint over an empty hole where the understanding should be.

We go through this psychosis every 4 or 5 years or so, in the computer world - so many times, we've re-invented the wheel and given it a new lick o' paint, calling it cool. I would, personally, like to see a bit more care given to this aspect of things by newcomers to this field - and rest assured, you can sit on my lawn as long as you cut it first.

Re:Lessons learned from implementing a text editor related t... by yaseer on Monday August 28, 2017 @10:02AM (#15116559)
Is this the state of things today...from the top-down, trickle through the stack learning 'the things'

Yes, the path most people will take today is from high-level languages and high-level abstractions, down to low level abstractions. It's not any better or worse than a bottom-up approach for learning. The fact that people are going down through the stack, trying to learn and understand things as they go is to be celebrated, not to be rued.

A top-down approach for learning makes logical and logistical sense in 2017, given the demand for developers operating on high-level abstractions. The bottom-up approach made sense, circa 1972 when C appeared. Neither approach is 'better', IMO.

Re:Lessons learned from implementing a text editor related t... by taneq on Monday August 28, 2017 @10:27AM (#15116720)
My grandad used to say if you learn to sail a small boat properly, you can then learn to sail a big boat, but if you learn to sail a big boat first, you'll never really learn to sail a small boat properly.

I think the analogy holds here.

Re:Lessons learned from implementing a text editor related t... by Sacho on Monday August 28, 2017 @10:58AM (#15116917)
Why can't you learn to sail a small boat properly after learning to sail a big boat? I don't see how the example works in the first place.
Re:Lessons learned from implementing a text editor related t... by smallhands on Monday August 28, 2017 @11:19AM (#15117092)
what the grandfather is trying to say by my own understand is learning to sail small boat when big boat sinks small boat sailing skill is the only thing that will save your hide.the old man is wise
Re:Lessons learned from implementing a text editor related t... by yaseer on Monday August 28, 2017 @11:02AM (#15116946)
you'll never really learn to sail a small boat properly

This analogy lost its sway for me with the word 'never'. It's not impossible, in either case.

Perhaps working with a small boat / low-level language is indeed 'harder', so you may be better equipped to deal with the higher-level easier language, after learning the low-level language. Teaching high level languages down to low level languages would be an increase in difficulty, and thus that becomes one logical path for learning. I'm not saying this path satisfies all learning use-cases, merely perhaps the majority in 2017.

I'm not familiar enough with sailing to say whether the same principle transfers to boats...

Re:Lessons learned from implementing a text editor related t... by taneq on Monday August 28, 2017 @08:05PM (#15121170)
I think I somewhat misremembered the quote - it should have been "If you learn to sail a small boat, you can sail a big boat. If you learn to sail a big boat, you can't sail a small boat."

It's not about easier/harder. It's about responsibility and understanding.

Sailing a small boat is a "full stack" activity, from trip planning to navigation to the low level mechanics of jibing and tacking, even the act of physically keeping the boat upright if you're using a centerboard.

Sailing a large boat usually sees you in a specific role, doing a specific niche thing, and you never get an overview of the whole process.

The same applies to working in a large team of any sort, which is why you see software developers who can't write FizzBuzz but who nonetheless do fine in their particular niche.

Re:Lessons learned from implementing a text editor related t... by carapace on Monday August 28, 2017 @04:36PM (#15119846)
Thomson's Rule for First-Time Telescope Makers: "It is faster to make a four-inch mirror then a six-inch mirror than to make a six-inch mirror."

-- Programming Pearls, Communications of the ACM, September 1985

Re:Lessons learned from implementing a text editor related t... by eecc on Monday August 28, 2017 @10:34AM (#15116771)
Well, what counts as big and small in this case? C or Js?
Re:Lessons learned from implementing a text editor related t... by 1_player on Monday August 28, 2017 @10:39AM (#15116805)
I suppose small == low level (C), big == high level (JS)
Re:Lessons learned from implementing a text editor related t... by keyle on Monday August 28, 2017 @08:28AM (#15116068)
It's true that today's devs are glorified plumbers.

On the other hand, so much gets done, it would be insane to go back to "C for all the things!".

It's a trade off, you're either a high level hacker, piping stuff together and watching for leaks, or your a low level system guy, squeezing the carpet.

Re:Lessons learned from implementing a text editor related t... by mmjaa on Monday August 28, 2017 @08:35AM (#15116097)
I would argue that a lot more of the worlds productive plumbing depends on C-based apps/libraries/frameworks than we would care to admit - its just that its 'not sexy' enough for the young-uns to get behind and start using, since everyone knows that C is a greybeard language and, therefore, not cool.

The same argument ("so much gets done") was made for Visual Basic back in the day, you know. Oh, how the hoipolloi cried and crowed for the death of C developers back then. Oh, how they were wrong, oh so wrong!

I'm not saying the world doesn't have a debt to pay to the Node/Javascript camp - it surely does. I just feel that there is something really missing in the scene, if in fact things that C developers knew and applied well 'back in the day' are just now being re-discovered as "Cool New Shit™" by those who chose - willingly - to ignore the very mechanics of the components their stacks are highly dependent on.

Still, I guess its not worth complaining. Its good to know that JS guys can get over the wall, and discover that we've all been using state machines for decades now, and so on, eventually. I just wish there was a lot less hubris on the "crowing about it" side of things. Honestly, JS guys: you should know a little C. Its still there, underneath all the cool shit, and you're still heavily, heavily dependent on it, no matter what your "npm up" tells you...

Re:Lessons learned from implementing a text editor related t... by pjmlp on Monday August 28, 2017 @08:53AM (#15116183)
> Oh, how the hoipolloi cried and crowed for the death of C developers back then. Oh, how they were wrong, oh so wrong!

Which is kind of true for us on Windows.

Most of the C has been replaced by C++, to the point that even the new C runtime library is actually written in C++ with extern "C" entry points.

Also for those of us on Android, where using the NDK is an exercise in patience writing JNI boilerplate, because Google doesn't want us using it more than strictly necessary.

Oh and the two most beloved open source C compilers (gcc and clang) are actually written in C++.

Now I admit that on traditional UNIX systems and embedded development on hardware constrained systems, getting rid of C is an impossible task.

Re:Lessons learned from implementing a text editor related t... by Tade0 on Monday August 28, 2017 @09:10AM (#15116269)
> since everyone knows that C is a greybeard language and, therefore, not cool.

As a person who works as a front-end developer but after hours writes almost exclusively in Rust I think I could shed some light on what's going on here:

Since JS is so accessible a lot of the folks who work with it don't even have a formal education in Computer Science(like the author, who's a CS student), so many of them never touched a compiled language in their life, not to mention subjects regarding CS.

To these people most of the concepts in C(like manual memory management) are entirely foreign. It's not that they don't _like_ C, it's that they're utterly unaware of the mindset one has to have to write things in it.

EDIT: grammar.

Re:Lessons learned from implementing a text editor related t... by tcfunk on Monday August 28, 2017 @09:54AM (#15116511)
In my purely anecdotal experience, learning web-based technology over C/C++ was not a choice I made personally. It was a career path that was foisted upon me by job availability and hiring requirements.

I have yet to see a job posting for a fresh-off-the-boat C developer. It's nearly always 5-10 years industry-related experience required. Web, on the other hand, seems more willing to take on the new guys.

Re:Lessons learned from implementing a text editor related t... by vostok on Monday August 28, 2017 @10:20AM (#15116684)
I think they're more willing to take new people mostly because there are more jobs and not enough programmers in Web.
Re:Lessons learned from implementing a text editor related t... by coldtea on Monday August 28, 2017 @08:42AM (#15116128)
>The same argument ("so much gets done") was made for Visual Basic back in the day, you know.

And it was right, to the argument is moot. VB was a very productive language. Any issues where with the ecosystem moving on, not with VB (which had its warts, but all languages do, C first of all).

>Oh, how the hoipolloi cried and crowed for the death of C developers back then. Oh, how they were wrong, oh so wrong!

Again, they were right, oh so right. We do 1000x the programming we did in 1980 and 1990, but we don't use 1000x more C programmers (or assembly or pascal, two other popular choices at the time). Tons of code that used to be that, is now written in higher level languages.

Re:Lessons learned from implementing a text editor related t... by photonios on Monday August 28, 2017 @08:44AM (#15116139)
Honestly, I think you underestimate things a bit. In a "modern" development stack you rely on a lot of work by others. But it's far from the "glorified plumbing" you describe. It's not as black and white as you describe it to be.
Re:Lessons learned from implementing a text editor related t... by soundwave106 on Monday August 28, 2017 @10:33AM (#15116770)
To me, your basic "high level programming" job (which usually includes the JS folks with their modern stacks) typically is all about translating business / application requirements into logic that computers can understand and interfaces that people can use.

Certainly, as a higher level programmer, I do think it is great to know as much lower level concepts as possible (it helps your higher level programming skills). But the truth is, business simply wants to Get Shit Done Fast. And having frameworks or libraries do a lot of the work for you saves a lot of time. Hence the huge amount of usage of "glorified plumbing" in the field.

(I don't think even C++ folks are immune to the "glorified plumbing" effect, eg: they have Boost, Poco, QT, etc.)

As far as I know, the separation between this side of programming and the more mathematical / inner detail "engineering" oriented side has always existed. (When I went to college, the "higher programming" pathway also had business courses, where the "engineering" side concentrated more on algorithms and the like. Now, even the business programmer folks did take one course in C++ back then...)

Re:Lessons learned from implementing a text editor related t... by nigifabio on Monday August 28, 2017 @08:32AM (#15116086)
I will state the opposite:

It's a trade off, you're either cut and paste blue collar programmer, piping stuff together and watching for leaks, or your a hacker/engineer guy, doing CS.

Re:Lessons learned from implementing a text editor related t... by jsudhams on Monday August 28, 2017 @09:19AM (#15116312)
We do have programmer, developer and engineer. I assume the framework developer will come in league of developer while the user is programmer

http://chrislema.com/programmer-developer-engineer/

Re:Lessons learned from implementing a text editor related t... by agumonkey on Monday August 28, 2017 @08:42AM (#15116129)
even MIT caved in, using python + libs in courses. They clearly said: today people are wiring solutions. I find it a bit problematic because when there's no solution you feel lost. But they have decades of experience .. I hope it's their very best insight.
Re:Lessons learned from implementing a text editor related t... by noxToken on Monday August 28, 2017 @09:16AM (#15116295)
> I'm not trying to be overly critical, but for a lot of us, "discovering that C-based apps are, weirdly, similar to what us React-ites are doing" sure seems like a step backwards from real stack competency.

This is something that I try to impart on all new hires. Collective we have been making great strides in this industry lately, and in my experience, the more inexperience devs tend to get blinded by all of the shiny. This isn't inherently bad; a lot of CS breakthroughs are tough to learn without the appropriate domain knowledge. But practical stuff that most devs use ins't anything fancy. It's the same concepts from years ago with config files attached to it.

We don't stress learning algorithms so that you can write a perfect quicksort implementation from memory. We want you to know the fundamentals so that tomorrows new technology becomes trivial to learn.

Re:Lessons learned from implementing a text editor related t... by agumonkey on Monday August 28, 2017 @08:40AM (#15116116)
All this screams to me "education". The self taught diy thing is great, but on mass scale it's inefficient. If all these devs (I could include myself) could spend 6 months doing all this together sharing the common patterns and then go out fixing other problems ?

Also SICP/HtDP

Re:Lessons learned from implementing a text editor related t... by chickenfries on Monday August 28, 2017 @09:06AM (#15116251)
One, who just has a free 6 months? Two, do you honestly think you can fit a comprehensive CS education that would satisfy people like you in six months?
Re:Lessons learned from implementing a text editor related t... by throwawayjava on Monday August 28, 2017 @09:30AM (#15116368)
1. Most westerners born outside the USA. And in the USA anyone willing to take out a loan.

2. The core requirements for a cs major at a typical university (read: not CMU,MIT,Stanford,Berkeley) and especially at a non flagship is basically 4 or 5 courses, which you can for sure cram into 6 months if that's all you're studying.

Personally, I'd rather work with people who learn some part of that on their own (or even not at all) but have a stellar education in reading, writing, and math. The former are often provided by good high schools. The latter not so much. At least in the states.

But if all you want is just the core fragment of just the cs, six intense months are enough.

Re:Lessons learned from implementing a text editor related t... by pjmlp on Monday August 28, 2017 @10:28AM (#15116731)
Having a 5 year degree in Informatics Engineering, I doubt very much you could cram that much in 6 months.

Not at my university, with the amount of stuff we had to do, unless in the 20+ years that have gone by, they got the quality level down.

Re:Lessons learned from implementing a text editor related t... by throwawayjava on Monday August 28, 2017 @11:50AM (#15117396)
> I doubt very much you could cram that much in 6 months.

No, you cannot cram an entire degree into six months. Hence the second paragraph under my second point.

But the core CS sequence? 4-5 courses is a rough semester, but it is a semester!

And if you already have some mathematics or especially some programming background, the sequencing that causes those courses to stretch into 1.5 years is already resolved.

Re:Lessons learned from implementing a text editor related t... by pjmlp on Monday August 28, 2017 @12:09PM (#15117583)
Well, 4-5 courses was the minimum we had per semester, with enough deliveries to keep us rather busy, starting with 3rd year.

Some people managed to jungle a few more courses.

I don't see such a program being much more than simple introduction to CS.

Re:Lessons learned from implementing a text editor related t... by throwawayjava on Monday August 28, 2017 @01:47PM (#15118570)
Yes, that's exactly my point. You can get a simple introduction to CS in six months, especially if you already know how to program.

No, you're not going to be publishing papers or talking through OS implementation details with CMU grads or designing computer vision systems with Berkeley grads. But you'll have the baseline knowledge that agumonkey is referring to in their comment.

Re:Lessons learned from implementing a text editor related t... by chickenfries on Monday August 28, 2017 @09:25PM (#15121491)
You still might accidentally invent the command pattern on your own.
Re:Lessons learned from implementing a text editor related t... by chickenfries on Monday August 28, 2017 @10:58AM (#15116910)
> The core requirements for a cs major at a typical university (read: not CMU,MIT,Stanford,Berkeley) and especially at a non flagship is basically 4 or 5 courses

I went to a school that is very far away from CMU, MIT, Stanford, Berkeley, etc and my core requirements were A LOT more than 4 or 5 courses. I'd have to check by I can name at least 8 core requirements off the top of my head.

> which you can for sure cram into 6 months if that's all you're studying

So your suggestion is for people to look at a CS syllabus and find a way to teach themselves all of the core courses?

I have my bachelors in CS. I never really programmed until college. 6 months into my BS I had barely wet my feet with Scheme, learned a little bit of discrete math, and had a VERY basic introduction to formal logic. I knew exactly one programming language.

Re:Lessons learned from implementing a text editor related t... by throwawayjava on Monday August 28, 2017 @11:48AM (#15117374)
> I'd have to check by I can name at least 8 core requirements off the top of my head.

I'm familiar with a vast array of CS curricula at many types of institutions. I have no doubt that this is true, but it's also not universal.

To be clear, I'm referring to the courses that everyone from that institution will have taken before graduating. So almost all CS majors require much more than 4 courses, but only 4 courses worth of certain, common, shared knowledge.

If you only count courses offered by the CS department, and that everyone must take to receive a major, I think 4-5 is fairly typical. Maybe 6-7. Especially at places that aren't ABET.

Most programs will also require 3-4 additional courses for the major (that the college/university does not require for graduation). E.g. at least one or two mathematics courses, sometimes a Physics course.

And of course all those programs require some electives -- sometimes selected from subject area "buckets".

But my point is that it's certainly possible for two students to get a CS degree from the same (decent or even good) institution and only share 4 "core" CS courses. Typically an intro course or two, a lower-division algorithms-style course, something architecture-y, and something systems-y.

> So your suggestion is for people to look at a CS syllabus and find a way to teach themselves all of the core courses?

Maybe.

This approach would certainly be inappropriate for a student with no background in Mathematics or programming.

But a strong programmer can breeze through or even skip those intro courses.

And a student with a strong mathematics background -- e.g., an accountant, other science major, or finance person learning to code -- can breeze through that otherwise time-intensive algorithms course.

Re:Lessons learned from implementing a text editor related t... by Merad on Monday August 28, 2017 @12:13PM (#15117618)
> The core requirements for a cs major at a typical university (read: not CMU,MIT,Stanford,Berkeley) and especially at a non flagship is basically 4 or 5 courses, which you can for sure cram into 6 months if that's all you're studying.

Huh? That's an incredibly terrible CS curriculum. 4-5 courses is at most 20 credit hours. A typical undergrad degree requires about 120 credit hours of courses before you can graduate. I went to a second tier state school and our CS curriculum had 12 common required courses (excluding seminar courses) that everyone took, plus three upper level electives of your choice. Basically half of the four year degree was CS.

Re:Lessons learned from implementing a text editor related t... by throwawayjava on Monday August 28, 2017 @01:01PM (#15118129)
Please see my other comments.

I'm talking about the set of courses that are 1) offered by the CS department and that 2) every student must take.

Not even the entire set of cs courses. Just the ones every student must take.

> A typical undergrad degree requires about 120 credit hours of courses before you can graduate*

Obviously you cannot get an entire degree in 6 months. You can't even finish all of the required coursework.

That's why I said "core CS sequence", not "a degree".

Re:Lessons learned from implementing a text editor related t... by Merad on Monday August 28, 2017 @02:43PM (#15118990)
> I'm talking about the set of courses that are 1) offered by the CS department and that 2) every student must take.

As I said, that was a dozen courses at my school.

Re:Lessons learned from implementing a text editor related t... by throwawayjava on Monday August 28, 2017 @03:13PM (#15119219)
12 CS courses, offered by the CS dept, and that everyone takes means that either A) your department was internalizing a LOT of service courses; B) left very little room for differentiation within your major; or C) provided very little time for exploration outside of your major.

Either way, that level of straight-jacketing and/or in-sourcing is atypical.

Even at top schools that number is usually below 10. E.g. CMU 6 (well 7, but really 6); Berkeley 4-6; MIT 8; Standford 6.

These are all off the high end of my 4-5 estimate, but only because they ALL in-source a course that at most places would be farmed out the math dept and therefore not counted by my criteria. And MIT also a comm course. Plus, there's the other extreme of places that only require the intro sequence and an algorithms course, leaving all else to the students.

In order to get up to 12 at any of these places you'd need to only offer one course for a lot of the "breadth" requirements, or else in-source the calculus sequence (or similar silly things).

Again, I'm counting courses offered by the CS dept, AND that everyone takes. The minimum viable "common knowledge" we can reliably assume is shared among all CS majors, as offered by the CS dept. IME 4-5 is pretty typical. Maybe 6.

Yes, we also assume some background in other fields of study from CS graduates (some calculus, reading/writing skills, etc.) But those courses are not the ones I was referring to with my 4-5 count. They were also addressed in my original comment.

Re:Lessons learned from implementing a text editor related t... by ptr_void on Monday August 28, 2017 @10:44PM (#15121747)
> is atypical

I don't think it's very atypical, for example take a look at this course requirement for City College of New York under CUNY :

https://www.ccny.cuny.edu/sites/default/files/csc-prereqs-04...

Under the CS parts, only the elective in category A, B, and C is where student can pick and choose. Everything else under the grey curve across the pdf are:

> courses offered by the CS dept, AND that everyone takes.

Re:Lessons learned from implementing a text editor related t... by agumonkey on Monday August 28, 2017 @09:14AM (#15116288)
Good points but what these people learn in segments in random order would probably fit into 6 months. I don't even believe CS education fits in 5 years anyway. I was just trying to suggest how to avoid diy lib chaos.
Re:Lessons learned from implementing a text editor related t... by archagon on Monday August 28, 2017 @08:33AM (#15116090)
OK? Sounds like "learning" at work to me. Besides, things are better grokked when explained from a variety of angles, be they top down or bottom up.
Re:Lessons learned from implementing a text editor related t... by donkeyd on Monday August 28, 2017 @09:50AM (#15116477)
I consider myself a self-taught professional developer, since it's become the job that pays my bills, but I've never had any formal education on the subject. I regularly find out things like this, because I haven't been educated on the subject and because I don't have infinite spare time to study programming patterns. I know they exist and when I feel the need to, I look them up, but otherwise, yeah; "npm -i <all the things>" all the time.

I don't feel bad about this at all, since my colleagues describe me as a competent developer and my employer can't find enough people for all the work we have to do. If we only wanted to hire developers who understand C, we'd have a really big issue.

Re:Lessons learned from implementing a text editor related t... by Raphmedia on Monday August 28, 2017 @05:37PM (#15120292)
What can I say? Learning the language du-jour landed me a high paying job right out of school.

I had a choice at one point : Join the workforce doing web work (and make money right now) vs. spend more time in school and learn more while gaining debts and making no money.

Right now I am debt free, living a good life writing modern JS.

In my free time, I try to learn more low-level CS knowledge. It's however hard to justify the time spent doing this since none of it is of use during my day job.

If University was free and we didn't have to work to eat, I would know everything from the ground up. Sadly, this is not the world we live in.

Re:Lessons learned from implementing a text editor related t... by landave on Monday August 28, 2017 @08:51AM (#15116176)
I couldn't agree more, and I've always been a strong advocate of learning things bottom up, as opposed to top down.

However, it always amazes me how powerful abstractions such as high-level languages are. In particular, it allows people who know virtually nothing about the underlying mechanisms to develop cool applications. This is a great thing, and I think we should value it, even though it comes with some major problems.

Re:Lessons learned from implementing a text editor related t... by sametmax on Monday August 28, 2017 @09:22AM (#15116335)
The reverse is true.

I meet quite a lot of low to middle level programmers that stick to what they know because it's "the basics", and hence completely lack in experience in:

1 - Writing elegant modern code

Working with experienced C / Java coders to write proper Python is a challenge. They tend to use twice to many lines, ending up with slower and less readable code. They don't use the additional productivity to produce cheap goodies like generated doc, more unit tests, etc. They over-engineer stuff, but let the user experience down. And don't ask them to setup a server without the help of a sysadmin.

2 - Trading efficiently machine time for coder time

Aka you cost 100 $/h, a bigger server cost the same amount a month. Keep the double nested loop and go code something else.

And please setup code auto reload and preprocessors. Because THAT will save time and money down the road.

3 - Knowing the modern ecosystem and how the stacks fit together

No you don't need share this across threads and set a mutex here, put that in redis.

Don't write that in XML, you have JSON/YAML/TOML for that.

Actually don't write that in a file, you have sqlite.

No, you don't want to JOIN that, you have Arrays and JSON types in PostGres. If you got a lot of those, mongo or elastic search will do.

No you don't write sockets manually, you have http, zeromq, wamp and the likes to do 99% of the jobs.

JSON is too slow ? You have bson, msgpack, protocol buffers...

Yeah, this ORM is slow. But it generates the entire validation system, including HTML forms. And it allows for 12 plugins to share a common API to provide auth, history, permissions, registrations, a REST API, security measures, sanitizing and data validation for free. Plus the server has 32 cores so just go with it.

4 - being able to keep up with user expectations

No I have no idea how to code in assemble. I can tell you however that the search completion you don't want to add here because it's too much work would prevent the user to think your app is from 2004. And I can get decently performance version of it for tomorrow at a cost effective price.

----

Bottom line, everybody has limited time and resources and can only learn so many things at once.

Also different industries have different needs. And sometime you want low level programmers, sometime you want high level programmers.

One could hire somebody who has the skills of both, but you probably can't afford him or her. And he/she is probably not interested this mission anyway

Re:Lessons learned from implementing a text editor related t... by falcolas on Monday August 28, 2017 @10:26AM (#15116714)
1) You're talking about familiarity with the language and the ecosystem. Take a Python dev and put them into C, and you'll get a buggy, illegible mess. Give your C developer a few years to grok Python, and they'll be as elegant as anyone who cut their teeth on Python (if not more so, for having experience in more than just Python).

2) Funny, there's a near-constant stream of articles on how companies who succeed have to spend significant amounts of money money and time re-write their code, because those nested loops weren't just fast enough, and were causing the company to hemorrhage money.

3) "put that in redis" At which point you incur a network roundtrip to the redis server.

"you have JSON/YAML/TOML" So, which one? They're not cross compatible. Oh, and don't forget to add custom encoding for non-JS compatible values. JSON is just the latest iteration of XML these days, complete with XSLT, X-Path, XSD, processing directives, and namespaces.

"you have sqlite" SQLite has been available for decades, and in use by programmers just as long. Oh, and it's written to a file on the filesystem. And doesn't support transactions.

"Arrays and JSON types in PostGres" Oof. Hope you don't want performance to go with that. Joins are much more performant, and have the bonus of being flexible when the user spec changes.

"You have bson, msgpack, protocol buffers" Binary serialization formats have been around as long as there have been computers. People have been sending raw structs with checksums over the wire as long as there have been wires.

"Plus the server has 32 cores so just go with it." This again. Doesn't scale, and will cost your company when you do have the scale.

4) I'll be honest, I don't get your point here. Low level programmers can't keep up with user expectations? Why do you think `ls` has several dozen flags? Users wanted them.

Re:Lessons learned from implementing a text editor related t... by sametmax on Monday August 28, 2017 @11:09AM (#15116998)
All the points you raised actually prove mine. You have a mind set on details that are important to your missions, but in many ones those are waste of time and resources. There is a reasons both profiles exist: they all serve different yet useful purposes.
Re:Lessons learned from implementing a text editor related t... by oblio on Monday August 28, 2017 @12:03PM (#15117523)
Re:Lessons learned from implementing a text editor related t... by nv-vn on Monday August 28, 2017 @09:55AM (#15116514)
There's a lot I could address with your comment, but since I'm short on time here, where are you getting servers that they all cost the same amount regardless of specs?
Re:Lessons learned from implementing a text editor related t... by sametmax on Monday August 28, 2017 @09:56AM (#15116520)
I don't, I'm just oversimplifying for the sake of the demonstration.
Re:Lessons learned from implementing a text editor related t... by nv-vn on Monday August 28, 2017 @04:51PM (#15119951)
I think server operation costs are a very legitimate concern, though. People always say "well, you're not Google so it's not that important," but that's precisely the issue. No small company has the budget to splurge on the biggest and best server infrastructure. A small DigitalOcean/AWS/Heroku plan is probably the most any small business could hope for (dedicated servers = hardware costs out of pocket + maintenance costs + power fees + ISP fees) and any relatively complex server is gonna eat through that quickly. Micro-optimizations may not be worth it, but just switching from an interpreted language to a compiled language can often reduce the performance overhead by an order of magnitude.

The amount of oversimplifying you're doing seems to skip every flaw in your argument in my opinion. That's not to say you're necessarily wrong... a C programmer probably isn't worth it over a Python programmer. But writing code with double nested loops for no reason or ignoring basic algorithms is going to cost you big time in the long run.

Re:Lessons learned from implementing a text editor related t... by sametmax on Monday August 28, 2017 @05:29PM (#15120236)
I usually have far lower server bills than my colleagues because i don't pick up saas when i don't need too. This is the an optimization that does save money : knowing when to manually setup servers vs going aws/firebase/whatever.

As for the doubled nested loops, as usual, it depends. Data size, boudaries, number of concurrent operations, cpu costs, acceptable loading time...

Re:Lessons learned from implementing a text editor related t... by dvfjsdhgfv on Monday August 28, 2017 @02:34PM (#15118946)
It's a general trend. Many young developers rediscover old things and describe them using familiar terms. At first it amazed me, then I understood it's more or less natural and there's nothing we can do. It's like when your son discovers the Beatles and gets excited.
Re:Lessons learned from implementing a text editor related t... by alacombe on Monday August 28, 2017 @08:52AM (#15116180)
There is plenty to re-use in C, eg. BSD's queue.h or linux' list.h for linked list alone. Because the author choose not to do so doesn't mean it is the fate of the whole language. Though, it is indeed a little harder than firing "npm".
Re:Lessons learned from implementing a text editor related t... by Nursie on Monday August 28, 2017 @10:27AM (#15116716)
Is it?

On (Debian) linux boxes apt-get install <package>-dev and away you go, there's literally the whole platform ecosystem there for you to use.

Re:Lessons learned from implementing a text editor related t... by njharman on Monday August 28, 2017 @01:42PM (#15118511)
> Is this the state of things today

I don't think that is just today (except the blogging aspect). That is how it always has been. Developers learn from experience, learn from doing.