It’s Halloween night.

The wind is howling and the rain is pounding. I can hear it on the roof of my secret laboratory, I mean work shop. It is not a great night for Trick or Treating, but perfect for watching some classic monster movies from the 1930’s and 40’s. Think Boris Karloff or Bela Lugosi. Perfect movies to have playing in the background on such a night as this. On Halloween a pizza (preferably a garlic pizza) is traditionally a good option, or just a good cup of coffee to warm you up near a cozy fire. It’s a spooky night for sure. My work shop is dry and well lit, but I do keep one eye on the door just in case I hear it creaking open or the wind catches it. No walking dead zombies to worry about here I hope, unless you’re referring to the latest Windows 10 updates. I haven’t even bothered with the latest updates. I use Linux and Chromebook laptops. I’m not afraid of the dark, but I certainly don’t need to spend all my quality time messing around with incremental updates to turn on hidden features already installed from a previous update. Most people don’t need to spend so much time fixing things when they could be spending that time being productive. For most users, if all you need is a web browser, media player, office suite, and email, then a Chromebook is perfect. Because they are less expensive, have a faster on time, and have built in basic security needs, chromebooks are not a bad alternative to an iPad, and usually cost much less. If you like to tinker around with your operating system, do some programming, and consider yourself somewhat of an amateur Dr Frankenstein in your laboratory, then maybe Linux is more your style. If you want ease of use, then a iPad could be a solution. Windows 10 has a lot of cool features, and is a very good operating system for the majority of users, but why follow the majority? Sometimes doing things a little different isn’t so bad. Those who play lots of video games tend to migrate to Windows 10, as do many large corporate businesses for their workforce, but not all businesses do that. Chromebooks and Apple devices appear to simplify maintenance and application collaboration for some groups. Providing a intuitive and simplified user experience can lead to faster and more productive output from end users. When it comes to content creation such as audio or video, MacBooks are quite nice. You pay a little more for such a “nice” solution, but sometimes it’s well worth it. Now it’s pouring out. If my Chromebook gets soaked from the rain, it’s not as big a deal as if I get a MacBook Pro wet in this crazy weather. Imagine the cost difference between deploying Chromebooks vs business class laptops with some type of in-house desktop support. Of course you can all work online from anywhere even an old foggy cemetery if there is Internet access via a VPN. You should be able to simplify your network and server infrastructure by leveraging cloud based services. If you’re a small shop, say only a mad scientist and an assistant, think simple and cost efficiently, think less wasteful and more productivity. My only hang up with Chromebooks is the lack of support for some network troubleshooting tools like tcpdump, or Wireshark. In some cases that could be a deal breaker if the operating system you choose doesn’t support the software tools you need to rely on to get any meaningful work done. No sense dealing with ghosts of old licensing past for any out of date software either. There’s some very good open source alternatives that give some propriety software a run for their mummy…or I mean money. If you’re upgrading from Windows 7 to Windows 10 you might need to buy new software and new licenses for that software. Maybe this is a good time to do a reassessment of the cost of upgrading hardware and software and look for some more efficient solutions. The world of work is changing rapidly and that can be scary enough to make your blood run warm. If you take the wrong turn you could be wondering deeper and deeper into the very scary woods.

Have a Happy Halloween!

Getting Weirder out there

Yes, things are getting crazy out there. If you watch the news you see a lot of strange things that really seem too weird to be true, but apparently this is the new normal. When news shifts from information to opinion, reliability suffers. I have nothing against expressing opinions, but presenting one’s opinion as the only truth is irresponsible. I have my point of view, but you may have an opposing or different one. That is totally understandable and deserves appreciation.

We all may have a slightly different view of the world. Computers on the other hand may have a predetermined processing of the world based on their programming, information availability, and potentially skewed processing algorithms. This doesn’t disqualify a machine’s ability to formulate an accurate composite of reality, it may actually substantiate it.The world may weigh heavily on emotion (good or bad) but emotion is not always supported by reality, rather the perception of reality which can often hinge on propaganda.It all boils down to the quality and accuracy of information. “Garbage in = Garbage out” is the weakness of media. More information does not always distill down to better information – which is a modest assertion of surveillance. More information could simply distill down into more garbage.Quality should not dilute for quantity, but it does appear that way at times.When errors become acceptable and mistakes negotiable, we have more than likely dumbed down our program with bad code. As with any bad code, you don’t always spot the faults unless you look for them.

How to rename columns in r

Rename Columns | R

Often data you’re working with has abstract column names, such as (x1, x2, x3…). Typically, the first step I take when renaming columns with r is opening my web browser. 

For some reason no matter the amount of times doing this it’s just one of those things. (Hoping that writing about it will change that)

The dataset cars is data from the 1920s on “Speed and Stopping Distances of Cars”. There is only 2 columns shown below.

colnames(datasets::cars)
[1] "speed" "dist" 

If we wanted to rename the column “dist” to make it easier to know what the data is/means we can do so in a few different ways.

Using dplyr:

