get to dah choppa

Today’s post title comes from the Schwarzenegger movie Predator but the dialog has taken on a life of its own in the world of memes.

Get-to-the-choppa

GetToDahChoppa CLI tool

I’ve just completed another program written in the Go language compiler which will take an existing GCODE file for 3D printing and chop it into as many layers as you’d like.

Repository

Color by layer

You might be wondering why you’d like to do such a thing. One of the best reasons I could think of would be to print different colors on the same part. In this part example displayed, black filament is used from layers one through seventeen and white is used from layers eighteen and up. The result looks quite professional even if this is using the lowest quality setting on my printer and it took less than twenty minutes to finish.

DSC_0199

Saving an aborted print

Sometimes things go wrong. In the example below, my (costly) carbon fiber—infused filament spool ran out during the print job, noting that the printer arrived with a faulty run-out switch. For most people, they would just start over on such a part, wasting the plastic and the hours spent and begin again.

IMG_0213

Fortunately, you can now chop your original GCODE file to just print the missing top to save the day (and the part, of course).

IMG_0195

Advertisements

keeping busy

Sorry for what must seem like a brief interruption in posts but I’ve been busy lately. Perhaps three weeks ago I left my job at the pharmaceutical company and I’ve now picked up an evening gig two nights per week at a software coding academy in downtown San Diego, having started on Monday of last week there.

Parts

Of course, I’m continuing to print parts on the 3D printer. I just designed a pencil holder and a coin with the academy’s initials as part of the logo and have printed each as samples.

Software

I’ve recently created some programs and plugins in the 3D printer space.

Tutorials

I created a short fifteen-minute presentation for ES6 Let & Const and presented that on Tuesday evening and I just finished a tutorial on 3D printing for them as well. I’m now an instructor so I’ve been reading through their curriculum to get myself up-to-speed as quickly as possible.

Upgrades

I’m currently working on a pass-through for the Robo C2’s now unused filament holder hole through the back of the printer since the dual-spool upgrade has been so successful.

In conjunction with this is the second-extruder upgrade project as well as another to allow my Nikon D3200 camera’s remote shutter release option to be fired off by the printer itself. As part of this, I’ll be moving the speaker to the outside of the printer so that it can be heard better.

I’m continuing on the final implementation for the dual-filament run-out detection block which wants me to do some soldering.

Food

I’ve had some recent successes making tasty meals. One advantage to working less hours is that you now have the time to make great food instead of relying upon packaged dinners. I’ve made some convincing Indian meals from scratch and without a recipe which is new for me. And when I say “successes” earlier, I guess I mean to say that I’ve created what is to me some of the best food I’ve ever eaten (soup, chowder, chili, spaghetti sauce). I now have perfected mango lassi, another Indian favorite, and the basic smoothie recipe. I’ve learned to buy chicken in bulk and then to cook it in a variety of ways which keep it tender and moist while still ensuring that it’s thoroughly-cooked. I routinely pan-flip what I’m cooking like a pro.

Did I mention that I own a toque blanche and a chef’s uniform? I was fortunate enough to take some seminars at the California Culinary Academy. I would say that sauces and breads would be my specialties… or perhaps apple pie.

I’m now batch-making tea and iced mocha for several day’s consumption because I’m like that. I would be baking things to the extreme but San Diego’s weather has been so hot lately that I avoid the oven now when I can. Perhaps next week will cool down a little for that.

go figure

For years, if I needed to write a computer program, I’d have used one of the following: C, C++ or C#. Those have been the mainstays of programmers who needed an executable program for at least the two decades. Today, though, I’ve just written my first executable in a new language that’s surprisingly easy to work with.

Go

The Go language is like the new kid on the block of compilers. Like the ones mentioned before, it will take text and convert it into instructions the computer can do.

Probably the best thing about the Go language is that it’s entirely open-sourced. If you wanted to work on the compiler itself, you could do so.

SlicingInfo

The program I’ve just written is technically called a Command Line Interface (CLI) program and will display technical details inside the selected GCODE file for a 3D print job.

Repository

Typical session of the program in use:

