October 17, 2014
On Fri, 17 Oct 2014 20:40:37 +0000
Joakim via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:

> On Friday, 17 October 2014 at 13:59:03 UTC, ketmar via Digitalmars-d-learn wrote:
> > that's why i'm sure that basic programming must be teached in
> > school.
> > hey, the whole our civilization will collapse without computers!
> > computer programming is the literacy of the new age.
> 
> This is nonsense and I see it repeated all the time, with code.org and other efforts.  Do you know how to fix your car, washing machine, or refrigerator?
i have no car, i know how to fix my wahing machine, i know how to fix my refrigerator.

> No, yet your life would likely collapse far faster without those.
my life is not the whole human civilization.

> You hire somebody to do the job if any of those mechanical systems breaks.  Similarly, most people hire programmers to do the software work they don't want to do.
...and pretty sure that computers are magical devices. oh, how many times i've seen people doing tedious repetetive work for hours, that kind of work that can be done in seconds by the simple script.

actually, that's why people so love their pads: "no-brain-required". not only that, but "no easy way to made it do what i want" too. i still can't understant that kind of attitude.

> I will agree that basic computer literacy is important, ie people should know their way around a computer or tablet, how to open and turn off apps, mouse or touch your way around the UI, etc. But beyond that it's a matter of interest: some people like Walter want to work on their car or computer, but most people don't.
inability to write a simple script to automate some task is not
different from inability to write some words on a piece of paper.
yet i see how the argument "oh, well, i hire someone to write that for
me" fits here.


October 17, 2014
On Friday, 17 October 2014 at 21:20:29 UTC, ketmar via Digitalmars-d-learn wrote:
> On Fri, 17 Oct 2014 20:40:37 +0000
> Joakim via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
> wrote:
>> This is nonsense and I see it repeated all the time, with code.org and other efforts.  Do you know how to fix your car, washing machine, or refrigerator?
> i have no car, i know how to fix my wahing machine, i know how to fix
> my refrigerator.

You do realize that most people are clueless about how to fix those also, right?  Would you require that how to fix all that mechanical stuff be taught in schools too?  Kids would never leave school if they had to learn all the stuff everybody says they should be forced to learn. ;)

>> No, yet your life would likely collapse far faster without those.
> my life is not the whole human civilization.

Yet, civilization is made up of people like you, who would all miss those mechanical systems far more than computers.

>> You hire somebody to do the job if any of those mechanical systems breaks.  Similarly, most people hire programmers to do the software work they don't want to do.
> ...and pretty sure that computers are magical devices. oh, how many
> times i've seen people doing tedious repetetive work for hours, that
> kind of work that can be done in seconds by the simple script.

They should use tools like Automator instead, no programming needed:

http://en.wikipedia.org/wiki/Automator_(software)

> actually, that's why people so love their pads: "no-brain-required".
> not only that, but "no easy way to made it do what i want" too. i still
> can't understant that kind of attitude.

Tablets are optimized for basic usage, not saving files and document editing and whatever else you might want to do on a PC.  Most people just need a basic appliance that isn't going to catch viruses or require registry hacks.

>> I will agree that basic computer literacy is important, ie people should know their way around a computer or tablet, how to open and turn off apps, mouse or touch your way around the UI, etc.  But beyond that it's a matter of interest: some people like Walter want to work on their car or computer, but most people don't.
> inability to write a simple script to automate some task is not
> different from inability to write some words on a piece of paper.

It is completely different, because there are tools like Automator to help you automate your workflow without needing to write anything.  If you need to communicate something on paper- well, nobody uses paper these days so let's say in text ;) - that's more basic and fundamental.

> yet i see how the argument "oh, well, i hire someone to write that for
> me" fits here.

For most people, that is a better route, particularly if they don't need to modify the script as they go and just need it written once.
October 18, 2014
On Fri, 17 Oct 2014 23:31:45 +0000
Joakim via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:

> You do realize that most people are clueless about how to fix those also, right?
most people are stupid.

