Category Archives: Software

And here comes PowerShell!

DOS Prompt

I love the DOS prompt. I really do. I have books about it, watch videos about it, and teach HCI students about how many of the conventions used in the Graphical User Interface (e.g. cut/copy/paste) are taken from the command line, which were themselves taken from manual conventions used with typewriters (when typists made an error, they would often type the intended word on a separate paper, cut it out with an X-acto knife, and paste it over the mistyped word on the original document).

Although I frequently criticize techy types for being unnecessarily proud of their cult-like, obtuse, user-unfriendly platforms that require deep-dive understandings of underlying technology to get them anywhere close to working (I’m looking at you, FreeNAS and DD-WRT), I have to give the command line credit as it was all we had back then, we didn’t use it for bragging rights, and it worked well enough at the time while requiring some understanding of the underlying machine and software architecture.

However, it appears that the command line is being pushed to the back row. You’ll notice in the image below, which is of my very own Windows 10 Start context menu which appears when right-clicking on the start menu, there is the option for command prompt and command prompt admin.

Win 10 context menu

Win 10 context menu

In the following image, though, taken from a PCWorld post about the most recent Windows 10 Insider Build, Build 14971, you can see that the entries for command prompt are no more, and instead have been replaced with PowerShell.

Windows 10 Power Shell entries

Windows 10 Power Shell entries (credit: PC World)

What is PowerShell you might ask? If you were to just look at it, it might not look all that different from a standard command line. In fact, it IS a command line. However, rather than carrying out one command at a time as is typical with traditional command lines, hence their name, PowerShell allows for a host of capabilities that would be very difficult – although not impossible – via traditional command line commands. It allows for system and network/remote management, as well as scripting functionality supported by the .NET platform. It has many functions, which is also why the name PowerShell is both accurate and misleading.

You see, a shell is a command line. We’ve been using shells forever now, they even have allowed for the authoring of some basic scripts called batches in which a bunch of commands run all at once, but they were also very limited in the universe of the GUI. When a criminal attempts to put malicious code into or onto a system in the hopes it will run, that is often known as shellcode because it provides command-line access to the compromised system (if you’re interested, this is most commonly done through buffer/stack overflow attacks, of which there are many different kinds). Even PowerShell itself has been around for a long time. These types of interfaces have been a staple of computing since the birth of the PC and before.

PowerShell is powerful, and has extensive capabilities that make it as useful as a GUI if you know how it works. Why not just use the GUI? Because a command line interface doesn’t use nearly the resources of a GUI, can run on a low-power system, gives much finer and more focused control than a GUI, and a command line interface won’t crash. You can see that I appreciate the power of the command line, and while I have nothing against PowerShell specifically, I also see it as the end of an era. The DOS prompt was so insanely unintuitive, yet comparatively simple as well; a true paradox. In PowerShell’s defense, here is a screenshot from the carlwebster.com blog showing it running a script that displays firewall rules. And that is just one example of the infinite amount of ways in which it can be used.

PowerShell showing firewall rules

PowerShell showing firewall rules

Apparently ‘Command Prompt’ can be brought back to the context menu through taskbar personalization settings so I may do that when the update finally rolls out, but I also want to give powerShell a chance – I haven’t used it that much but use the command prompt extensively, so who knows, maybe it will all be for the best. I’m approaching it with an open mind, and I’ll post my thoughts here when I’ve had the chance to work with it for a bit.

Happy Fourth of July Weekend!

Freedom!

Happy Fourth of July weekend! I say that even though the Fourth is on Monday. It’s a time for grilling and, if you’re like me and in Las Vegas, getting roasted (that’s not a euphemism) in the blistering sun before it cools down to 100 degrees at night to watch fireworks.

So since the 4th of July is rapidly approaching and you should be out celebrating Freedom and Liberty, I’ll just put up a brief post talking about the technology behind putting together a fireworks display. I’ve posted it the past couple of years and the technology hasn’t changed that much since then. The process is exactly the same.

As you can probably guess, with the spectacular fireworks displays you see every Fourth of July – like the ones we have right here in Las Vegas for the Fourth and New Year’s Eve – sync’d to music as they often are, it requires not just the fireworks themselves but a major amount of computerization and automation to pull everything off. Besides the mechanical triggers and fireworks themselves, there is actually software that is designed solely for the purposes of controlling and synchronizing the firing, timing, and music of the displays.

CueMaker

CueMaker firework controlling / timing software

If you’ve ever used music-editing software such as ProTools or Audacity or anything in-between, or perhaps created a holiday light show right in your own front yard, then you already have an idea of how the software works. You use a timeline to indicate when specific triggers should launch, and if necessary make them in-line with music. It’s pretty nifty.