$ SlicingInfo RC_3DBenchy.gcode
Slicer:          Cura_SteamEngine 2.3.1
Layers:          239
Quality:         low
Profile:         Low Quality Robo C2
Filament size:   1.75
Hotend temp:     190
Bed temp:        0
Supports:        False
Retraction:      True
Jerk:            True
Speed 1st layer: 10
Print speed:     50
Travel speed:    80
Infill pattern:  cubic
Finished.

traveling at the speed of open-source

pull request:  An external-repository modification to someone else’s code which you’d like them to adopt into the master copy of the original repository, specifically the notification request to ask for this.

It’s funny, I put in a pull request in March of this year for a timezone calculation bug which I’d discovered somewhere out there in someone else’s code.  I guess I was trying to be a good net citizen and giving back to the community.  I’d forgotten completely about it until now.  The original author merged my commit into his code yesterday and blessed it, basically.  This would actually be my very first pull request in the world of open source so I suppose that’s special in some way.

In this particular case, it took the author almost three months to see the request and get around to responding to it.  Granted, few of us would be paid to maintain our open-source repositories so they’re usually just considered hobbies for most of us, something we do in our spare time.

As a coder with many decades of experience, this pacing is a bit odd to me.  (As in, “wow, three months to bless a quick-and-dirty code fix”.)

I’m not complaining…  Okay, maybe I’m complaining.  Maybe I was just a bit naive to the average amount of effort people are putting into this.

The entire collective force of open-source is something to behold.  Almost every day some huge effort is being launched and thousands—even millions—of downloads occur from these repositories.  But what happens to the original codebase when the author gets side-tracked with their next great idea?

But what happens to the original codebase when the author gets side-tracked with their next great idea?

The New, New Thing

All this reminds me of the biographical book “The New, New Thing” about a serial-entrepreneur, Jim Clark (of Netscape fame).  The biography doesn’t really paint a pretty picture of the billionaire, instead suggesting that he was perhaps suffering from Attention Deficit Hyperactivity Disorder (ADD) or possibly Hypomania.  He couldn’t focus on a project after the second year, opting to push the work onto others and move to the next project.

I guess I have to ask what part this plays in the world of open-source software.  As an inventive person, I stare at my To-Do list of project ideas and realize that it could be argued that this is some mark of my own internal restlessness.  Could I be content working on one project for year after year?

I’m a former CEO and at one time I did run a software development firm for nine years.  Fortunately, though, I had project after project then to develop so that kept things lively. I’m impressed by those who literally spent most of their lifetime devoted to a single project.

A Lifetime of Service

Dr. Royal Rife comes to mind as one of these people.  He was curing cancer and a variety of diseases back in the 1930 decade but he spent much of his life before this inventing the microscopes and medical device equipment which he would use in the culmination of his life’s achievement.  His original home site is now the location of one of the Scripps hospitals here in San Diego but seemingly nobody knows his story.  He spent a lifetime curing cancer and he isn’t famous for it.

I guess we as a society aren’t really conditioned to reward and remember someone who did one thing very well.  To be famous or respected now, presumably you have to produce project after project, never satisfied with the maintenance of same, always chasing the next big thing.

If You Build It, Own It

I guess my word of caution in the world of open-source then is to own what you’ve built.  Try to revisit it from time to time, like you might keep a plant alive by watering it once in a while.  Do new things, of course.  But don’t forget that your last thing could actually be ticket to your success.

the 21st century digital résumé

It used to be that a programmer’s résumé was a single sheet of onionskin paper (expensive, semi-transparent) with a carefully-selected collection of one’s job history and such. Parts of what you were trying to “sell” to the would-be employer were your wordprocessing and layout design skills.

Now, everyone can type, has access to printers/computers and Microsoft Word. In fact, they can even select an attractive template from the many offered so it’s not like much skill is now involved in those areas. At one time, spellchecking was an activity that involved a Webster’s dictionary. The world has changed.

Github

To be an open-source programmer, you must now have a public set of repositories on github.com or so it seems.  My collection of repositories on github.

jsfiddle

As of today, I now have my very own jsfiddle.net collection. My public dashboard on jsfiddle.

WordPress blog

