Network Manager Not Found after Minimal Install with Ubuntu

I got an old laptop from my, non blood related, auntie, Asus EeePC with good old Atom CPU and 1 GB of ram. I may or may not upgrade the ram to 4 GB and the drive, currently SATA, to SSD. To get the most out of it, would have no other choice but to go lean, super lean. I went with Lubuntu Minimal Install and nothing else. The installation was pretty straight forward, the main problem comes when I could not connect to the internet… How am I going to laugh at Patriotic American bashing at the Declaration of Independence!?

The ethonet connection and wireless connection were there, but network-manager was not found. Thankfully, ifconfig is here to save the day.

  1. Enter ifconfig on the terminal to see which network connections are available.
  2. Enter sudo ifconfig <cxn_name> up to open the connection.
  3. Then enter sudo dhclient <cxn_name> to kick off the protocol.
  4. If you want to connect via wifi, you would
  5. Otherwise, check your connection by pinging yahoo or google.
  6. To simplify your life in the future, download network-manager-gnome (network-manager should come with it) by sudo apt-get install network-manager-gnome
  7. Run Network Manager by entering sudo service network-manager restart and sudo service networking start
  8. Enter nm-applet to start the Network Manager
  9. I’d also suggest you to download sudo apt-get install software-properties-common for other goodies, e.g. I downloaded midori

Now have fun with the internet!

Reference:

  1. https://askubuntu.com/questions/422928/how-to-reinstall-network-manager-without-internet-access
  2. https://askubuntu.com/questions/652401/i-accidentally-deleted-the-network-manager-and-dont-have-access-to-internet-any

Stack Setup

I will be doing quite a bit of coding, especially in machine learning, so it would be a good place for me to blog what I believe would be the most basic setup for someone to get started on a fresh computer.

Additional Setup Step for Mac

My computer is a Mac, so there is one more step! Homebrew!! (Or use the code below in your terminal)

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

After installing homebrew, just use brew to install Git, Sublime, and everything else.

Basic Installs

Before you even decide on what stack you would want to go with (Given that you have very little to no programming experience.) I think you should get the following:

  1. Github (Or equivalence such as Bitbucket.)
  2. Sublime [1] (Or equivalence such as Atom or VSCode.)
    • Vim doesn’t count.
  3. Postgres (Or equivalence such as MySQL or MongoDB.)

Now on to the language of your choice! I went with Python3 and JavaScript. Anything after this would be whatever you want! (AKA building your OWN stack.)

The next thing is to link your ~/.bashrc with your ~/.bash_profile so you could just update one main bash file for all of your custom commands in case you have to access both login and non-login terminal on your Mac.

To make your life easier, you may also want to add

subl

as a command to launch sublime with this tutorial.

Lastly, SSH! If you want a more secure way to communicate with a server without typing in password. 🙂

Python Customization

If you are new to Python, I suggest you go straight into Python 3. Here is a pretty good intro on what you’d need for the setup. I’ve also installed some of the sublime plugins following this tutorial and this post, however, YMMV. If you are coding in Python 2, DON’T remove the pre-installed python and install python via brew. [2]

Reference
  1. https://www.codementor.io/mattgoldspink/best-text-editor-atom-sublime-vim-visual-studio-code-du10872i7
  2. http://docs.python-guide.org/en/latest/starting/install/osx/

Product Support Engineer Interview

I recently received an email to interview for a position in Product Support Engineering at an eCommerce company. While I am trained as an Electrical Engineer and have been coding professionally since November 2015, I still consider myself as a novice when it comes to Software Engineering.

Honestly, the only thing here is my lack of experience… Adding up all of my experience point, I have about 2 years on Git and Object-Oriented Programming. I have virtually ZERO experience with C# and Powershell. I am also not too familiar with TSQL. I checked the manager’s LinkedIn profile, I saw that he specifically listed ASP.NET MVC eCommerce Platfom, Multithread C# client-integration, T-SQL, and Powershell…

Here is an insert directly copied from the job posting:

Qualifications

  • 3-5 years of object-oriented software development. C# experience is a plus.
  • Solid understanding of SQL and database fundamentals. T-SQL experience is a plus.

