Monday, May 19, 2014

Java plugin is bad...but docker is good

So, I try to keep my systems java free whenever possible. Why? Same reason I try to avoid adobe reader and adobe flash player. They've become cross platform malware injection tools. Even us linux users aren't safe. So it kind of sucks when you actually NEED the java plugin to do your job. I've got a few servers I manage that have OOB (out of band for the non-initiated) management tools. Guess what, most of them are web based, and require java. Now simple stuff like changing the power state (powering on/off) remotely, no java is needed. However, most of them have the ability to access a virtual KVM if you will, over the network. Yep, you can use an ISO image to fake a cdrom, and get access to the monitor output and get keyboard and mouse input all remotely. So I don't even have to walk down the the server room and I can re-install the OS on my servers.

The only downside, it requires java! Boo. So I used to have java installed on my work machine just in case I needed to access those features. Well at some point I switched to 64bit OS and well, the 64bit java just didn't seem to work correctly anymore. It didn't matter what I installed. Openjdk, sun, etc, none of the 64bit versions worked. So I stopped installing it, and then it seemed vulnerabilities for java were popping up constantly. Even more reason to just not have it installed. Besides, the machines are working fine, no need to re-install right? Well, 4 years later, the OS is coming up on EOL (end of life) and I actually need to re-install some of them. Crap.

I had previously been playing with the idea of installing a 32bit firefox and 32bit java plugin inside a chroot. I got it mostly working with some serious caveats. I had been also following along watching docker evolve and I've been actively using it quite a bit. I also noticed lots of people talking about running gui programs inside docker. So when this new urgent need arose to actually get a java plugin working, I decided to create a docker image for it. That way, not only do I prevent tainting my desktop OS install with java (blah), I also get the benefits of resource isolation that containers give. Yay!

So I started out using the base ubuntu images published by the folks at docker. No go. I spent quite a few hours spread across many days banging my fists on keyboards (probably scaring people in adjacent offices) all to no avail. No matter what I tried, nothing would work. Now, I had a docker image up, with firefox and java working fine. That was not the problem. But whenever I tried running one of those test java applets, nothing would work right. I tried accessing my server's remote management, no dice. I tried different versions of openjdk, every available version of oracle java, and nothing worked. Everything failed for different reasons. I think the closest I got was oracle java 7, where I could see the remote monitor output, and the keyboard input worked, but virtual cdrom drive redirection, nope. That last part was actually crucial, because these machines have no physical cdrom! Oracle java 8 was a total failure. It requires all java applets to be signed or it refuses to run them. That's great for security reasons, but guess what, the manufacturer of my servers 5 years ago, weren't really thinking about signing their apps. And there's no way to update them, they're baked into firmware.

So I dropped the whole Idea. I mean, I still had a year or so before EOL, I'll think about it later. Then one day it just hit me. The 32bit version of openjdk actually worked pretty good. If only I could get a 32bit base OS in docker to work with. Wait, I remember seeing ubuntu published "core os" tarballs, which were meant for building vm images from, and docker can import a tarball to create an image from. So I did just that, downloaded the latest ubuntu 14.04 i386 core os tarball, imported it as a docker image, and used that for the basis of my docker recipe. Sure enough, firefox and java plugin work great.

I'll probably publish my 32bit base image based on the core os tarball. I just need to see if there are any tweaks missing that the main ubuntu image has. I may also publish my firefox docker file. I guess it depends on if anyone actually would find it useful.

Tuesday, May 13, 2014

My Past Teaching Experiences

I just wrapped up teaching for spring semester, and I wanted to take a minute or 30, to reflect on what I actually learned. Now this wasn't my first semester teaching. That was actually about 10 years ago now. Wait, wow, I think I just did that math for the first time. Nothing seems that long ago until it's at least 10 years ago. Ok, enough reminding my self how old I am. So I taught my first class 10 years ago, and I did it essentially for free. I was a graduate student at the university, and already had an assistantship doing systems admin work for the department. So technically I wasn't supposed to be doing other work too, and they couldn't pay me to teach since I was already on support doing another job. So I told them, fine, can I teach for free? I don't think they knew how to respond, and it ended up causing many hassles with paperwork because some one was teaching a class that wasn't in the payroll system, etc. I remember having a hard time getting into the grading system to submit grades and what not. I didn't care. I just REALLY wanted to see what teaching was like. I just felt this need to do it, like I should be a teacher. So I did it, for free.

Well, I think at the end of every semester that I try teaching, I come to the same conclusion. I like parts of it, and hate the rest. I really enjoy working with students, and teaching them about topics they've probably never thought of before. I also enjoy getting to explore topics that interest me more deeply. For example, that first class I ever taught, it was intro to computer programming, using python. I had never used python before, but had been meaning to look into it. Let me tell you, the fastest way to learn a new programming language is to need to be able to teach it to some one else. You'd be amazed at how fast you can learn something. It probably helped that I loved programming and was an avid C/C++ fan as well as very much into PHP at the time (I say at the time because after learning python, I stopped using PHP).