More and more, programmers are encouraged to be social and outgoing enough to want to communicate to others. Obviously, you’re here already so you have my blog’s address.

Slack

And part of that “being social” requirement now seemingly includes spending a fair amount of time during your life chatting with others within the coding space. Since slack.com projects appear to be project-centric rather than coder-centric, there doesn’t appear to be a way of publicizing your identity outside of a particular team URL.

Website portfolio

And then of course, potential employers want you to highlight several existing website concepts in which you either participated or you directly own them.

why do you contribute to other’s repositories?

I’m interested to hear from other open-source coders out there. I’d like to know some of your motivations for contributing to another person’s or another team’s open-source repository. Call it a social studies experiment, if you will.

1st-Person Open-source

Here, I’m attempting to answer the question for everyone: “Why do you work on your own project in a public way and sharing your source code, knowing full-well that someone may take your code or fork your project and become rich and famous as a result?”

  1. I believe that my project has some worth for others and sharing it could make the world a better place to live in
  2. Other people might help me with my project
  3. A well-rounded github set of repositories looks good on my résumé
  4. I’m not expecting to make money from doing this
  5. Since I don’t live in America, there aren’t as many opportunities so this is my way of getting some attention from potential companies there

Let me know if I’ve missed any motivations here.

2nd/3rd-Person Open-source

This one’s a little trickier for me since I’ve been a life-time coder. In the not-so-distant past I was well-paid for working on software projects and have watched the coding salaries and the availability of programming gigs all erode.

The next question then for everyone: “Why do you work on someone else’s project in a public way, fixing their bugs and adding features, knowing full-well that some else may become rich and famous as a result?”

Case study – Github: Bloomberg reports that they recently brought in another $100M in venture capital based upon the Enterprise-level private repository revenue they’re currently earning. They’re currently valued at US$2B.

  1. I really like the other project’s code (let’s say, the Atom editor), believe in it and want it to be more awesome than it already is; since I use it myself, I’m getting something from the collaboration
  2. I want to work on a big project but I can’t otherwise get a job in a software development company so this is the next best thing; I’m getting the experience working in a software development team
  3. “Many hands make light work”; it feels good to help others; karma; “what comes around, goes around”…
  4. As a new programmer, I don’t have enough experience to start my own project yet
  5. Since I don’t live in America, there aren’t as many opportunities so this is my way of getting some attention from potential companies there; I might get hired by doing this

If I’ve missed any of your own motivations for coding on other people’s/team’s open-source projects, please add a comment here.

Some Thoughts on the Open-source Subject

What’s strange is when you have an entire team of people spread all over the planet, they’re working together on a project started by one guy (let’s say), time goes by, the project goes viral and then suddenly one day that “one guy” gets $250M in venture capital (like in the case of github). It’s valued at US$2B at the moment, btw. That’s about the same value as the New York Times.

I wonder if the investment companies realize that for the average open-source “company” this means that 1) they’re not necessarily incorporated, 2) they probably don’t have an office nor even a business checking account, 3) and anyone can fork the collection of code and start their own Atom-knockoff project if they wanted to.

And what happens to all the people whose free labor went into making github who they are today? Do they get a share of the money? No, they don’t. Do they get a job? Possibly, I suppose it all depends upon that original guy. But at this point, the power has greatly shifted from what it was before (more of a democratic society) to what it is now (more of a capitalistic corporation).

The siren call of open-source is a world which is free from capitalism. But what seems to happen is that these big projects are becoming exactly that, the thing these coders hated in the first place (or so it would seem). Open-source is supposed to be a culture. So why is it turning into nothing more than a first step to becoming a (funded) software development corporation in the end?

how cool is electron?

I’ve been working the past couple of days with Electron, a Node.js cross-platform desktop app tool which uses JavaScript, HTML and CSS to create what look like native OS-style applications for Windows, OS X and Linux.

electron_atomelectron

Cool stuff, indeed. Out-of-the-box, it looks like you publish your Electron-based app like you would anything on github:

git clone https://github.com/Somebody/Repository.git
cd Repository
npm install
npm start