If you’d like to know more, here is an interesting, interactive explanation of how a firework gets launched. Keeping that in mind, Disney, which puts on some of the most unbelievable fireworks displays I’ve ever seen, developed a method for launching fireworks with compressed air as opposed to gunpowder all the way back in 2004! That’s a good use of technology.

A post from the new phone

Just a couple of posts ago I wrote about how I  was feeling rather melancholy over having finally given up my beloved Windows phone, which I have used for many years and did so with pride. It had served me well, and I actually am still using it for some of its offline functions, but I broke down and finally jumped ship to the Android-powered Galaxy Note 5.

Why am I telling you this if I already told you a couple of posts ago? Along with the vastly improved selection of apps (confession: I’ve been playing Pinball Arcade – almost perfect recreations of actual pinball machines.  Don’t miss out!), I discovered a WordPress app that lets me post from my phone. I can’t imagine I’ll be doing that a lot, but I figured I may as well give it a try. Incidentally, those links should link to the Google Play store which was a test of this platform and my ability to use it, but depending on how you’re reading this they may not work. So be forewarned!

A major change for the site

Disqus Logo

As you can likely tell from the image header, and as this site continues to expand, I have switched the comment system over to the venerable Disqus platform. While I was more than happy with the stock commenting method provided by WordPress, I also was never completely comfortable with people having to login via social media in which they might not be comfortable leaving a comment, or logging in anonymously, in which *I* wouldn’t be comfortable with them leaving a comment.

I have to admit though, WordPress has so far caught 100% of the spam that has been levied against this site, and I can’t argue with those results. I have seen spam get through on many, many sites that use Disqus, and so everything here today is done with the understanding that if Disqus can’t handle the inevitable comment spam that will arrive, or in some other way becomes odious, I may have to switch back to the old way of doing things.

A huge mistake, and disaster averted

Yep

Other than not being a woman, I know just how that lady feels. Today was a bad day, and her expression was my exact expression earlier. You’ll notice over to the right, on the twitter feed, the words “OR DON’T.” That was the header image to a post I had written about two separate attacks this month that targeted remote access software. One attack on June 1st compromised TeamViewer, a program I use myself, and the second, more recent attack targeted GoToMyPC, hence the OR DON’T. Get it? Anyway, both were based on password reuse, so change your passwords if you’re affected. Or even if you’re not.

However after I posted it, I noticed that the LightBox functionality was not working on recent posts. LightBox is the function that causes an image to expand when you click on it while darkening the background. It’s only not working on recent posts, for older posts it works fine. I didn’t know why, and started to investigate.

New ransomware method to worry about

Image Credit: makeuseof.com

(Header image credit: makeuseof.com)

Over on security blog Bleeping Computer, there is a post about a new type of ransomware that presents a triple threat. Known as RAA, what makes this one different is that instead of using an .exe attached to an email which would pop up an alert when a user tried to run it, this one is written entirely in JavaScript, a language often used to encode and provide functionality for web pages, and if a user runs something written in JS it likely would not pop up any alerts, and the damage would be done before you knew it.

This is why we can’t have nice things

The Man

As you can see in my previous post, I have a new PC in the office. This involves logging back in to all my accounts and setting things up just the way I like them, which can take a significant amount of time if you happen to be particular about it, which I am.

One of the things I did was copy my music library over to the second hard drive so i can have access to it here. I don’t use it all that much, I tend to rely on YouTube more often (although I’m not sure why when I have local copies), but that’s how it is.

Anyway, I decided to fire up Groove, a service I have never used before as that is what Windows 10 wanted my music player to be, and as I was scrolling through my list I found the late, great John Denver’s hit “Country Roads, Take Me Home.”

That sounded good, so I fired it up. Except I couldn’t play the song, and Bam! I was hit in the face with why I don’t like digital distribution and have gone so far as to set up my own personal Netflix. To explain what happened, have a look at this picture:

A small update to the site’s functionality (and learn some PHP!)

Comment functionality

There has been so much to write about, however I have been beyond busy especially with the quarter drawing to a close. There is a showcase to plan and schedule for, and industry people will be there so I want my students to shine. From what I’ve seen, they will. On top of that I’m mentoring a group for a business competition and of course there’s the regular teaching, grading, meetings and other stuff that goes on.

Nevertheless, it had been nagging at me that the site’s comment functionality never worked quite right. I’ve been made aware of it before, so why it started to gnaw at me two weeks ago I’m not certain, but it did. What I wanted it to do was give visitors an option of commenting via WordPress login, Facebook, Twitter, or other social media accounts they may prefer rather than having to sign up specifically with WordPress. Normally on a WordPress site there is an option for this, however for whatever reason – and I never understand why WP themes do this – my theme overrode this, forcing visitors to log in through WordPress if they wanted to comment (hence one of the reasons for the dearth of comments). You can see how it should look in the header image. Luckily, the fix was beyond easy, but shows the lengths the theme designer went through to ensure a broken commenting system.

