Pages

Tuesday, March 31, 2020

Coding on Windows with Linux

Windows Subsystem for Linux is cool as cool can be. That is putting it mildly. I know not everyone will agree but bear with me. Hopefully my enthusiasm for this system is catching.

Code showing path
Code showing Linux path
I have separate laptops for Windows and Linux development. I spend more time in Windows than I care to admit. I haven’t needed to really merge the two before. But the need evolved in a subtle way.

GitHub has an interesting repository that I forked to use for myself. Chuck Groom’s One Page Bio “is an example one-pager site that prospective job-seekers can use to quickly highlight their accomplishments and make an introduction”. Very interesting example of an online bio. And I decided to use it.

Digging into the codebase I came across a few things I was not familiar with and some I had heard of but have no experience with. The long and short of it is I needed to familiarize myself with Jekyll and the fact that it is a Ruby Gem. Not part of my toolset so looking into installation there was an indication that there could be issues running on windows at times.

So why not use Linux? A quick look for Linux on Windows pulls up some options. And here is where the Windows Subsystem for Linux co mes into play. Another one of those things I had seen before but not tried. Used to have Linux installed in it’s own partition and I have used live CD/DVD versions before.

But the WSL looked like just the right thing. Easy install. And it is just as easy to remove. So why not?

Installed WSL. Started using it. Installing software just like any other Linux package. I even has a choice of Linux distributions so went with the old tried and true Ubuntu. It all worked like a charm.

Went ahead and installed Ruby and Jekyll. Then went through the whole 12-step Jekyll tutorial. Great little tutorial. Walks one through setting up a blog all the way to deployment. Easy to use, easy to learn, easy to understand. Can’t wait to try on a project of my own.

Which is interesting. I ended up using some of what I just learned going through the GitHub Learning Lab course on GitHub Pages Training. GitHub Pages uses Jekyll. Who would’ve thunk it?

So, back to the focus of this article. VS Code for an editor on Linux. I had heard it was available and I needed something more comprehensive than Nano. Upon looking for a version of Code for Ubuntu Linux I found references to using VS Code with the Windows Subsystem for Linux. Not quite what I wanted. Or was it?

The Windows Subsystem for Linux is a command line only system. No GUI available. Good enough for coding but not for a GUI based code editor. Which leaves out VS Code. At least for running directly on the Linux system.

But the WSL integrates well with the hosting Windows system. Drives are mounted such as the C hard drive which is available at /mnt/c. Easy enough to copy files to or from while using the Linux system.

Here comes the great part. With VS Code on your windows system, it will detect the WSL installation. So start up your VS Code app. And it should give you the option to install the Remote - WSL extension. If you don’t see this option, you may have to look for it.

Remote WSL extension

There is also an option for connecting with extensions for Python, SSH, and Containers. Would you like to see a step-by-step on installing the WSL and connecting to VS Code? Let me know with a comment.

Finally, I found this to be a very usable system. VS Code can be started from inside of your Linux system. And you are able to access the Windows file system and your Linux file system from within VS Code. Will be giving it a workout.

Links:




Friday, December 13, 2019

Easy Python Web App Creation with Web2Py


There are a lot of ways to create a web based application in Python. I have tried quite a few out and my number one pick is Web2Py. It has all of the bells and whistles already built in. You can start out with a simple scaffolding app that is ready to run and modify it to learn how the system works.

You don't have to be a programmer or web developer to use Web2Py. You will just be ahead of the game a bit if you know some Python and/or some web technologies. Web2Py is a "free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications".

The Web2Py web page is easy to navigate and very comprehensive. Everything you need to learn to use this framework is available from their front page. There are plenty of examples, tutorials, and a very comprehensive manual available.

Everything you need to build a simple web app up to an enterprise level system is built in. As they state, everything you need and "batteries included". Web2Py even includes a web based IDE along with an SQL database system. And one Web2Py instance can run multiple web apps.

Getting started is fairly easy. There are binary packages available for Mac and Windows systems that are ready to run. They even included a web server and Python 2.7.

For those with a little more familiarity with web systems just download the source code and install to your web server. You will need Python installed. You can choose Python 2.7 or 3.5+. It really is an easy to setup and run framework.

If you would like to have it available online and not installed on your own system, check out PythonAnywhere. It is a very easy to use system to host and run your own python code in the cloud. For a quick tryout of Web2Py and PythonAnywhere, try out their PythonAnywhere/Web2Py sampler wizard.