> Would you require that how to fix all that mechanical stuff be taught in schools too?
but it is! or at least it was. it's all simple physics, you know. not a rocket science.

> Kids would never leave school if they had to learn all the stuff everybody says they should be forced to learn. ;)
nobody should be *forced* to learn: it's pointless. yet kids are very curious, and they can be taught *alot* of things if they think that they are "just playing". make it interesting, and you'll be amazed how much kids can learn almost without problems.

> Yet, civilization is made up of people like you, who would all miss those mechanical systems far more than computers.
it's a huge difference between "i miss my washing machine" and "all our communication and data processing systems are foobared".

> They should use tools like Automator instead, no programming needed:
> 
> http://en.wikipedia.org/wiki/Automator_(software)
i wasn't talking about sorting out file mess. i was talking about tabular data processing, for example, with some logics and calculations that can't be done automatically without programming.

> Tablets are optimized for basic usage
what is "basic usage"? i really don't know what tablets are for. what i can do with it? watching movie? listening music? reading book? yes, tablets can do this... badly. what else?

i can listen music with my N900, and it fits in my pocket.

movies? on tablet screen? no, thanks.

books? "electronic books" are better.

tablets are like XML: bad for everything.

> Most people just need a basic appliance that isn't going to catch viruses or require registry hacks.
give 'em wooden board with painting. it's great!

> It is completely different, because there are tools like Automator to help you automate your workflow without needing to write anything.
oh, please. i can do batch renaming with wildcards, and for any
task that is more complex than that there *is* a need to write
logic. scripts. "graphic programming" is a dead end. people drop icons
in favor of alphabet 'cause alphabet is just better.

> If you need to communicate something on paper- well, nobody uses paper these days
i wish that the goverment of my country knows about that. and banking. somehow they still insist to have everything written on paper.

> For most people, that is a better route, particularly if they don't need to modify the script as they go and just need it written once.
so instead of spending ten minutes to write the script they'll spend a day searching for someone to hire and pay him money. great. thanks to such people we have "don't put your pet into microwave"-like instructions. and that instructions are pointless 'cause such people never reads any instructions anyway.

most people are stupid, but that's not what scares me alot. what really scare me is that most people *love* to be stupid and fight for the right to be stupid with passion.

p.s. me too. i can't force myself to take English courses for five damned years!


October 18, 2014
On Sat, 18 Oct 2014 03:05:58 +0300
ketmar via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:

p.p.s. just in case: i'm not talking about personalities here, sorry if i was offencive.


October 18, 2014
On Thursday, 16 October 2014 at 22:26:51 UTC, RBfromME wrote:
> I'm a newbie to programming and have been looking into the D lang as a general purposing language to learn, yet the D overview indicates that java would be a better language to learn for your first programming language. Why?  Looks like D is easier than Java...

Thank you for taking the time to respond to my inquiry.  I've been reading up on different languages for some time now. I have experimented with python some and have  created a few minor scripts. It's fairly easy to get going with the basics , but i don't find the basics any easier to  learn than D's.  The biggest issue i personal find in getting deeper into  a language is the docs and examples. The python examples, beyond the basics usually get write into OO so you find your self trying to figure out OO while trying to sift through the examples.  Makes it a little harder to get going and figure out the available libraries while trying to figure OO at the same time.
The second thing that would help a beginner move forward is the documentation  on the libraries. I see D has  standard libraries along with third parties. And I believe , if i read it properly, D can us C libraries. It would be helpful to see examples on how to use C libs with D since D is still new and its library packages is still small.
Summing it up, I personally think the hardest part in learning to use a specific language is the docs and and examples because they all throw you write into OO and you spend more time trying to figure out OO instead of how to use the standard lib or third party lib to get a basic task done.