Additional Desirable Skills

  • Familiarity with Powershell.
  • Experience with writing a debugging front-end javascript code.
  • Knowledge of HTML, CSS.
  • Experience with git or other version control systems.

That being said, at the time of this posting, I have about less than 24 hours (Including sleep  and other activities…) to figure these out. In short, this post, to be published AFTER the interview, will be a note for me as I learn and review all of these materials. Let’s start with the easy ones…

T-SQL

T-SQL (T for transact) is a SQL extension used to interact with Microsoft relational databases. T-SQL adds procedural programming(), local variable, various support functions for string processing, data processing, mathematics, etc. and changes to the DELETE and UPDATE statements.

Example:

DECLARE @local_variable VARCHAR(500)

SET @local_variable = ‘local variable name’

SELECT @local_variable = Name…

If you have prior programming experience, such as using Python and psycopg2 to build ETL script, this may essentially save you 15% or more on data processing time based on the way you write your SQL.

PowerShell

Of course, why would you go to the official site for a quick and dirty explanation of what it is? Thank you to the extremely detailed description on wiki, I did what any programmer would… I visited StockOverflow for an even more simplified explanation. In which, from what I could understand… PowerShell is essentially the Microsoft vision of *nix shell, with the key difference as the I/O being a .NET object instead of text. Given that, instead of using text parsing functions as you would in Shell, you would use methods of .NET objects.

 

Post Interview thought

It was not technical AT ALL! I think I answered most of the questions pretty well. Nevertheless, there was one particular answer I wish I could have answered better. The Hiring Manager asked me what attracted me to this listing. I responded saying that I believe the qualifies it mentioned match with me really well despite there maybe some lack of experience in the C# department. His response was simply… “Interesting.” I couldn’t tell if it was his beard or his poke face, I was NOT able to read him as all… Other than that, the overall experience was pleasant.

The prefect FREE template?

For the last two days I have come to a realization that I should have a personal website. Of course, I am pretty broke (Despite being an “Engineer”…) so I opted for a free account for now and plan to upgrade in the, hopefully, near future. (Also because someone took tinglik.com and ting.com, which makes me extra sad…)

The end goal of the site, in my mind, is to have a simple, yet elegant, UI for the all the pages. This, to me, means,

  • Menu should be showing easily accessible (No click and extend)
  • Options to remove the title of the page
  • Header Image for each page including post page
  • Visually appealing social network icon
  • A customizable portfolio page

This is pretty much about it.

I have been browsing through templates after templates… Namely Harmonic, Goran, Dyad, and Affinity are some of my favorite ones, but they are all missing in one aspect or another…

For Harmonic, pretty much the only thing missing is the header image for default template… I mean… WHY WOULD YOU KILL IT? Can’t we have just have an option to hide/not load it if we don’t want to?

For Goran, it clean and nice… But, again, the header image is not showing on the post-page this, an equal/opposite problem with Harmonic.

Affinity has the features that I found aligns with what I want… but the style too “elegant” for me.

I like Dyad a lot! The feature image for pages and posts add an addition pairing feels to the posts and page. The project reminds to be the fact that header image is not showing for all of them. It’s simpler than Harmonic and much faster to load than Goran, but I decided to keep Harmonic for now, let’s see where it could take me.

 

Search Engine Optimization (SEO)

In recent turn of events, I became a part time Technical Business Analyst for web company in NYC. While I miss the friends and resources at my old workplace, the additional flexibility is definitely needed for what I need to do right now. The first task as a TBA was to familarize myself with SEO.

To get started with SEO, Search Engine Optimization, check out the two links below,

  1. http://training.seobook.com/seo-training-overview
  2. https://moz.com/beginners-guide-to-seo
  3. SEO
  4. http://www.vendavo.com/blog/seo-and-pricing-analysis-where-we-are-and-where-were-going/
  5. http://www.slideshare.net/yoast/beyond-seo-copywriting-for-professionals