Web2Py really is a quick and easy way to get started with web app development using Python. I'm thinking of doing an article on setting up Python and Web2Py on a XAMPP development system. If you are interested, please leave a note.

I could also do articles on Progressive Web Apps with Web2Py and setting up your Python development environment on PythonAnywhere. Please let me know if you are interested by leaving a note.

Note: PythonAnywhere is a great system for teachers who are teaching Python programming.

Tuesday, April 23, 2013

Dan's Computer Tip #3: Spybot Search and Destroy


3D Spybot2.0 StartCenter2 300x271 Spybot 2 now available.

Spybot Search and Destroy is one of my favorite programs of all time. Like many of you, I spend an inordinate amount of time on the internet. Mostly researching, but I do plenty of surfing and socializing too. The biggest problem is all of the spyware that is out there. All trying to track your every move and report back to the mother ship.
This isn't all necessarily bad. Relevant ads are better than stuff you will never need. Or ever want to see. But the tracking cookies and other spyware the various sites you visit place on your system don't always play nice.

Spyware being installed on your system can cause your system to slow way down. I myself don't understand how I can garnish dozens of tracking cookies and hundreds of temporary files from a simple session where I only visited a handful of sites. I am wondering if a substantial number of  these are coming from my Google searches.

I might should start surfing anonymously and maybe look into some of the alternative search engines. I have just become accustomed to using Google for most of my research. Luckily I have Spybot S&D to help me keep all of this chaos in check.

A good antivirus program should keep your system relatively free of infections, no one program can protect you against everything. Spybot S&D helps keep certain malware at bay. Even if your antivirus system is performing more than adequately most antivirus systems ignore tracking cookies and certain other spyware. That is why I use and recommend Spybot S&D to everyone.

Spybot Search & Destroy is part of my triumvirate of must have programs on every Windows computer. The other two of course are the subjects of my first two tips. See my posts on Cleaning Your System and Microsoft Security Essentials for antivirus. I can't see operating a windows system without these three and put all three on the top of my list of recommendations.

 For instructions on how to install and use Spybot Search & Destroy, check out these links:



For additional information on Spybot Search & Destroy, check out these links:




How to Setup a Portable C++ Development System

Here is a quick and easy setup for a Portable C++ development system. Great for school or just to play around with. Enjoy!


Portable C++ Development System slide show.

This presentation was put together to help out a professor friend at a local state college. The development system works great from a USB drive. Hope her students all enjoy.

Portable C++ Development System

Friday, April 19, 2013

Dan's Computer Tip #2: Antivirus

An antivirus system on your computer is a necessity. And these days you may also want one on your smart phone. There is such a wide variety to choose from that picking one can be a real chore. My recommendations these days is to use the Microsoft Security Essentials.

Why? Well price is one consideration. It's free. Another good reason is that it works. And finally, it has a small footprint and doesn't utilize a lot of system resources.

Microsoft Security Essentials
Microsoft Security Essentials
What does this mean for us? How about being small, quick, and not slowing down the computer system. I like that. And the fact that it works against most forms of malware (malicious software) to include computer viruses, spyware, trojans, and rootkits.

Now of course being from Microsoft, Security Essentials is designed for the Windows platform. And only works on the newer versions of Windows starting with XP and going up to Windows 7. It does not operate on the new Windows 8 though.

Microsoft Security Essentials replaces the older Microsoft Defender. Until you get to Windows 8 where Microsoft has resurrected Microsoft Defender as an integrated antivirus product. The original Microsoft Defender was engineered to work against adware and spyware. The AV system for Windows 8 is to be a full antimalware suite.

So to sum it up, the reasons I use and recommend the Microsoft Security Essentials is that it integrates with your Windows system, it is free, and it does a fairly good job of keeping your system free of infections.

Now no one single antivirus program works against everything but Microsoft Security Essentials does a fairly good job. And the system integration helps it load sooner than others normally would and it generally is much faster in operation.

Here we are at Tip#2. Tip#1 was about cleaning your PC and Tip#3 will be about removing and immunizing against spyware. Stay tuned.

Microsoft Security Essentials
Wikipedia on Microsoft Security Essentials

Wednesday, April 17, 2013

Dan's Computer Tip #1: Cleaning Your System

CCleaner Screenshot
I run this everyday.