Thank you Ali Cehreli for taking the time to write the D tutorial. It's appreciated by people like me.
October 18, 2014
On 18/10/2014 3:00 p.m., RBfromME wrote:
> On Thursday, 16 October 2014 at 22:26:51 UTC, RBfromME wrote:
>> I'm a newbie to programming and have been looking into the D lang as a
>> general purposing language to learn, yet the D overview indicates that
>> java would be a better language to learn for your first programming
>> language. Why?  Looks like D is easier than Java...
>
> Thank you for taking the time to respond to my inquiry.  I've been
> reading up on different languages for some time now. I have experimented
> with python some and have  created a few minor scripts. It's fairly easy
> to get going with the basics , but i don't find the basics any easier
> to  learn than D's.  The biggest issue i personal find in getting deeper
> into  a language is the docs and examples. The python examples, beyond
> the basics usually get write into OO so you find your self trying to
> figure out OO while trying to sift through the examples.  Makes it a
> little harder to get going and figure out the available libraries while
> trying to figure OO at the same time.
> The second thing that would help a beginner move forward is the
> documentation  on the libraries. I see D has  standard libraries along
> with third parties. And I believe , if i read it properly, D can us C
> libraries. It would be helpful to see examples on how to use C libs with
> D since D is still new and its library packages is still small.

If you want to see shared libraries with a c interface bound to D DerelictOrg is a great place to look[0].

> Summing it up, I personally think the hardest part in learning to use a
> specific language is the docs and and examples because they all throw
> you write into OO and you spend more time trying to figure out OO
> instead of how to use the standard lib or third party lib to get a basic
> task done.

I and I'm sure others, will be happy to talk with you about any concepts and ideas that you have trouble understanding. Just let us know.

> Thank you Ali Cehreli for taking the time to write the D tutorial. It's
> appreciated by people like me.

[0] https://github.com/DerelictOrg
October 18, 2014
On Saturday, 18 October 2014 at 02:00:42 UTC, RBfromME wrote:
> but i don't find the basics any easier to  learn than D's.  The biggest issue i personal find in getting deeper into  a language is the docs and examples. The python examples, beyond the basics usually get write into OO so you find your self trying to figure out OO while trying to sift through the examples.  Makes it a little harder to get going and figure out the available libraries while trying to figure OO at the same time.

If you find D more fun, then use D, but OO is little more than representing aspects of real physical objects in the computer:

If you want to write a program about cars you could group properties such as weight, top-speed and build-year and call that Vehicle, then add number of wheels and motorsize and call it Car or some other properties and call it Boat. Add a function print() to display all the info to each class Vehicle, Car and Boat. Then you can create a list of vehicles that store different properties for different types of vehicles while being able to treat all cars and boats the same when printing them.

That's basically it. Nothing magic.

The most important aspect of learning how to program is what universities tend to call "datastructures and algorithms".  The basics is probably just 2-4 weeks.

If you already know Python a little bit you could try to use educational resources for Python and translate it into D, e.g.:

http://interactivepython.org/courselib/static/pythonds/index.html

The nice thing about Python that it is very close to what is called "pseudo code", basically a shorthand used when sketching a program.

> Summing it up, I personally think the hardest part in learning to use a specific language is the docs and and examples because they all throw you write into OO and you spend more time trying to figure out OO instead of how to use the standard lib or third party lib to get a basic task done.

You don't need to learn more OO than I wrote above, and perhaps not even that. What you need to learn to be productive in any imperative language is:

1. What an aggregate (of values) is, they are often called "record", "struct" or "class" and how to create them.

2. Arrays and the provided operations on them (can be in language or libraries)

3. How to create links between aggregates (called "references" or "pointers")

Then pick up an online course or book on data structures and algorithms. Introductory books and courses teach roughly the same stuff, so pick anyone you like.

