Live data from Hacker News

Lessons learned from implementing a text editor related to front-end development

lpan.io

131–140 of 191 posts

Re: Lessons learned from implementing a text editor related to front-end development

#131

Earlier quoted context omitted.

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 no…

> 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 i…

> 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 to front-end development

#132

A cursory look into the linked github pull request changes made me spot this, and I must admit that never in a million years would I've thought to erase the possible endline character of a string returned by getline with this: line[strcspn(line, "\n")] = 0; I don't think I'm going to start, either, even if it is a nifty oneliner. Anyway, I've always found this kind of little projects a good sport.

Wise choice.

That's not correct. If the scanned string doesn't contain any of the search string's characters, strcspn will behave like strlen, and the snippet ends up doing effectively nothing.

However, the statement is inefficient in what it does (and even then, not the most obvious way to achieve that, which your comment also highlights in a roundabout way).

Re: Lessons learned from implementing a text editor related to front-end development

#133
post #96

Earlier quoted context omitted.

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 no…

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.

> 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 to front-end development

#134
post #70

Earlier quoted context omitted.

>I'd expect anyone working as a developer in IT to have learned this much before calling themselves a professional. According to author's webpage[1], he's a "student at the University of Waterloo, class of 2021" . So probably age 17 or 18. He's not passing himself off as a "professional". If majority of HN readers feel this article was beneath their skill level and a waste of time, that's more on the submitter (mxstb…

> According to author's webpage[1], he's a "student at the University of Waterloo, class of 2021". > So probably age 17 or 18. He's not passing himself off as a "professional". Fair enough, though I am still surprised he hadn't learned that in formal education already. I was taught about event driven programming before I got to university. The schools I went to weren't particularly good either so it's not like I had…

Lucky you, most of my peers in college had no formal programming experience from hs coming in. I did, but we barely even grazed oop, and I come from a pretty decent highschool. Be careful with anecdotes, your personal experience doesn't represent the general population

Re: Lessons learned from implementing a text editor related to front-end development

#135

Earlier quoted context omitted.

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 pro…

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…

Regarding SQLite: https://sqlite.org/lang_transaction.html?

Re: Lessons learned from implementing a text editor related to front-end development

#136
post #96

Earlier quoted context omitted.

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.

> 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.

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 to front-end development

#137
post #127

Earlier quoted context omitted.

Battery life would take a dive if everyone adopted immediate mode UI for apps. The compromise is something like Win32, where the OS tells you which rectangles in your app to repaint so most of the time you're not doing anything. Both of which are a ton of code if all you want to do is display a list of TODO's with custom styling vs. in markup.

The rate at which you have to update, and what you have to update doesn't change between retained and immediate mode. The only difference is that, with retained mode, the library you're using has, by design, all the knowledge it needs, so it can manage all of that for you. The whole point of using immediate mode is to get rid of this black box from your program, so that you can explicitly state what you want to happe…

I'm using "immediate mode" to mean:

    while (true)
    {
         processInput()
         updateState()
         paint()
    }
That will kill battery unless you write code to not update until input or app state changes, in which case you're building up to your own retained-mode system.

Re: Lessons learned from implementing a text editor related to front-end development

#138

Earlier quoted context omitted.

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?

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 no…

> 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 to front-end development

#139
post #53
post #31

I'd like to post a purely positive, encouraging comment here :-) Thanks for the article, and good job implementing an entire editor from scratch in C! That's impressive. Also, as a very accomplished programmer who happens not to have done much recent UI programming, who has read quite a bit about React/Redux/Rewhatever, Elm, The Haskell School of Expression, etc., I find articles like this extremely helpful: you took…

Thank you, for this! I could not say it better/nicer. I was getting upset with the overwhelming negativity here. Monday morning syndrome?

No, its every day syndrome around here for this type of thing, I've seen it frequently. A lot of people on HN are not receptive to someone posting a blog entry about their experiences re-implementing something for learning purposes if it isn't super advanced stuff. I don't really get it, but there are a lot of people who can't read a technical blog post from the perspective of someone with less experience than them trying to learn new stuff. So, you get a lot of the comments about how what you did is dumb and wrong, even though you are really just trying to build something for fun, learn some stuff, and post about your experience.

For the record, I enjoy posts like this. This is how you learn and hone new skills. Everyone does this kind of thing (well, lots of people do), but for whatever reason those that write it up get attacked sometimes.

Re: Lessons learned from implementing a text editor related to front-end development

#140
post #71
post #47

Earlier quoted context omitted.

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…

> 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.

> 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?

Post reply on HN