One of the largest complaints I hear about someone's computer is the speed. Seems no one is ever satisfied with the speed of their devices, especially their automobiles. There are a number of things that can slow down a once speedy system. The one quickest thing a person can do to make their computer system more responsive is to clean it.
I am not talking about a physical cleaning though that is important enough and we will come back to it. What really needs to be done is to keep the file system clean. This can be done in a Windows machine by using the Disk Cleanup utility. Check with the included system documentation to find the correct procedure for the version of Windows operating on the machine in question.
Windows Disk Cleanup utility icon
Disk Cleanup

For most versions of Windows just follow this command path: Start >> All Programs >> Accessories >> System Tools >> Disk Cleanup. By following along with the defaults the cleaning procedure shouldn't be any problem. The person who has difficulties with this may want to consult with a professional or at least with someone more comfortable with their computer system.

For my money,  I prefer to use the CCleaner utility from the Piriform company. It is an amazing little utility. Not only will it clean the Windows system of the temporary files that end up accumulating and slowing down the system, it digs deeper than the Windows Disk Cleanup utility for a more thorough cleaning.

CCleaner utility icon
CCleaner by Piriform
CCleaner also has an option for cleaning up the System Registry along with other utilities such as an Uninstall Tool, Startup Tool, and System Restore tool. These utilities do just what their names suggest. For additional information take a look at the CCleaner Screenshots as well as the CCleaner Help page.

So my recommendation to all of my friends, family, and clients is to install CCleaner and use it on a regular basis. With all of the plugins and tracking by the browsers themselves I usually start off my day with a good system cleaning. Hope this helps.

Another cleaning that needs to be performed on an annual or semi-annual basis is a physical cleaning. With all of the fans and vent ports on a typical PC dust gets pulled into a system and is deposited over the components. Removing the case cover and using compressed air to remove this collection of dust will extend the life of the machine. Upon last check, most manufacturers were recommending a twice a year cleaning.

For those who are uncomfortable opening their computer case, seeking the assistance of a qualified technician is advised. It is possible to remove some of the accumulated dust by directing compressed air through the fan ports and vents. But a more thorough cleaning is recommended and will require opening the case.

There are other techniques for speeding up a personal computer that can be addressed at another time. A system cleaning should help the majority of users with their systems. Have a good day and enjoy a speedier system. See you all later.

About Dang Time

Good pic of Dan Carroll
Dan looking professional
"Procrastination kills!" Have you heard that one before? Well I have. How about "Procrastination is the assassination of motivation"? Catchy? Maybe.

Anyway, this should be a "Welcome to My New Blog" post. Instead I am writing about procrastination. Why? Probably because it has taken me so long to get started on this one. And my other blogs are suffering from "writer's block" also.

This blog has been at the back of my mind, and forefront at times, for quite some time now. The ideal title would have been something like "Dan's Tech Tips" but that is so mundane (Boring!). The idea here is for me to write about technology I find interesting. Or at least write about topics relating to my current projects.

I am always "up to something" so by writing about my current projects I should never run out of topics to share with you all. Well let's see how that goes. And I was thinking about a good ole Q & A (questions and answers) covering technology; specifically computers.

I am "into" technology. Read that as "I love technology". But not just for technology's sake. Its just so cool what people have been able to imagine and then create. I love making things that are useful. Even if its just an item that I will be using and nobody else.

You have to admit though that sharing is cool. Especially if you are sharing one of your creations. Physical items are great but isn't it neat being able to create something with your mind that solves a problem or saves time? That is why I enjoy software creation. Write it and run it. So cool.

Well, this post is longer than it needs to be. I will have to write more "About Me" at another time. And the Q&A section will be next. Back to procrastinating.

There are many reasons for procrastination. For some of us, we just think too much. And want things to be perfect. Even before we actually get started on them. Well, I finally learned an important lesson. Good enough is good enough. In other words, just do it.

Things don't have to be perfect the first time around. There is always time to improve them later. And if not, at least you did something. Got it out there. So again, "Just Do It!"

WARNING: If you are designing or building something that has the potential for great harm to others. Then ignore my bit about not being perfect. Please be perfect. Especially if you are designing or building a nuclear power plant or bridge or ... You know what I mean. I do not look forward to glowing in the dark. Hard to sleep that way. So make sure your nuclear power plant is Perfect.

Thank you and you all have a grand day. Later now. ~ Dan Carroll