Understanding libraries and their documentation becomes much easier when you know the basic terminology about data structures and algorithms. One of the most entertaining and useful courses in computer science.
October 18, 2014
On Friday, 17 October 2014 at 08:44:00 UTC, Paulo  Pinto wrote:
> On Friday, 17 October 2014 at 01:05:37 UTC, ketmar via Digitalmars-d-learn wrote:
>> On Fri, 17 Oct 2014 00:52:14 +0000
>> MachineCode via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
>> wrote:
>>
>>> I don't understand. If at least it were C but java? why not D itself?
>> C is *awful* as "beginner's language". never ever let people start with
>> C if you don't hate 'em.
>>
>> as for D... current version of D can be used, but with some
>> precautions. we now have excellent book by Ali. (it's great, really! i
>> believe that it must be featured on the front dlang.org page!) but java
>> has alot more books and tutorials.
>>
>> not that D is bad for beginners, it's just has a smaller userbase. and
>> all that things with "classes are reference types and structs are not",
>> "empty array is not empty array but is empty array" and so on D may be
>> confusing a little. it's good to have some CS background to understood
>> that things.
>>
>> just my cent and cent.
>
>
> Better, go with FreePascal http://www.freepascal.org/ and discover all that those features that many C advocates spread as being close to the machine and other C only features, aren't exclusive of it.
>
> Alongside support for real modules, OO and genericity.
>
> Then with a head clean of bad C influences, jump into D.
>
>
> --
> Paulo

Don't tell him that - he may discover Freepascal/Lazarus is the holy grail of GUI programming and may never try D...  ;-)

-=mike=-
October 18, 2014
On Saturday, 18 October 2014 at 00:06:10 UTC, ketmar via Digitalmars-d-learn wrote:
> On Fri, 17 Oct 2014 23:31:45 +0000
> Joakim via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
> wrote:
>
>> You do realize that most people are clueless about how to fix those also, right?
> most people are stupid.

No disagreement there, but even the smart ones can only learn so much.

>> Would you require that how to fix all that mechanical stuff be taught in schools too?
> but it is! or at least it was. it's all simple physics, you know. not a
> rocket science.

Many people do not learn simple physics in school, and even if they did, wouldn't necessarily be able to figure out how to fix a specific mechanical system like a washing machine from the general physical principles.

>> Kids would never leave school if they had to learn all the stuff everybody says they should be forced to learn. ;)
> nobody should be *forced* to learn: it's pointless. yet kids are very
> curious, and they can be taught *alot* of things if they think that
> they are "just playing". make it interesting, and you'll be amazed how
> much kids can learn almost without problems.

Yeah, we agree if you truly mean making most of what they learn optional, not just "fun" but still required.  Most of the stuff we force on kids today, like multiplication tables, how to divide numbers by hand, or memorizing historical dates, is utterly useless.

>> Yet, civilization is made up of people like you, who would all miss those mechanical systems far more than computers.
> it's a huge difference between "i miss my washing machine" and "all our
> communication and data processing systems are foobared".

Yet, I bet you they'll want that washing machine working far more than the internet.

>> They should use tools like Automator instead, no programming needed:
>> 
>> http://en.wikipedia.org/wiki/Automator_(software)
> i wasn't talking about sorting out file mess. i was talking about
> tabular data processing, for example, with some logics and calculations
> that can't be done automatically without programming.

Isn't that what people use Excel macros for?  There are specialized tools for the job, that are more limited than full programming languages but easier to use for the average person.

>> Tablets are optimized for basic usage
> what is "basic usage"? i really don't know what tablets are for. what i
> can do with it? watching movie? listening music? reading book? yes,
> tablets can do this... badly. what else?

All of the above, anything you'd use a portable computer for that doesn't require much typing and would benefit from a larger screen than your smartphone.  I wouldn't say they do it all badly: it's the most portable "TV" you could ever have, if you use it to watch video.  And you're not limited to the junk on the idiot box, you can download any video from the web and watch on the go.  Most websites benefit from a larger screen also.

> i can listen music with my N900, and it fits in my pocket.
>
> movies? on tablet screen? no, thanks.
>
> books? "electronic books" are better.

I've watched parts of movies on my 4.7" smartphone screen, which happens to have the best display I've ever used.  Tablets are even better for video.  I don't read books anymore, but with their high-res displays up to 200-300 ppi these days, reading text is very nice on tablets too.

