Sunday, October 25, 2020

Wandering Witch Elaina

 


I want to highlight a new anime show: Wandering Witch: the Journey of Elaina.


What began as lighthearted show of an apprentice witch becomes dark really quickly by episode 3. Episode 4 is even darker. There is an under current message of death and destruction of people. Yet, like Kino's Journey, most of the destruction is self inflicted.

It resonates with me because there are so many times I've seen such abuse and harassment at online communities, allowed and sometimes even perpetrated by the moderators. The end result is always the same: Destruction of said communities. 

Why don't moderators learn? I don't know. Maybe they just don't want to. When power hungry people become moderators, they will happily burn the once thriving community to the ground. Just like episode 4. Moderators without community; A princess without subjects. 

You can find more info about it at Wikipedia https://en.wikipedia.org/wiki/Wandering_Witch:_The_Journey_of_Elaina


Thursday, October 22, 2020

Why do we code?

This learn to code movement has been picked up by everybody, and it seems to be getting popular lately. However, I do wonder why people want to learn to code. If the answer is to make money, I think that there are other career paths that are just as rewarding. It is commonly ignored that some programmers are perpetually overworked to death. Witness the EA Spouse incident. That was certainly a very wrong way to work as computer programmer. Unfortunately, it isn't that uncommon. Problem lies when you learn to code, but not learn about Project management. Things go bad very, very fast.

So why do people code? In order to answer the question, I kind of go the indirect way to do it. Why do people code in certain languages? And what do they produce? With C language, that seems to be a minority these days. That's because in the old days, peole use C programming language to code high performance programs. In other words, games. Nowadays, they use Unity or something like that. They don't code fast program anymore.

How about BASIC? It's still used to teach computer programming. It is in the form of Scratch, which is icon based successor of BASIC. But that's all it's good for. Not much out of it.

How about Python or Java? Python is very popular, isn't it? Yet, when I ask around as to why people use python, the answer invariably came to as that it is a "professional" language and that it has an extensive collection of libraries. As to the professionalism of the language, certainly Python has been used to write programs at professional caliber. Then again, so is Java, C++, JavaScript, and even, in the old days, Visual Basic. How about extensive library? Python acts like a glue language in that case. Then again, so is Perl and Java. Come to think of it, as long as a particular language have an extensive enough of a library, then it can be used to code a prfessional caliber program, right?

So, what do they use it to code for? Demos, and toys, and the likes. Sometimes, I see an application done, but those are rare. So what happened? In short: code libraries and game engines. Nowadays we have specialized programs that basically lets us do whatever we want, just fill in the blank of the template, or chain some libraries to "code" your program. 

Suddenly, computer programming is no longer the activity of "Coding" but of "Cobbling". The end result is good, in that you get good looking product at the end, but there is a hidden cost in that if you no longer have access to the game engine or library, you'd be stuck and can no longer function. Hence, you cannot code.

Is that the definition of coding? To just glue different routines together, even if you didn't write them? It seems to the be trend lately. Kind of make me wonder why we bother to learn to code.

As for me, that's easy. I code because the things that I do, has no existence in the world. There is no library I can import, nor a game engine I can use. So, I'm stuck with coding things from scratch just about every single time. How about you?

Speaking of cool things, The Raspberry Foundation, the non profit organization that has the mission of teaching everybody to code, regularly features cool projects on their blog. Security Cam, Bird Cam, HD Photography, and even Space Cam, where the program runs on ISS, the International Space Station. But what does that have anything to do with me? Or anybody else for that matter? If I read things right, then very little. The blog has single digit engagement most of the time. About the only time it has popular engagement is when there's new product or technology featured. I think that needs to be better. They should still feature cool products, to be sure, but balance it with some weekender projects that anybody can do. Something like the Geek Gurl Diaries. 

Saturday, October 17, 2020

4 Types of Computer Programmers and Diversity

 There are many kind of classifications of computer programmers. usually this is done either by era (old vs. young) or by skill (hacker vs. pro vs. hobbyist). In this post, however, I will explore the different personalities of computer programmers and why certain groups are customarily discriminatory againsts others. I hope that by writing this essay, I can illuminate the problem and hopefully, increase tolearance for each other, thereby increasing diversity.


The Mathematician