Here’s what I had to do to fix it. You aren’t going to believe it, but here we go:

WordPress uses a file called ‘comments.php’ to provide comment functionality. Here’s what my original comment.php file looked like:

<?php if ( post_password_required() ) { ?>
<p><?php _e( ‘This post is password protected. Enter the password to view any comments.’, ‘themater’ ); ?></p>
<?php return; } ?>

<?php if ( have_comments() ) { ?>
<div id=”comments”>

<h3 id=”comments-title”><?php
printf( _n( ‘One Response to %2$s’, ‘%1$s Responses to %2$s’, get_comments_number(), ‘themater’ ),
number_format_i18n( get_comments_number() ), ‘<em>’ . get_the_title() . ‘</em>’ );
?></h3>

<ol class=”commentlist”>
<?php wp_list_comments(); ?>
</ol>

<?php if ( get_comment_pages_count() > 1 ) { ?>
<div class=”navigation clearfix”>
<div class=”alignleft”><?php previous_comments_link( __( ‘<span class=”meta-nav”>&larr;</span> Older Comments’, ‘themater’ ) ); ?></div>
<div class=”alignright”><?php next_comments_link( __( ‘Newer Comments <span class=”meta-nav”>&rarr;</span>’, ‘themater’ ) ); ?></div>
</div><!– .navigation .clearfix –>
<?php } ?>

</div><!– #comments –>
<?php } ?>

<?php comment_form(); ?>

A lot there, yes? You may be wondering if the comments functionality needs all that PHP, and the answer is no. Actually, it’s because it was all there that the comment functionality was broken in the first place. In fact, to INCREASE the functionality of the comment system and allow people to comment using any social media login they prefer, I had to make the following changes. Be sure to pay very close attention, because the change is subtle and hard to notice; see if you can see it in the new code:

<?php comment_form(); ?>

Did you see it? You may want to read through it again to be sure. I’ll wait.

So there you have it. By deleting the entirety of what was there before and only leaving the final line, full functionality was restored, the attempts at subverting the proper order of things was thwarted, and all is right with the world. Now, anyone who wants to leave a comment can do so in a way that is quick and easy, just like the code that allows it.

Installing VirtualBox and Windows 10 on a Mac

Instructional video time!

I have created a video that walks you through the process of setting up Oracle’s VirtualBox hypervisor on a Mac, and using it to run Windows 10. In a window. On your Mac.

It sounds complicated, but it’s not. I explain it all in the video, however a hypervisor simply allows you to set up logical machines, each of which can run an operating system and act as a separate PC! You can have a machine running Windows, a machine running Linux, and even multiple machines each running a version of an OS (On my Mac, I have a machine running Windows 10, a machine running Windows 7, and a machine running Linux Mint, as you will see).

You can use VirtualBox on any OS, so you don’t have to use it just on  a Mac. If you’ve always wanted to experiment with Linux and find out what the deal is, you can set up a VM and have at it! It’s insanely useful, not terribly difficult to set up, and free, so I encourage you to give it a try.

Links shown in video:

VirtualBox and extensions: https://www.virtualbox.org/

Download Windows 10: https://www.microsoft.com/en-us/software-download/windows10ISO

Not easy to watch, but important

It might even be NSFW, but not for the reasons you think. I’m honestly not sure of a way to introduce this gently, so I’ll just tell you what it is.

Here at UCI, I receive via email a daily digest entitled “UCI in the NEWS.” Whenever a UCI member is cited in a news source, whether local, regional, national, scientific, or other, they are added to the digest and we can find out all the ways the expertise here is being shared with the world.  Usually I skim through it, sometimes clicking the summary link to find out more information.

The one I received today had a a story titled “UC Irvine doctor is live-streaming his colonoscopy.” How could I not watch that? Maybe get a pizza for the experience. Unfortunately, it happened at 8am the same day I received the email, so it was all over.

But you’re in luck! The page on which it was done is still up, and you can still watch the video. and while I’ve had a somewhat snarky attitude towards it thus far in this post, as the page explains it was all done for a very good cause. It provides some statistics about colorectal cancer, the importance of early detection (it can be treated *if* it’s found early), and for people who will need to be having the procedure done on themselves or a loved one soon, it might give you an idea of what to expect. You probably don’t want to know this, but I’ve been through it myself, and as I approach 50 it’s something I will need to be more aware of. It’s not a very pleasant thing, but it is absolutely an important thing, perhaps even a life-saving thing.

I’ve embedded the video below, and it *is* educational and a novel use of livestreaming, but I also really encourage you to visit the page and read about the importance of the procedure. Hopefully it helps some people get more comfortable with what will be an inevitable medical procedure eventually.