But there’s also a way of downloading OS-specific images and then adding your own app into this subdirectory structure. The result is a stand-alone EXE and folderset which reasonably looks like a drop-in replacement for something you normally would build locally using Microsoft Visual Studio perhaps. In this version though, you’d run Electron.exe but there are instructions on their website for renaming your application, updating the icon’s, etc.

I’ve just used it today to build a basic music player. I wouldn’t say that the layout is as responsive as a typical mobile app’s ability to move content but I did tweak things so that it can squash down to a mini-player and it stills looks great.

mplayer

I can thank KeithIG/museeks for the open-source code behind this. They have several OS-specific downloads available if you don’t want to build this yourself.

Pros

  • This allows you to build cross-platform desktop apps in much the same way that you’d use Adobe PhoneGap, say, to build for mobile apps.
  • You code in the familiar HTML/JavaScript/CSS trilogy of disciplines and it’s Node.js centric. It is also React.js-friendly, as I’m finding on this project.
  • So far, it seems to be well-behaved.
  • If you don’t want others to easily see your code, there’s a step where you can use asar to zip-up everything into a tidy package.
  • I didn’t have to digitally-sign anything like you might have to for a Windows 10 application or for OS X, say.
  • For people who have git and npm, the install is as easy as anything you’ve seen in the open-source space and a familiar workflow.

Cons

  • Currently, I don’t see any support for mobile platforms.
  • The complete foldedset comes in a 216MB which strikes me as a little big for what it’s doing.  The app itself for the music player weighs in at 84MB of this so the remainder is everything that Electron is doing to present all this.
  • You would need to setup three different build sites to maintain a specific download for your own app.  (It’s not like PhoneGap in which you just submit the common code and Adobe builds it in the cloud.)
  • Given that you’re not digitally-signing your code, you might have to talk your users through the hurdles of having the user “trust” the content within their particular OS.
  • This might be so popular soon that none of us can really afford to just use Electron.exe by default to serve up our app; we’ll need to rename it before publishing, in other words.

Overall

I can see myself wanting to really learn this one deeply. It has a lot of potential for delivering a more native-app experience for users.

sexism in the codespace

Lately, there’s been a push to convince girls to learn how to be software developers. Inside these initiatives, the individuals who are part of the movement are attempting to empower people to achieve more with their lives. I would suggest that this is the best part of this new idea.

But what if you pulled back the curtain to reveal that there’s a secret business reason behind all of this outside these initiatives? What if big business is the real driving force here? What could they possibly want out of potentially doubling the workforce within the software development space? Obviously they want what they already have in the clothing industry: sweatshops.

“What could they [big business] possibly want out of potentially doubling the workforce within the software development space? Obviously they want what they already have in the clothing industry: sweatshops.”

sweatshopnoun

A factory, especially in the clothing industry, where manual workers are employed at very low wages for long hours and under poor conditions.

Think about it for a moment. Is Google [US$90B/year] such an Andy Griffith—friendly company that it wants to empower young girls to realize their potential… or does it want more profits?

Simple economics at work

The economics of supply and demand suggest that if you double the supply of software developers then the price for software development projects will reasonably be half. If Google can flood the marketplace with coders then the price for development should plummet as a result.

The following photo is a typical Nike factory. You might ask yourself why all of the factory workers are young girls. Well, they work for a fraction of the cost of their male or older counterparts in the workforce. And given what we know about dominance and submissiveness, young girls will more likely just do what you tell them to do without rebelling (against horrible working conditions, for example).

nike

Sexism

Imagine how you’d feel if suddenly boys and men were being “sold” this idea that they should be coding right now at the same rate that young girls are being advertised to. It would seem weird and creepy, actually. A quick Google search will show you just how many of these girls + coding websites, organizations and meetups have recently been spawned.

A great litmus test for sexism, racism or any “-ism” is to just change out the race and gender, for example. If the result sounds wrong then by definition the original was also wrong for the same reasons.

Examples from actual websites

Here, I make those changeouts to highlight what I’m seeing:

http://www.girlswhocode.com => http://www.boyswhocode.com

http://www.girldevelopit.com => http://www.boydevelopit.com

http://www.blackgirlscode.com => http://www.whiteboyscode.com

If the changed-out version sounds politically-incorrect then the original is by definition just as wrong.