The first group of computer programmers are the Mathematicians. These are people good with numbers. I mean really good with numbers. If you look at early computer programmers, these are the guys writing down the code. I don't think that it is coincidence that the first computer language is FORTRAN, which stands for FORmula TRANslator. The early code are basically mathematical formulas, and this includes the contribution by generally recognized first computer programmer: Lady Ada Lovelace.

That's why when people ask what skills are necessary in order to be good computer programmers, they would answer that you need to be good at Math!

The languages they use tend to be functional ones: Haskell, APL, Lisp, and even Prolog and Mathematica. These people prioritize logic above all. 

Scripting Language: Python.


The Software Engineer

 As computer industry expanded, the need of more and more people became more dire. Hence, the desire to expand the talent pool. Hence, the engineers. In the past, these are hardware engineers because we just didn't have the knowledge about proper software building. Hence the rise of the program development/management techniques: Extreme Programming, Pair Programming, Object Oriented Programming, Flowchart, UML, and other things such as how to properly architect the software and the appropriate scheduling techniques in order to ensure the proper completion of the program.

What are the skills necessary to be computer programmers? Puzzle Problem Solving, Object Oriented Programming Language, Knowing the whole language, including libraries, standard and third party. Of course, the study of Algorithm is extremely important, and Coding can go deep into the arcane knowledge of the platform. The more clever the algorithm, the better of a computer programmer.

The languages they use emphasize Software Architecture Foundation: Java, C++, C#, Objective C. Some Assembly as well. These people emphasize Frameworks and Structures above all. They will never be caught using a Functional or Procedural languages. To them, the faster the CPU, the better the machine.

Scripting language: Python, Perl, PHP. Some Lua for quick and dirty projects.


The Artist

Some people who write code are actually artist, and I don't mean artists as painters and illustrators, although they're doing coding as well. I include into the group writers and poets as well. This is more of a personality trait, instead of specific technique. To them, it is not important the the code runs the fastest, most efficient algorithm possible. As long as the code does not run too slow, then the simplistic elegance of the code is more important to them. Computer Memory is more important than CPU speed.

The languages they use emphasize cleanliness of coding. Processing, Python, C and BASIC  are good candidates. Surprisingly, convoluted languages such as Perl and Javacript makes a showing because Perl is extremely flexible, while JavaScript is necessary in order to render artistic HTML pages. You can also find artists who code in Interactive Fiction, and they tend to use the plain English Inform 7, as opposed to the more concise and compact Inform 6.

Scripting Language: Perl, Ruby, JavaScript.


The Businessman

Or Business Person, if you want to be politically correct, nowadays. These kind of people do not know computer programming and have little desire to learn. These people have been impressed by some spreadsheet coding tricks, that is really simple common sense to me. In fact, the use of spreadsheet  for consistent data entry sometimes requires some selling as they don't think more that word processor is necessary, regardless of the fact that they keep confusing their tabs and spaces. These people don't care about sophisticated technology or beauty. They are dominated by the question of being able to finish a project on time and under budget. Workflow consideration is important because Deadlines is everything.

Programming languages, if you can call these that, are VisualBasic, Spreadsheet, Macro, and any point and click software creation packages. Whatever works.

Scripting Language: DOS, Bash, or whatever is packaged into the system that doesn't require much learning.


As you can see, there are definite types of computer programmers. It's only natural since as the time progresses, computers permeates more and more into our daily life amd therefore it will only expand the scope of computer programming. Certainly, these are just big generalizations, and there are quite a bit of overlap between the type. This is because current environment does not distinguish between these different types.

Is that a problem? In my opinion, yes. Suppose you want to hire a computer programmer. Of course you have to go to the interview process. Chances are the interviewers Software Engineers. What if the interviewee are Mathematicians? Well, they'll probably makes some mistakes in coding. Fail. Or Artists, where they really don't use Object Oriented paradigm like a "proper" Engineers would. Or how about Business type? I imagine the complaint would be something like "Yes, apparently you know quite a good number of clever algorithms, but how many programs have you finished on time!?" Different personalities, different priorities.

The short end of the story is that once a company hires a group of Software Engineers, future employees are going to be more Software Engineers, with no Diversity possible.

This is a problem in the software industry, and a devious one because it is largely invisible. Couple that with the current hostile attitude of the industry, and you have a recipe for disaster. Guess how many YouTube videos of computer programmers  telling you the different type of computer programmers while still staying inside the Software Engineer archetype? Lots. How many do I see actually expanded the types without being insulting? None yet.