Additional References:

  1. 5 Mistakes That Can Kill Your Digital Analytics
  2. The Dark Side of Content Marketing
  3. Why most agencies stay away from ROI metrics
  4. Is it Valid to Offer SEO Without Result Estimates?
  5. Why agencies need tough clients to become great
  6. 5 tracking errors that mess up your analytics reports

Here are 5 helpful “how-to” SEO articles that we often send to clients:

  1. A complete Local SEO guide for small businesses
  2. Five absolutely vital elements for mobile SEO success
  3. Images: three optimization tips to help speed up your site
  4. Five common keyword research mistakes you need to avoid
  5. Six major differences between Facebook awareness and conversion campaigns

つづく

Google Sheet GUI

I originally wanted to build a webapp that interacts with databases such as Postgres or MySQL using Python, host it via Heroku, and display it with iframe, but it was too much work. (Mainly because I don’t know how to do that yet.) So I went with the dumb way and decided to use Google Sheet to build a GUI/Dashboard instead….

However, the problem being I can’t get the published version to interact with the audience. (See below) I also haven’t figure out how to allow users to edit values without them changing the format. In addition, I don’t think google sheet will be mobile friendly… I tried to use plot.ly, but it seems I can’t embed the dashboard with the free account. I tried iframe plot.ly’s chart and it didn’t work. Looks like I will have to build it with google app script for real now  :'( Let’s hope that it could interact with google sheet and DB nicely as I’d love to avoid PHP… It should still be simpler than building it with python because I would have to build the GUI with Django, which I don’t know Django at the moment, that displays the table as well. Furthermore, who know if Heroku would play well with WP… (Doesn’t seem like it the other way around…) This will be a good opportunity for me to familiarize myself with JavaScript, though PHP may be better if I have to interact with Big Data in WP.

https://docs.google.com/spreadsheets/d/16hJ11aB0kn4MwYthlXXdn7UD-9kyHmxDPUOySGF56YU/edit?usp=sharing

Google App Script is DUMB! First of all, I would have to recreate the same script if I want to convert it to Google Site Gadgets. In addition, the problem being Google now has two site system, the classic and site, and the new site system doesn’t seem to accept Gadgets…

WebApp using Google App Script:

Reference:

  1.  https://en.support.wordpress.com/google-docs/
  2. https://www.blockspring.com/blog/google-spreadsheet-as-database
  3. https://cloud.google.com/appengine/docs
  4. https://developers.google.com/apps-script/
  5. https://code.google.com/p/google-apps-script-issues/issues/detail?id=852

Non Related Reference:

  1. http://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job
  2. http://noeticforce.com/python-online-compiler-interpreter-code-editors
  3. https://www.smartsheet.com/product-tour/card-view
  4. https://www.eisbahn.jp/chrome_mysql_admin/
  5. https://www.geogebra.org/

Framework, CMS, Django

I am helping one of my friends setting up a website, and I am thinking of starting a web service business after I learned many of her friends are also in need of a website. I know how to code with Python and I am learning JavaScript but I am no expert in web development. While I would love to develop from the bottom up eventually, I don’t think I will have the time to do so right now. This means CMS. What is CMS or Content Management System? In short, if you have heard of WordPress or any other point and click web building website, that’s CMS, while framework is a coding platform that guides the developer to create a website, e.g. Django for Python or Ruby on Rail. See below for more details.

A Framework or a CMS? What is better to choose?

With my background in Python, I looked only at CMS based on Python with Django. With number of choices floating around, Django-CMS, WagTail, FeinCMS…

Best choice for a CMS package? from django

I am going with WagTail, because I am a vanilla kind of guy [1, 2].

Reference:

  1. http://www.djangopaths.com/why-did-i-choose-wagtail/
  2. http://www.executionunit.com/blog/2012/02/18/migrating-from-wordpress-to-django-cms/
  3. https://support.rackspace.com/white-paper/understanding-the-cloud-computing-stack-saas-paas-iaas/

Up! Going into Cloud Computing

I have been coding random projects here and there for a while now, and I think the next step for me is to deploy them into the cloud and have them run while I am offline.

