September 02, 2018
On 09/01/2018 09:15 AM, Jonathan M Davis wrote:
> 
> I don't know if any DVD players have ever used Java, but all Blu-ray players
> do require it, because unfortunately, the Blu-ray spec allows for the menus
> to be done via Java (presumably so that they can be fancier than what was
> possible on DVDs).
> 

DVDs (PUOs)...BluRays (Java)...Web...

All evidence that the more technical power you give content creators, the bigger the design abominations they'll subject the world to ;) [1]

I actually once came across a professionally-produced, major-studio BluRay where pressing Pause didn't pause the video, but actually made it deliberately switch over to and play a *different* video instead.

This is why a good system is one that automatically does the right thing by default, and makes you work to do the wrong thing...if it's even important enough to have the escape hatch.

[1] That, of course, is not an "us-vs-them" statement: Programmers are by definition content creators, too!
September 02, 2018
On Sunday, 2 September 2018 at 05:16:43 UTC, Nick Sabalausky (Abscissa) wrote:
> On 09/02/2018 12:53 AM, Jonathan M Davis wrote:
>> 
>> Ouch. Seriously, seriously ouch.
>> 
>
> Heh, yea, well...that particular one was state party school, so, what y'gonna do? *shrug*
>
> Smug as I may have been at the at the time, it wasn't until later I realized the REAL smart ones were the ones out partying, not the grads or the nerds like me.

Why? Please don't tell me you believe this nonsense:

"Wadhwa... argues (I am not joking) that partying is a valuable part of the college experience because it teaches students interpersonal skills."
https://www.forbes.com/sites/jerrybowyer/2012/05/22/a-college-bubble-so-big-even-the-new-york-times-and-60-minutes-can-see-it-sort-of/
September 02, 2018
On 08/31/2018 07:47 PM, Jonathan M Davis wrote:
> 
> However, many
> teachers really aren't great programmers. They aren't necessarily bad
> programmers, but unless they spent a bunch of time in industry before
> teaching, odds are that they don't have all of the software engineering
> skills that the students are going to need once they get into the field. And
> most courses aren't designed to teach students the practical skills.
This is why we really should bring back the ancient practice of apprenticeship, that we've mostly gotten away from.

Doesn't have to be identical to the old system in every detail, but who better to teach XYZ to members a new generation than those who ARE experts at XYZ.

Sure, teaching in and of itself is a skill, and not every domain expert is a good teacher. But like any skill, it can be learned. And after all: Who really stands a better chance at passing on expertise?:

A. Someone who already has the expertise, but isn't an expert in teaching.

B. Someone who is an expert at teaching, but doesn't posses what's being taught anyway.

Hint: No matter how good of a teacher you are, you can't teach what you don't know.

Heck, if all else fails, pair up domain experts WITH teaching experts! No need for any jacks-of-all-trades: When people become domain experts, just "apprentice" them in a secondary skill: Teaching their domain.

Sounds a heck of a lot better to me than the ridiculous current strategy of: Separate the entire population into "theory" (ie, Academia) and "practical" (ie, Industry) even though it's obvious that the *combination* of theory and practical is essential for any good work on either side. Have only the "theory" people do all the teaching for the next generation of BOTH "theory" and "practical" folks. Students then gain the "practical" side from...what, the freaking ether???? From the industry which doesn't care about quality, only profit??? From the "theory" folk that are never taught the "practical"??? From where, out of a magical freaking hat?!?!?
September 02, 2018
On 09/02/2018 12:21 AM, Jonathan M Davis wrote:
> 
> The C APIs on the other hand require that you
> check the return value, and some of the C++ APIs require the same.

Heh, yea, as horrifically awful as return value errors really are, I have to admit, with them, at least it's actually *possible* to handle these low-resource situations sanely, instead of D's "not-so-right-thing by default" approach of *guaranteeing* that all software under the same circumstance just freaks out and runs screaming like KDE.

(Much as I love D, and as much as I believe in "fail fast", the "Error" class still irritates me to no end. My usual approach to dealing with it is to stick my fingers in my ears and go "La la la la la!!! It doesn't affect me!!! There's no such thing as non-Exceptions being thrown!!! La la la!!!!". Not exactly a sound engineering principle. If we actually HAD the mechanisms Walter advocates for *dealing* with fail-fast processes, then I might have a different opinion. But we *don't*, it's just code-n-pray for now, and nothing of the sort is even on the most pie-in-the-sky roadmap.)


> Honestly, for some of this stuff, I think that the only way that it's ever
> going to work sanely is if extreme failure conditions result in Errors or
> Exceptions being thrown, and the program being killed.

Under current tools and approaches, that is, unfortunately, probably very true.

However...

> Most code simply
> isn't ever going to be written to handle such situations,

This is 2018. We all have a freaking Dick Tracy wireless supercomputer, that can believably simulate entire connected alternate realities, in realtime...in our pockets! Right now!