Until the computer industry is more welcoming to the diverse personalities of people out there, new programmers will always be hard to come by.  Please be kind to other kind of people, including those that do not code "correctly."


Thursday, October 15, 2020

Learn to Code: For Girls

 I think that everybody needs to learn to code. That includes girls or depending upon their age, women. And there is quite a few people who agrees with me, considering the number of organizations devoted to either teaching girls to code, or at least heavily involve them. All that is good.

I started having trouble accepting them, however, when I see the course materials. It seems that the lessons aren't good for girls at all. In fact, I think that most of these classes, the course materials is rather alienating girls who code. Not that I think they do it on purpose, but that I think that they don't know any better. The only exception I can think of is Carrie Ann Philbin Geek Gurl Diary, where the topics presented are suitable for girls. 

I think the reason for this ignorance is because, well, ignorance. STEM is very popular program, and rightly so. It brings the nerdiness of engineering into the masses. That's a good thing. The problem is in the execution. It focuses on STEM and ignore everything else. I'm sure Dean Kamen, the creator of STEM, would have done differently had he not been such a nerd. A super genius nerd at Einstein level, to be sure, but a nerd nonetheless.

Here's what's needed to bring girls into Coding: STEAM. It stands for Science, Technology, Engineering, Art, Math. Art is very important for girls. I still remember Wolfram presentation, TED, I believe, where he presented his daughter's code for Polygonation of a Circle, or something like that. I was struck by one part of it where you can choose the color of the circle. Wolfram said, "yes, that's important," How can color be an important element in doing what is basically Learning Calculus? Answer: she's a girl!

No man will want to buy a shirt in every color. When you mention that somebody wants to buy a dress/bags/shoes in every color, what are the chances that such person is male? female? You guessed it: female.

There in lies the problem of teaching STEM instead of STEAM. Girls just aren't interested in learning Calculus. They may learn it, but they're not interested in it. So, what's interesting for girls? Art. That means products. Things that they can make and use and show off to other people. Without it, there's just no motivation. Before you complain, let me say that money isn't a good motivation. It's good to have it, but only up to a point.

James Damore noticed the problem. He wrote a paper about it, and was fired for his trouble. That's a bad move. It's not that James Damore is perfect. I think the paper could have been written in a more accesible way, gentler, more accomodating to the reader. However, the issues he raised are important, and deserve scrutiny. Wihtout people like him, there's just nobody to recognize the problem and thus the problem will go unsolved. Google's firing of James Damore does nothing good for the women at Google. Preach Diversity all you want, the proof is in the pudding. Has the situation regarding female coders improved? Or are they keep getting cycled over, with high turnover rate? There you have the answer.

So, when somebody ask me why girls don't code, I'd answer with a question: "Why would they want to?" This has been taken as insult, whereupon they then do ad hominem or personal attack upon me. And yet, the question is an important one. Why would girls want to code? If the answer is money, then I suggest that a career in financial industry is more beneficial to them.  The correct answer to the question is "because it's fun" or "because I can do great things with computers." So, you see, if the motivation isn't a personal satisfaction and ideals, they are probably good for doing something else, and that's true regardless of gender. Males who concentrates on getting tons of money coding aren't doing so good, either.

At this time, I need to make some generalization regarding sex differences, and that has been used as an excuse to censor me somewhat. But the distinction is important: when I say that these things are generally true, it means that there is an overlap in actuality, but that those things are generally true. Males and females aren't the same. For example, if they watch a popular movie that both agree are good, and asked what's so good about the movie, then males tend to focus on the action sequences, where as females tend to focus on the acting. Ignore that, and you will fail to create an environment where females prosper. That's why people like James Damore are so important, not because the paper he wrote are so righteous, but because the issues he raised are crucial in recognizing the problem, and give hints as to how to go about solving the issue. If you are unwilling to even acknowledge that there is a difference between boys and girls, then your effort is bound to fail.

So, let's get back to the issue of teaching girl to code. What's wrong with them? The idea is correct, even noble, but the execution is very much flawed. You see, when I see the way they teach girls to code, I see them teaching the same way they teach boys to code: Math and plenty of it. Girls don't like math. They don't like puzzles. They like socializing and communication. So, the phrase "In order to be a good programmer, you need to be good at Math" is certainly uttered by male computer programmers. Female tend to be on the communication side. Grace Hopper:"Here is FORTRAN so that you don't have to worry too much about machine language and have an easier time programming the computer using a language that people can use easily!" See the difference?