> tablets are like XML: bad for everything.

Now that's just low, you can't compare anything to the utter junk that is XML. :)

>> Most people just need a basic appliance that isn't going to catch viruses or require registry hacks.
> give 'em wooden board with painting. it's great!

It's a little better than that. ;)

>> It is completely different, because there are tools like Automator to help you automate your workflow without needing to write anything.
> oh, please. i can do batch renaming with wildcards, and for any
> task that is more complex than that there *is* a need to write
> logic. scripts. "graphic programming" is a dead end. people drop icons
> in favor of alphabet 'cause alphabet is just better.

Actually, the progression went the other way, people dropped text UIs for graphical UIs. :) I'm not saying _you_ need to leave the terminal, but for most people GUI tools like Automator are enough.

>> If you need to communicate something on paper- well, nobody uses paper these days
> i wish that the goverment of my country knows about that. and banking.
> somehow they still insist to have everything written on paper.

Well, the government is the most backwards part of any country.

>> For most people, that is a better route, particularly if they don't need to modify the script as they go and just need it written once.
> so instead of spending ten minutes to write the script they'll spend a
> day searching for someone to hire and pay him money. great. thanks to
> such people we have "don't put your pet into microwave"-like
> instructions. and that instructions are pointless 'cause such people
> never reads any instructions anyway.
>
> most people are stupid, but that's not what scares me alot. what really
> scare me is that most people *love* to be stupid and fight for the
> right to be stupid with passion.
>
> p.s. me too. i can't force myself to take English courses for five
> damned years!

I wouldn't be so quick to call it "stupid" as much as learning takes effort and you only have so much time and effort to learn so much stuff.  Better to focus on the stuff that interests you and leave the programming to others, at least for most people.

On Saturday, 18 October 2014 at 00:11:18 UTC, ketmar via Digitalmars-d-learn wrote:
> On Sat, 18 Oct 2014 03:05:58 +0300
> ketmar via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
> wrote:
>
> p.p.s. just in case: i'm not talking about personalities here, sorry if
> i was offencive.

Nothing offensive about what you wrote.
October 18, 2014
On Sat, 18 Oct 2014 19:42:50 +0000
Joakim via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com>
wrote:

> > most people are stupid.
> No disagreement there, but even the smart ones can only learn so much.
that's why we should teach kids alot of things while their minds are "clear" and ready to absorb alot of knowledge. and, of course, we must teach them how to *use* that knowledge.

> Many people do not learn simple physics in school, and even if they did, wouldn't necessarily be able to figure out how to fix a specific mechanical system like a washing machine from the general physical principles.
yes, figuring this out without manuals will be hard. but learning physics (proper learning of *anything* for that matter) will give 'em understanding of base principles (mechanics, electricity, etc) and the ability to extract information from books. it's enough for simple fixes that doesn't require to produce hi-tech parts.

> Yeah, we agree if you truly mean making most of what they learn optional, not just "fun" but still required.  Most of the stuff we force on kids today, like multiplication tables, how to divide numbers by hand, or memorizing historical dates, is utterly useless.
ah, i hated that so-called "history lessons" where i was forced to remebmer that in year i don't care about somebody who i don't care about did something i equally don't care about. ;-)

yes, i'm sure that we should teach kids how to do things, not just making 'em remember that 4*8 is 32. tell 'em what multiplication is and then play games with them, games which involves using of multiplication. this way kids will learn how to use multiplication. no need to remember any tables.

or let 'em build a simple robot and program it to do some funny things. it's exciting and they will learn many things about mechanics, electricity, programming...

let 'em play a role of factory manager, for example, and they will develop a good understanding of how economics works.

and so on.

> >> Yet, civilization is made up of people like you, who would all miss those mechanical systems far more than computers.
> > it's a huge difference between "i miss my washing machine" and
> > "all our
> > communication and data processing systems are foobared".
> Yet, I bet you they'll want that washing machine working far more than the internet.
most people can't see a whole picture. it's bad. we must teach kids to understand how different things are interconnected too.