So I really enjoyed those aspects of teaching. But what I quickly learned, was there were SO many things that really suck. First, no matter what class I've taught, there are always students who just don't care and don't really want to be there. That makes sense for required classes. Especially, intro to computer programming, which was required by a very wide variety of majors (anthropology, flight management, etc). So yeah, they just keep thinking they're stuck in some dumb class that only computer nerds should be in, why do THEY have to learn programming. I get it. What I was surprised by though, was the number of students who take an elective course, and still don't seem to want to be there. What I started to realize is that even though it's elective, and they selected it over other classes, is that well, it was the ONLY elective they could take. So they were basically in the same boat. They wanted to graduate, it was the only thing left, they didn't want to be there.

The other thing I found that I really, truly hated. Grading! Seriously, it is horrible. Now, I know deep down that it really just is so hard because the classes I've taught aren't black and white. I mean, I could have been hard on the students and just said, no, this submission fails to meet my minimum standards, you don't get any points. But then the class would really be pass/fail and that wouldn't be so good. So you end up TRYING to figure out how to give partial credit. Not enough students turn in 100% working things, where you just look at it, run it or whatever, and go awesome, 100%. Even the best and the brightest students (actually especially those students), seem to not READ assignments fully. They're all like, Oh i know what to do, and just do what they assume I want, and turn it in. So even though they're doing well, well they didn't meet the requirements, so you have to take points off, because you took points off of everyone else, and you have to be fair. Or you start grading, you get part way through, and you realize you need to take points off for the way some student did something, well, so did a few you already graded, so now do you go back and adjust those previous grades? Sometimes it felt like an infinite recursive process.

Oh and then there's the dumb questions. Ok, I know the famous quote, there are no such things as dumb questions. Well, you haven't sat in some of my classes. It's not so much as the question is dumb, but it was asked 3 or 4 times in a row. What happens is, some students take a nap, or play games on their devices, or look up sports scores, or troll facebook. And one student asks a question and I answer it. Then I ask, are there any other questions, which prompts one of the students not paying attention to realize they weren't paying attention and then they ask the same question that was just asked and answered. So, I answer it again. Think everyone got it that time? Nope, some one else who wasn't paying attention then asks the same question. Rinse and repeat. Finally, you get to the student who was apparently paying the least attention, asks the same question again, and at this point, all of the students who were tired of hearing the same thing, and/or thought it was a joke, start laughing.

Don't forget the limited time frame! You get this usually broad area of knowledge you're expected to impart to students, but you only get 15 weeks to do it in, and only 3-4 hours per week. That's absolutely nuts. Now, this isn't completely applicable to all courses. I'm sure many subjects get split up nicely into multiple courses and it works out nicely. But for the classes I've taught, it always seems like a struggle to cover everything. Even something as simple as intro to computer programming. Most students don't even understand simple logic. Some need help grasping the concept of solving a problem using pre-defined steps. These are all things you need a firm grasp on BEFORE you jump into writing code. There really needs to be a class before you learn to program. Like intro to logic and problem solving. You know, after like basic algebra, where they need to start thinking abstractly about solving a math equation. In logic/problem solving, you can do stuff like, use google blockly to develop steps to get out of a maze towards the end of the class, which leads in nicely to more formal intro to programming.

Then, on top of all of that, there is the massive amount of work that goes into a class. There is a reason that instructors put their classes on cruise control after teaching it so many times. It takes an enormous amount of time out side of class to develop all of the material for a class. You're either spending hours developing notes, or creating a project for everyone to do. And then you need to know how to grade the project, so often times you do the project yourself so you know what to expect as far as pitfalls the students may run into, and what to expect your students to accomplish. Then you actually have to grade it all. I swear, this semester I had 25 students. I gave them the simple assignment to edit a file and commit it to git, just to get them familiar. Do you know how long it took to grade just that? All I did, was go down the list, open the link that they posted in the grading system, look to see that they did what was asked, then go back enter a grade and move on. Sounds simple right? Took maybe a minute or two per person. Quick right? Now multiply by 25. Yeah, that was a good half hour or more just to grade the simplest assignment. By the end, grading a single assignment could take from 15 minutes to an hour per student. I was in front of the class about 3 hours a week, but I was probably working on grading or some thing for class an average of a few hours every single day. It really adds up.

That brings me to the last thing I didn't like. The pay. On paper, it seems awesome pay, especially for computer science. If you only look at the in class hours, it's significantly higher than what I get paid in industry. Then you factor in the number of REAL hours you put in, and it's barely minimum wage. For me, it's NOT worth the money. I could put in a fraction of the effort "making a website" and get paid more. It's ridiculous.

But it's not about the money really. I started this journey because I really have a drive to teach. But all of the grading and tediousness just ruined it. I think that it is glaringly obvious, that I'm just not cut out for "traditional" classroom teaching. This focus on grades detracts too much from the actual learning. I'd much rather focus my entire time with the students making sure that they all learn and come away with valuable skills, not trying to figure out what grade they should get. If a student learned everything you wanted to teach them, they move on, if they're struggling, you work more with them. Grades and "semesters" just get in the way.

Looking forward, I just don't see a future where I continue down this path. I think it's time for me to go a different way. I want to still teach, but I think I'm going to look for an alternative environment, one that avoids the distractions of grades and semesters. If all else fails, I may just look into a mentoring program. In any case, I think 10 years was a good run, even if it wasn't continuous. It's time for a change. The only question now is...What's next?