I don't believe that anyone would argue that Grace Hopper is a bad coder, nor Ada Lovelace for that matter. But I just don't see the acknowledgement that their skills lies not in coding, but in language. Ada Lovelace just happens to be good at math, but when she wrote down her programs, it wasn't in machine code. It was in a form that people can read. That is the difference. One is focused on Math; the other, Language.

I would like to see a change in the course of materials in teaching girls to code: Less Frogger and Flappy Bird. More IF and RPG. Basically, less single player action game, and more story-based multi-player experience. Until that is done, there's just no good answer to "Why would girls want to code?"

If you really want to have girls to enjoy coding, and therefore code for life, then it will takes more than just having Flappy Bird with Bow, or Frogger in every color. Therefore, figure out what girls want, and then give it to them. It's that simple.


Tuesday, October 13, 2020

Coding Skill for Everybody

There was such time, in the not too long of a distant past of the last century, that it was thought that everybody should have a computer of their own. This was a time where the smallest computer was the size of a refrigerator. It was, of course, by the process of inference, that it was thought that everybody should have a refrigerator, and that it would prove as useful.

Another analogy can be had with a car. A very expensive device that will get you from one place to another. And that is the thing that everybody would do daily. To work, to shop, to do leisure. But isn't it true that not everybody can have a car? Still, it is the idea that everybody can have a car that is important.

Now, a refrigerator or a car is a rather complex device to build, yet so easy to operate. In fact, that is the matter of great consideration when trying to increase the adoption rate for a particular device.

Nowadays, we have extremely powerful computer no bigger than our hand. A smartphone, we call it. It wakes us up, it shops, it gives direction, it answers our most trivial whimsy. It also lets up talk to other people not in our immediate vincinity. In short, it's a miracle device, equivalent to the most powerful wizard's wand.

But is it easy to use? Yes, it is. Buttons are plenty. All you have to do is point and click. Or in sufficiently advanced technology, spoken words may be used since these devices feature voice recognition technology. So, indeed, it is very easy to use. In my cynical mind, too easy, as those accidental purchases of goods may attest.

How about creating them? Just as it is extremely difficult to create refrigerator and cars, it is exceedingly difficult to create computer programs. We have to use something called "The Command Line" to do our bidding. There, there is only dark void awaits us. A little prompt in otherwise blank screen. Nothing there helps us to prepare to use its capabilities to the fullest.

Yet, it is more powerful than ever before. You can do much more, much faster than what is posible by pressing buttons. You can even chain commands using "pipes" as data flows from one process to another. This is a very powerful and convenient way to create programs.

But nothing much came out of it for one simple reason: Very few people know what to do. It's just a simple blank screen with nothing to guide you to achieve what you want. You have to familiarize yourself to the task. That endeavor requires much learning, studying thick tomes full of arcane knowledge. 

Why would you want to spend a lot of time learning these difficult things? It would be so easy to just take the ignorant way to do things and just use the pretty icons interface. And yet, there in lies the deception of the whole thing! It's not difficult to do!

If you can imagine, little bits of icons, each doing their own little things. Each can be connected to other little icons. Give them some custom parameters in order to use them. Well, it's easy to do, right? However, it will be overwhelming once you get so many of these little icons, that you are having to keep track which icon does what. So, you write little bit of text to differentiate from one icon to another. Words emblazoned on the icons.

What I've described to you, of course, is the equivalent of kanji and roman alphabet (romaji). Kanji are notorius to learn properly. Yet, people say that drag-and-drop language is the future. Yet, here we are, sitting before our QWERTY (or DVORAK) keyboards, typing one word after another.

So, what does it take to have everybody to learn to code? The same way we learn to speak languages: Vocabulary, Grammar, Sentence structure, and the Communication of Ideas. In other words: Communication skills.

For as long as people think that in order to code a program, you need to be good at math, coding will never be a common skill. It is not the math skills you need, but the communication skill.

Learn to communicate. Learn to Code.



Sunday, October 11, 2020

How to Code PNG? FAIL!

 PNG stands for Portable Network Graphic. It was a mystery to me then, and it is a mystery to me now. The problem lies in the compression method. The PNG standard specifies compression as a necessary element. Specifically INFLATE/DEFLATE method. If you want to store uncompressed data, you need to use the uncompressed data block of DEFLATE method.