> Isn't that what people use Excel macros for?
aren't writing excel macros a programming?

> There are specialized tools for the job, that are more limited than full programming languages but easier to use for the average person.
i never meant that all people should learn "full programming languages". they have to know how to write algorithms, but not necessary what "pointer" is or what is the difference between manual memory management and garbage collecting. yet if i'll show 'em simple recursive fibonacci function, they must be able to understand it. hey, it's lambda calculus, and lambda calculus is so simple, that even 7-year kid can understand it! i checked that, kids are really able to understand it. ;-)

> All of the above, anything you'd use a portable computer for that doesn't require much typing and would benefit from a larger screen than your smartphone.
instagram and social networks. ;-) two of the most useless things on the planet.

> And you're not limited to the junk on the idiot box, you can download any video from the web and watch on the go.
and can't easily mark and categorize that until someone wrote "web-service" for it. 'cause for doing it locally i need... ah, to write some scripts. and i have no keyboard (no, that on-screen crap may be good for tweeting, but it's generally unusable). i.e. tablets *are* idiot boxes, just with fancy pictures from over the world.

> I don't read books anymore
even technical ones? ;-)

> but with their high-res displays up to 200-300 ppi these days, reading text is very nice on tablets too.
i prefer to use some specialised device to reading text. it's smaller, it was made especially for reading texts and it can last alot longer without recharging.

i mean that tablets can do all that things, but specialised devices are just better. and if i know that i'll have to spend some time waithing for something, i'll take my player and "ebook" with me. or subnotebook -- hey, it has real keyboard!

> > tablets are like XML: bad for everything.
> Now that's just low, you can't compare anything to the utter junk that is XML. :)
ah, you are right. tablets sometimes can be useful. ;-)

> Actually, the progression went the other way, people dropped text UIs for graphical UIs. :)
that's 'cause they never used good UIs and we have no truly component environments. Oberon system was great even with it's TUI, and it was really exciting with it's gadgets UI. i'm still missing my Oberon system.

by the way, if D will develop good runtime reflection (which is
required for precise and moving GCs anyway), we can resurrect Oberon
gadgets with it.
fast compiler + runtime reflection + dynamic modules == excellent
component system.

> I'm not saying _you_ need to leave the terminal, but for most people GUI tools like Automator are enough.
terminal is not the best thing too. ;-) and i have nothing against automator-like tools when they allow flexible scripting when user needs it. but anyway such tools just trying to achieve what component system has out of the box. ;-)

there is no such thing as "application" in true component system (nor even a "file" for that matter). user can combine and glue components in any way he wants, building anything he wants.

e-mail reader? ok, create new document, drop treeview component into it, drop html viewer into it, drop "e-mail data source" into it, connect 'em and voila! you have a simple working e-mail reader!

want some filtering? drop proxy data source into document, connect it to e-mail data source, reconnect tree view to proxy, write some filters and... voila, you have e-mail reader with filtering.

save this document and voila: you have "e-mail reading application"!

the magic works both ways: take complex e-mail reading application, replace some components, add another components -- and you have e-mail reading application which is customized to your tasks.

open two documents -- and you'll have two automatically synchronized readers.

have you ever seen BlackBox Component Builder? it's written in Component Pascal, but the basic principles are language-independent. i'm dreaming about BCB with D as base language...

> I wouldn't be so quick to call it "stupid" as much as learning takes effort and you only have so much time and effort to learn so much stuff.  Better to focus on the stuff that interests you and leave the programming to others, at least for most people.
simple scripting *is* programming! ;-) i'm not talking about "everybody must know how to write kernel module" here, as i mentioned above. it's more like writing in general: most people can write, but we still have professional writers. yet almost anyone can write a page of text describing what he did last evening. this will not be a bestseller ;-), of couse, but there's no need to hire a professional writer for such task.