Who to trust

So who do you trust at the end of the day? On one side you have a number of friendly-sounding organizations who seem to be working to make things better for girls and women. On the other side you have a collection of corporations who have a habit of maximizing their profits by using unsustainable working conditions.

Feel free to join the software development field regardless of your gender or race. Just don’t be fooled by big business into working in a coding sweatshop, if you will, because you’re desperate for work and because you lack the confidence that some of your co-workers possess.

ubuntu core on the raspberry pi 3

The fun just never stops here as I begin with a new operating system on a second microSD for my newly-purchased Raspberry Pi 3. This time, it’s Ubuntu Core. This operating system from Ubuntu appears to be a big departure from the Ubuntu server or desktop versions I’m used to. In case you were wondering, I managed to install the new operating system with little trouble. It’s different, though, I’ll be the first to admit it.

Goodbye apt-get, hello snap…

Gone is the usual apt or apt-get interface for fetching code. It’s been replaced completely by snap. Honestly, apt has been the mainstay command for managing Ubuntu (and Linux) for a while now so this is quite the departure from the norm. Snap, in theory, will be a cross-Linux way of deploying code. From my initial research, it appears to be a lot like the Juju Charms for deploying services on a Metal-as-a-Service (MaaS) system. Like Charms, Snaps appear to have an up-stream and down-stream component to them, providers and consumers, if you will.

On the positive side of things, a Snap that you create would work on many different systems. In this way, it works a bit like Java or .net (somewhere, there’s an interpretive layer for the particular hardware but you don’t have to worry about that). Presumably, you mostly just worry about the interface you’re providing and the packaging requirements to create a Snap for submission to the store.

Since Snaps get digitally signed this makes them more like the Apple iTunes store metaphor that Microsoft, Google and everyone else seems to be going with these days. Digitally signing your programs both lowers the risk of rogue/evil code out there but it also puts a middleman into your money stream—someone like Apple will be there to charge the publisher a fee for making money on the store and for signing your developer’s certificate each year. At the moment, Canonical (the maker of Ubuntu) doesn’t charge for a Single-Sign On account but maybe if this becomes popular they will in the future.

Honestly, the entire concept of Snaps appears to be a watered-down clone of Apple’s iTunes distribution model.

Fee Structure for their Store

Not that this information is easily available, I managed to finally find it. From this page on Canonical’s website:

4. Pricing, fees and payment

  1. If you elect to distribute an App without charge, the payment terms of this Agreement will not apply with respect to the free App.

  2. If you set a price for your App we will collect fees from end users that purchase your App at the price you set. Within 30 days of the end of each calendar quarter, we will provide you with a report of the number of copies of each of your Apps sold and the amount of any payment due, which shall be the fee multiplied by the number of copies sold less any applicable taxes and our commission. Our commission is 20% of the total fees charged for the sale of your App, less any applicable taxes.

So they’re charging 20% commission for brokering your Snap. Compare this to Google’s flat 30% commission, Apple’s flat 30% commission plus $100/year developer license and Microsoft’s 30% commission plus $49/year developer license. Note that there are precious few Snaps available. Specifically, only one Snap has a price of $1 at this time and the remaining 547 are free. So until others are charging for their Snaps, don’t expect to make a dime selling yours, in other words. In a free world, nobody will open their wallet nor expect to.

The Future of Snaps

It’s difficult to say whether this entire concept will get traction. Linux has been the free alternative. The people who run Ubuntu, for example, like that aspect about the community. Will these people easily change their stripes and embrace a payment system in the future in which we pay for code? Remember, we’re talking about people who’d rather build from source instead of paying for a binary file. My gut tells me that they’re never going to go for it.

Should I Invest Time in Developing Snaps?

As a developer, having a variety of experience looks good on your résumé so yes, by all means, develop a Snap. And since we developers often communicate our value via our github page I’d suggest that these Snaps be free and open-source if possible.

kloudspeaker

In my quest for recycling old Dell Vostro 200 computers here at work I’ve recently had the pleasure of creating a document management system using the open-sourced Kloudspeaker software. It appears to be a mature project and installs easily.