I was shocked to see that in PNG specification. Common sense design means that uncompressed data should be included in the specification. That way, you can implement the program to deal with the simple case before investing in further effort. 

So, what's the problem? The fact that the compression/decompresion algorithm isn't part of PNG standard means that there is a dependency that is needed to be resolved before I can code my own PNG encoder. That's bad.

Especially since the reference for such code is located in some FTP site, and it was busted. I don't think the site even exists anymore. Hence, broken dependency. All I know about the algorithm is that it is a variant of LZ77 with Huffman encoding, which can be extremely varied depending upon implementation. How am I supposed to implement PNG program?


I am aware that there is a PNG lib somewhere out there. I'm not using that. I want to code it from scratch. That way, I know that the specification is good. The way it is now, the specification is no good. It is too complicated and incomplete. There is no way to specify multiple images, for example. 

I suspect that I should just abandon the endeavor entirely, and focus on improving something easier to do, such as PBM, Portable BitMap format.

Thursday, October 8, 2020

Perl is Write Only?!

There are way too many Python users who bad mouth Perl scripting language, including Mark Lutz, the author of Learning Python. In fact, he took every opportunity in that book to disparage Perl so much that it left a bad taste. If he spend so much effort discrediting Perl language, then it must be because it's so good, that in order to make Python a better language than it is, Perl needs to be taken down. Which is not only stupid, but incredibly harmful, that I wonder why O'Reilly, the publisher of Learning Perl would put up with it.

I certainly wouldn't put up with such destructive comment, even if they're true. They aren't true. Half of the criticism levied to Perl isn't true, and the other half ... also applies to Python! How's that for self-destructive behavior?

I'm going to focus the on one criticism that has been applied to Perl in this post, that is the claim that you cannot read the code after 6 months has passed. There are several considerations:

1. It's a complicated algorithm. No matter how clean the language is, if your program is full of regex manipulations, people who aren't comfortable handling them will have trouble.

2. Advance features. Perl has several variables worked on behind the scene. That is, you don't necessarily see the variables being set. One regex operation sets up so many different variables all at once, and unless your Perl skill is top notch, then you're going to be confused.

3. You have spaghetti code. Perl is linguistic, and so, extremely natural to write. However, it does mean that it allows you to express your ideas anyway you choose. If your linguistic skill is subpar, then yes, you will have trouble reading the code afterwards.

4. Shorthand coding. Interestingly, Perl also allows you to code very densely. This is similar to C programming language, where although you can write in clear formatting style, the high density style marks you as expert programmer and should be sought.


So, now that you know the reasons why Perl code can be hard to read, what can you do about it? 

1. Well, you can pick up Python, or BASIC. Yes, BASIC. No, I'm not kidding. There's no reason why BASIC needs to be slow anymore, and besides, Python isn't known for speed either.

2. You can write in clear style formatting. Perl and C lets you write in however coding style you choose. Simply write in clear, well documented manner, and you should be fine. More importantly, those maintenance programmers who will come after you, who has never seen your code, will be able to read and understand your program quickly, easily, and effortlessly.

3. Write a Design Document! This is one of the biggest fail of computer programmers. In professional programming environment, I always write the Design Document. That's because it's essential to have it. Just because the source code is readable, doesn't mean that you can skip writing the Design Document. So, you write the Design Document that tells the reader what your program is doing, in plain English. There wouldn't be any confusion at all. Then you figure out what the Perl code would look like, which will be instantenous if you know what you're doing. If not, then your Design Document is faulty, and needs a rewrite. How do you know your Design Document is good? Once you figure out how to code it in Perl, simply look at the source code and you should see the exact code already there. Hence, no confusion.


Most people would choose option 1. I chose option 2 and 3, and I can tell you from experience that I never had any trouble reading my source code many months or years later, simply because I have no problem reading the Design Document. You don't need to be a coding hero if you have good Design skills.

Why is learning Python a bad thing? Learning Python is not a bad thing if that's what you want. If you need structured coding to be imposed upon you, then by all means, use Python. But that doesn't mean that you can put down other languages that are very expressive and fluid in their coding, just because those languages do not impose structure upon you. Some of us are highly disciplined coders, you know? The more you complain that Perl is Write-Only, the more you tell me that you do not have good design skill and coding discipline necessary to write high level or high standard computer programming.

I will also mention that a lot of Python coders aren't really coders when all they do is glue library functions, but that's topic for another day.