If we, the collective software development community of 2018, can't get far enough off our collective asses and *do something about* (as opposed to *completely ignore and never bother even so much as an automated test*) something as basic, obvious, *automatable*, and downright *timeless* as...not having our software freak out in the absence of resources we're not even freaking using...Well, then we, as an entire profession...genuinely SU*K. Hard. (And yes, I am definitely including myself in that judgement. I'm more than willing to change my prehistoric-programmer ways. But implementation-wise there's relevant domain experience I lack, so I can't make this all happen by myself, so there needs to be some buy-in.)


> Anything C-based (and plenty of C++-based programs
> too) is going to have serious problems though

Well, yea. No mystery or surprise there. Another reason I tend to be a bit dismayed at the continued popularity of those languages (not that I'm unaware of all the reasons for their continued popularity).
September 02, 2018
On 09/02/2018 02:06 AM, Joakim wrote:
> On Sunday, 2 September 2018 at 05:16:43 UTC, Nick Sabalausky (Abscissa) wrote:
>>
>> Smug as I may have been at the at the time, it wasn't until later I realized the REAL smart ones were the ones out partying, not the grads or the nerds like me.
> 
> Why? Please don't tell me you believe this nonsense:
> 
> "Wadhwa... argues (I am not joking) that partying is a valuable part of the college experience because it teaches students interpersonal skills."
> https://www.forbes.com/sites/jerrybowyer/2012/05/22/a-college-bubble-so-big-even-the-new-york-times-and-60-minutes-can-see-it-sort-of/ 
> 

Learning skills from partying? Hah hah, no, no, it's not about anything like that. :) (Social skills matter, but obviously plenty of other ways to practice those.)

No, it's just that honing skills isn't the only thing in life that matters. Simply living life while you're here is important too, for its own sake, even if you only realize it after the fact.
September 02, 2018
On Sunday, 2 September 2018 at 04:21:44 UTC, Jonathan M Davis wrote:
> On Saturday, September 1, 2018 9:18:17 PM MDT Nick Sabalausky (Abscissa) via Digitalmars-d wrote:
>
> So honestly, I don't find it at all surprising when an application can't handle not being able to write to disk. Ideally, it _would_ handle it (even if it's simply by shutting down, because it can't handle not having enough disk space), but for most applications, it really is thought of like running out of memory. So, isn't tested for, and no attempt is made to make it sane.

One reason why programs using stdio do fail with disk space errors is that they don't know that fclose() can be the function reporting it, not the fwrite()/fputs()/fprintf(). I can not count the number of times I saw things like that:

    FILE *fd = fopen(...,"w");

    if(fwrite(buffer, length, 1)<1) {
      fine error handling
    fclose(fd);

on disk fullness the fwrite might have accepted the data, but only the fclose() really flushed the data to disk, only detecting the lack of space at that moment.


> Honestly, for some of this stuff, I think that the only way that it's ever going to work sanely is if extreme failure conditions result in Errors or Exceptions being thrown, and the program being killed. Most code simply isn't ever going to be written to handle such situations, and a for a _lot_ of programs, they really can't continue without those resources - which is presumably, why the way D's GC works is to throw an OutOfMemoryError when it can't allocate anything. Anything C-based (and plenty of C++-based programs too) is going to have serious problems though thanks to the fact that C/C++ programs often use APIs where you have to check a return code, and if it's a function that never fails under normal conditions, most programs aren't going to check it. Even diligent programmers are bound to miss some of them.

Indeed, since some of those error checks also differ from OS to OS, some cases might detect things in one setting but not in others. See my example above, on DOS or if setvbuf() was set to NULL it would not possibly happen as the fwrite() would always flush() the data to disk and the error condition would be catched nearly 99.9999% of times.
September 02, 2018
On Sunday, 2 September 2018 at 07:56:09 UTC, Nick Sabalausky (Abscissa) wrote:
> On 09/02/2018 02:06 AM, Joakim wrote:
>> On Sunday, 2 September 2018 at 05:16:43 UTC, Nick Sabalausky (Abscissa) wrote:
>>>
>>> Smug as I may have been at the at the time, it wasn't until later I realized the REAL smart ones were the ones out partying, not the grads or the nerds like me.
>> 
>> Why? Please don't tell me you believe this nonsense:
>> 
>> "Wadhwa... argues (I am not joking) that partying is a valuable part of the college experience because it teaches students interpersonal skills."
>> https://www.forbes.com/sites/jerrybowyer/2012/05/22/a-college-bubble-so-big-even-the-new-york-times-and-60-minutes-can-see-it-sort-of/
>> 
>
> Learning skills from partying? Hah hah, no, no, it's not about anything like that. :) (Social skills matter, but obviously plenty of other ways to practice those.)
>
> No, it's just that honing skills isn't the only thing in life that matters. Simply living life while you're here is important too, for its own sake, even if you only realize it after the fact.

Eh, having fun should be part of the college experience of course, but I suspect most of those out partying were taking it far beyond that. I bet many of them regret that today.

You're right that college is largely an irrelevant playground, precisely because of the incoherent combination of theory and bows to what they think are popular industry practices that you laid out. Most will be out of business within a decade or two, as online learning takes their place.
September 02, 2018
On 9/1/18 6:29 AM, Shachar Shemesh wrote:
> On 31/08/18 23:22, Steven Schveighoffer wrote:
>> On 8/31/18 3:50 PM, Walter Bright wrote:
>>> https://news.ycombinator.com/item?id=17880722
>>>
>>> Typical comments:
>>>
>>> "`assertAndContinue` crashes in dev and logs an error and keeps going in prod. Each time we want to verify a runtime assumption, we decide which type of assert to use. We prefer `assertAndContinue` (and I push for it in code review),"
>>
>> e.g. D's assert. Well, actually, D doesn't log an error in production.
>>
> 
> I think it's the music of the thing rather than the thing itself.
> 
> Mecca has ASSERT, which is a condition always checked and that always crashes the program if it fails, and DBG_ASSERT, which, like D's built in assert, is skipped in release mode (essentially, an assert where you can log what went wrong without using the GC needing format).
> 
> When you compare this to what Walter was quoting, you get the same end result, but a vastly different intention. It's one thing to say "this ASSERT is cheap enough to be tested in production, while this DBG_ASSERT one is optimized out". It's another to say "well, in production we want to keep going no matter what, so we'll just ignore the asserts".

Which is exactly what Phobos and Druntime do (ignore asserts in production). I'm not sure how the intention makes any difference.

The obvious position of D is that asserts and bounds checks shouldn't be used in production -- that is how we ship our libraries. It is what the "-release" switch does. How else could it be interpreted?

-Steve
September 02, 2018
On Sunday, 2 September 2018 at 06:25:47 UTC, Nick Sabalausky (Abscissa) wrote:
> On 08/31/2018 07:47 PM, Jonathan M Davis wrote:
>> 
>> However, many
>> teachers really aren't great programmers. They aren't necessarily bad
>> programmers, but unless they spent a bunch of time in industry before
>> teaching, odds are that they don't have all of the software engineering
>> skills that the students are going to need once they get into the field. And
>> most courses aren't designed to teach students the practical skills.
> This is why we really should bring back the ancient practice of apprenticeship, that we've mostly gotten away from.
>
> Doesn't have to be identical to the old system in every detail, but who better to teach XYZ to members a new generation than those who ARE experts at XYZ.
>
> Sure, teaching in and of itself is a skill, and not every domain expert is a good teacher. But like any skill, it can be learned. And after all: Who really stands a better chance at passing on expertise?:
>
> A. Someone who already has the expertise, but isn't an expert in teaching.
>
> B. Someone who is an expert at teaching, but doesn't posses what's being taught anyway.
>
> Hint: No matter how good of a teacher you are, you can't teach what you don't know.
>
> Heck, if all else fails, pair up domain experts WITH teaching experts! No need for any jacks-of-all-trades: When people become domain experts, just "apprentice" them in a secondary skill: Teaching their domain.
>
> Sounds a heck of a lot better to me than the ridiculous current strategy of: Separate the entire population into "theory" (ie, Academia) and "practical" (ie, Industry) even though it's obvious that the *combination* of theory and practical is essential for any good work on either side. Have only the "theory" people do all the teaching for the next generation of BOTH "theory" and "practical" folks. Students then gain the "practical" side from...what, the freaking ether???? From the industry which doesn't care about quality, only profit??? From the "theory" folk that are never taught the "practical"??? From where, out of a magical freaking hat?!?!?

I agree.  I have been arguing the same for a few years now.

https://www.quora.com/With-6-million-job-openings-in-the-US-why-are-people-complaining-that-there-are-no-jobs-available/answer/Laeeth-Isharc?srid=7h

We de-emphasized degrees and those are information only unless for work permits it is a factor (and sadly it is) and also are open to hiring people with less vocationally relevant degrees.  A recent hire I made was a chap who studied music at Oxford and played the organ around the corner.  His boss is a Fellow in Maths at Trinity College, Cambridge and us very happy with him.

And we started hiring apprentices ourselves.  The proximate trigger for me to make it happen was a frustrating set of interviews with more career-oriented people from banks for a support role in London.  "Is it really asking too much to expect that somebody who works on computers should actually like playing with them ?"

So we went to a technical college nearby where someone in the group lives and we made a start this year and in time it will grow.

The government introduced an apprenticeship programme.  I don't think many people use it yet because it's not adapted to commercial factors.  But anything new is bad in the first version and it will get better.





September 02, 2018
On 09/02/2018 05:43 AM, Joakim wrote:
> Most will be out of business within a decade or two, as online learning takes their place.

I kinda wish I could agree with that, but schools are too much of a sacred cow to be going anywhere anytime soon. And for that matter, the online ones still have to tackle many of the same challenges anyway, WRT successful and effective teaching.

Really the only difference is "physical classroom vs no physical classroom". Well, that and maybe price, but the community colleges have had the uni's well beat on price for a long time (even manage to do a good job teaching certain things, depending on the instructor), but they haven't made the uni's budge: The best they've been able to do is establish themselves as a supplement to the uni's, where people start out with some of their gen-ed classes at the (comparatively) cheap community colleges for the specific purpose of later transferring to a uni.