It’s important to read through the documentation. Out-of-the-box it doesn’t do file uploads, for example, but the configuration may be modified to do so. And I found an issue with files larger than 2MB which again was fixed by reading the docs. It helps to have some reasonable system experience on your UNIX server because some of these issues are dealt with outside of the Kloudspeaker software’s configuration itself.

kloudspeaker_login

The interface is attractive throughout.  The upper menu is responsive to changes in window size, buttons (like Upload) will optionally appear if the feature is turned on and if the user has the correct rights.  Overall it just seems to work without problems.

kloudspeaker_documents.png

Typical Cost of a Document Management System

From the webpage How Much Does a Document Management System Cost?

“[For a cloud-based system] …you should expect to invest between $20 and $50 per person per month, with the major variable being the level of service you subscribe to.

“[For an on-premised system] To start, you’ll have an up-front charge for your server and desktop licensing. This licensing tends run between $350 and $500 per person on average. Depending upon which features you sign up for, you’ll need to purchase the appropriate number of servers at the average rate of $5,000 to $6,000 per device. Ongoing support and maintenance will take the form of an annual per person fee, which will typically cost you around $40 per seat.”

Installation

Below is the list of things I needed to do to get the server running. I managed to do all of this in just under two hours. It then took me another two hours of finding over 300 contracts so that I could upload them into the system.  All-in-all, that’s not bad (four hours’ labor + $0.00) for an excellent document management system that could have cost a lot of money!

  1. Boot from a (free) GParted disc on a Dell Vostro 200 computer to remove any existing partitions
  2. In BIOS, set the computer so that it will run without a keyboard without stopping during POST
  3. Boot from a (free) Ubuntu disc and install it as a server
    1. Choose server install
    2. Use entire disk with LVM
    3. Install GRUB
    4. Install OpenSSH server and LAMP
  4. Edit the /etc/network/interfaces file to give the server a static IP address
  5. Edit the /etc/apache2/apache2.conf file to give the webserver its name
  6. Create a CNAME record in my DNS server of contracts for this Intranet server
  7. Run sudo apt-get update, sudo apt-get upgrade and sudo do-release-upgrade to make sure that I’m using the latest software
  8. Run sudo apt-get install unzip to install this necessary software
  9. To pull the latest zip file from their website, in my home directory run the command  wget http://www.kloudspeaker.com/download/latest.php, run unzip to expand the file structure and then copy this recursively to the /var/www/html area under a kloudspeaker folder name, remembering to use the -a option for the sudo cp command to get hidden files as well
  10. Log into MySQL as the root user with mysql -u root -p and then from this console, run create database kloudspeaker; and then run exit; to come out of the MySQL client
  11. Edit the /var/www/html/loudspeaker/backend/configuration.php file, setting the appropriate database credentials for the newly-created kloudspeaker database, as well as adding "EventLogging" => array() to the list of plugins
  12. Edit the /etc/apache2/sites-available/000-default.conf configuration file to change the DocumentRoot to /var/www/html/kloudspeaker
  13. From another computer, visit the http://contracts/backend/install link to start their installation, verifying the database credentials and next, creating an administrative user for the software
  14. Back in a terminal, manually create a folder at the root with sudo mkdir /files and subfolders below this to hold each subgroup
  15. Run sudo chown -R www-data:www-data /files to make sure that the Apache service user can control the files uploaded into the system
  16. Edit /etc/php/7.0/apache2/php.ini to add these two lines: upload_max_filesize = 40M and post_max_size = 40M
  17. Run sudo apt-get update and sudo apt-get upgrade again to verify that your system is up-to-date after bringing in software
  18. Again from another computer, log into the website interface, creating users, groups, adjusting the access rights to the folders you’ve defined, making sure to test as a non-administrator user to verify the results
  19. Shut down the Ubuntu server, remove all peripherals and put the computer into the server room with only Ethernet cable and power cord connections, turning it back on

Using Kloudspeaker

Now that everything’s installed and setup, you add the user accounts for the people who also need access. You use their email address so it will invite them to create their own passwords.

I’m very pleased with the way this has turned out and how little effort was required to get it going. I’d highly recommend this software for businesses.