Before looking into various cloud service, the first, I think, should scratch out and understand the scope of my projects and my capabilities, which is not much. Knowing this, I went with PaaS over IaaS, but for everyone else it would be a good idea to understand the difference [1, 2].

After reviewing many available options [3, 4] (mainly Google App Engine, Windows Azure, and AWS), I went with Azure solely because I don’t have time to build apps on AWS or Google and their free version has a time limit (2 months for Google and 1 year for AWS… I know I can definitely have time within a year, but one thing at a time…)

The first thing I did was to add a WordPress CMS into Azure. It was very simple all I needed to do was few simple click. On New Year’s day, I registered a domain. With that, I follow [7] to add my custom domain to my Azure… and here you are!

It has been a day since I first deploy this site on Azure, it looks like I keep running into the problem which tinglik.co is not connecting with www.tinglik.co. I have played around with domain name registrations [8, 9, 10]. If you have realize on the address bar, this site is not secure (I am a real person!) mainly because I am too cheap to buy a certificate, $50 a year for www and $300 for wildcard. AIN’T nobody for blings got that! Somehow, after from adding and deleting with my DNS setting (I didn’t touch the A record though…) I seem to got tinglik.co to the site as well. So for now, I guess I will keep an eye on what is going on with this.

In the long run (If any of my projects takes off), I will, of course, expand into paid service, cheap paid service such as [5, 6].

Reference:

  1. https://blogs.msdn.microsoft.com/hanuk/2013/12/03/which-windows-azure-cloud-architecture-paas-or-iaas/
  2. https://www.computenext.com/blog/when-to-use-saas-paas-and-iaas/
  3. http://cloudacademy.com/blog/free-cloud-hosting-comparison/
  4. https://www.quora.com/Are-there-any-free-cloud-computing-services
  5. https://www.linode.com/pricing
  6. https://www.digitalocean.com/pricing/#droplet
  7. https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-custom-domain-name#vip
  8. https://vip.wordpress.com/documentation/mapping-your-domain-and-managing-dns/#managing-dns-records
  9. http://www.networksolutions.com/support/how-to-manage-advanced-dns-records/
  10. https://securingtomorrow.mcafee.com/technical-how-to/security-best-practices-azure-app-service-web-apps-part-1/

Python2 & Python3 in Virtual Environment

I started python2 in 2015 (It’s late… I know, why not Python3 to begin with? I don’t know…) and I set up my coding environment following this instruction (Coming soon). Over some conversations, I have decided to build my next repo with Python3 (Not sure what it will be yet). One of the first thing I learned about Python was Virtual Environment, undoubtedly it was also one of the first thing I looked into after deciding to switch into Python3.

The OS I used when I started python was OSX on a work computer. However, now that I am broke and jobless like many Trump voters, I set up Lubuntu on one of my old computers. The following discussion will be based on Linux environment.

My version of Lubuntu is based on Ubuntu 16.10, so by default it has both Python2 and Python3 pre-installed. [1] You may always check with the following command,

dpkg -l

or just type python3 and see what happens.

Now comes the hard part, decision making time! You will see from a simple google or discussions in [2-4] that you have a choice with venv or virtualenv. After some thoughts, I’ve decided to stay with virtualenv for now since you can easily using python3 in existing virtualenv without installing anything else. However, I believe venv will be the way to go in the long term as venv is now part of the standard libraries in Py3, and Py2 will go obsolete.

To set up Python3 with virtualenv, just use the following command: [6]

mkvirtualenv --python=/usr/bin/python3 env_name

where /usr/bin/python3 is the your python3 location, you may also use which python to find it.

Reference:

  1. https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-16-04
  2. http://stackoverflow.com/questions/12971443/is-python-package-virtualenv-necessary-when-i-use-python-3-3
  3. http://stackoverflow.com/questions/29934032/virtualenv-python-3-ubuntu-14-04-64-bit
  4. http://superuser.com/questions/1039369/how-to-create-a-python3-virtual-environment-as-of-2016
  5. https://docs.python.org/3/library/venv.html
  6. http://stackoverflow.com/questions/16123459/virtualenvwrapper-and-python-3