cars %>% 
  rename("Stopping Distance (ft)" = dist) %>% 
  colnames()

[1] "speed"             "Stopping Distance (ft)"
cars %>%
  rename("Stopping Distance (ft)" = dist, "Speed (mph)" = speed) %>%
  colnames()

[1] "Speed (mph)"            "Stopping Distance (ft)"

Using Base r:

colnames(cars)[2] <-"Stopping Distance (ft)"

[1] "speed"                  "Stopping Distance (ft)"

colnames(cars)[1:2] <-c("Speed (mph)","Stopping Distance (ft)")

[1] "Speed (mph)"            "Stopping Distance (ft)"

Using GREP:

colnames(cars)[grep("dist", colnames(cars))] <-"Stopping Distance (ft)"

"speed"                  "Stopping Distance (ft)"
desk

“If You’re Gonna Die”

“Die with your boots on.”

Yep, it’s a perfect night for some Iron Maiden. Crank up the Marshall and work with some good tunes blasting. With a desktop showing Meatloaf’s iconic Bat Out of Hell album cover on my latest Lenovo 110S incarnation running Mint Desktop: Xfce 4.12.3 tk: Gtk 2.24.31 wm: xfwm4 dm: LightDM Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic

I’ve been running MX 18 on my daily driver, but decided to give the latest Mint spin a try. I’ve used Mint quit a lot over the last few years. I usually recommend it to anyone looking for a nice alternative to a Windows 10 upgrade from Win 7.

Basically the 110S ideapad feels like a cheap plastic lightweight netbook, but amazingly enough it still works well when running Linux – not super useful running Win 10, but it will run the latest MS OS. It runs well with Mint and supports Chrome, so it actually does more than my Chromebook. If I kill this machine, at least I will have gotten a lot out of it – no regrets. If you haven’t tried Linux yet on a old or budget laptop you don’t know what your missing. Put Nena’s ’99 Luftballons’ on your loudest boombox and get cracking. If this is Pumpkin Spice Latte season, then it’s probably a good night for playing around with Linux.

Say what you will about other operating systems, but you can’t kill Linux – it’s here to stay! All the promises made by the two mainstream choices always feel empty, while Linux leaves it up to you to make it or break it.

The more you practice the better you usually get. Everything takes time, but each step you take will get you farther down the road to someplace that can often be amazing. Just exploring a Linux distribution or even just installing an operating system is an opportunity to learn something new and strengthen what you already know.

I still view all computer work as a bit of alchemy and magic. As you learn more about your computer and what it can or can’t do – you either learn to fear the dark, or see through the shadows.

Now for some Post Malone (with Ozzy) “Take what you want” as loud as this thing will go – all the way up to 11. What a perfect tune to end with.

desk

Linux Proactive VS Reactive

Don’t get yourself in a situation where you spend most of your time doing damage control after problems become unavoidable. Running around putting out fires is usually unproductive beyond temporary patches and band-aids. Use your system to keep watch on issues that may arise from resource limitations, application errors, and the health of the system it’self.

A good approach may be to develop a daily procedure for daily system checks. A good place to start is with log files. Logs can be collected from multiple locations within your system. You should have a process to review the logs and to analyze what these logs are providing for clues to the health and security of your system. Some of the available information you may access and retain for further review or documentation.

Logs can provide insight into configuration issues, buggy software, and your system’s security. They can also provide you with hardware and resource status.

Even if you have automated your system checks, log alarming, and/or use centralized logging via a dedicated monitoring application, it is useful to understand how to manually retrieve and analyze some of this information.

If I want to see what tools/commands are available on a Linux system check the /usr/bin/ directory. This will show you what executables are available on the system you are working with.

For a quick error check through the log files located in the /var/log/ directory use:

sudo grep error /var/log/*.log | less

This will show all the plain text with the word “error”,

Also replace “error” with “fail” and remove “less”

$ sudo grep fail /var/log/*.log

If your system is running systmd then the “journalctl” command will print the messages logged.

sudo journalctl | grep error

Don’t limit yourself to only looking for obvious errors noted in the text messages.

syslog also contains a lot of useful clues that you can filter by keywords associated with severity levels:

emerg – alert – crit – err – warning – notice – info – debug.

below simply filter for the keyword “warning’ to look for warning messages.

/var/log$ cat syslog | grep warning

Your system most likely has a lot of logs that you can review, and usually there is a graphical program or programs to check logs and system resources.

combine checking your logs with checking real time resources. You have tools such as “top”, “du”, “free”, “netstat”, “ping”, “ifconfig”,”lsof”, and the usually very interesting “uptime” and “who” that compliment your log file checks that you can do manually to gauge how your system is functioning.

Memory, CPU, Network, and application logs can be useful for a proactive approach to maintaining the health of your system and application functions. If you have a system for monitoring everything, than make sure you monitor the monitoring application.

There are a lot of tools and resources to keep ahead of issues that could at some point create a lot of problems and even system failures.

%d bloggers like this: