I always assumed that it would always be easy for me to pick up a new language since I have already had experience with Java, VB, C#, and several scripting languages. This was kind of the case in the past, but not so much in the modern era.
Knowing a programming language definitely helped me learn Python. What makes learning today is not the language itself anymore but all the frameworks, configurations, all the options, and all the new standards.
At first I spend so much time in just figuring out all the environments that Python can be used in. Maybe this step could be skipped if you already stuck on a certain platform like Windows, Linux, or MacOS.
Then I spend a lot of time just how to build out the infrastructure, like Apache, Django, PostGRESql, MariaDb, etc. Yet, I still kind of regret not going simply with mySQL. I imagine this would be longer for first time programmers as I already had some experience with IIS and MS SQL.
Finally the most time-consuming part of a new language is learning its new framework, process flow, terminology, plug-ins, and standards. For example in Django, I spent the last few days figuring how the engine picks the templates that you designate in the views.py after I built a second application. By default, Django looks through each templates folder start with the order the apps were listed in the settings.py.
At this point, I started to understand the importance of community support. I just could not find the proper wording to find the solution to my problem. My problem was that I attempted to make my template folders have the same structure. Because I did not learn the folder standards yet, I had some files in the template root folder like the index.html. So when I try to access my app2/template/index.html, my page showed my home page (app0/template/index.html). This did not make sense to me because I assumed that the views.py in app2 will use the index.html in app2. I kind of guessed this was the case so I tried to find a way to force the rendering to pick app2's index.html which led me down a lot of rabbit holes.
Each time I meet a new challenge, I find not only do I spend time to research the problem but in some cases, I have to also redesign my application to fit the community's standards. One example is learning about PyLint in its standard on documentation. I had to go through each file to provide documentation which is a triple quote description after the component declaration. I have been using the same method as MS Visual Studio which uses comments prior to the component declaration. It also checks naming schemes, tab spaces, proper empty lines, lines with spaces, etc. Although great for consistency, this took up a lot of time to learn and implement. I do not feel any of my past experience made this process any simpler or faster to learn.
In summary, I am starting to understand the demand for specific language requirements in current job descriptions. I think I would definitely learn much faster with an experienced language programmer to guide me through the differences. I feel that I will still learning faster than a new programmer but will still take time to learn the framework and learn how to troubleshoot compared to an experienced programmer of that language. I feel that it would take me about a month to be somewhat familiar with the new language, tools, and standards; probably a couple weeks if I had a resource dedicated to point me in the right directions. I probably spend 80% reading solutions to different problems similar but not exactly.
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts
Thursday, March 5, 2020
Wednesday, January 29, 2020
My Thoughts: Learning Linux is hard (from Microsoft products) but worth the price?
The amount of information that is purely leaking out of my head as I write this article is just ridiculous. I just finished configuring Django/Python, Debian, Apache, MariaDb (after PostgreSQL), Google Cloud, PuTTY, DBeaver, Eclipse, and Git from scratch (no knowledge). That experience was so very tedious.
If I were to do this again, I would have learned Java and MySql first. The rest are fine. The biggest hurdles was reading documentations for MariaDb which some doubles from MySql. This worked for the most part, but in some rarer instances, MariaDb has kind of split from MySql. So, I spent a lot of time following directions that didn't work. Django was an added layer too because I was not sure if it was Django configuration or an Apache configuration. I think by going with Java and MySql, I would have one less layer of technology to figure out where my problem was.
Another hurdle was that I was working of a Windows system while configuring these technologies on Google Cloud. Of course, I also went with Debian without the GUI so I had to learn all the terminal commands. I did not setup a comparable environment on my machine so I had to upload to Google Cloud to test things. This of course meant that I had to figure out how to connect PuTTY and DBeaver to Google Cloud.
Visual Studio may be a good alternative to Eclipse and DBeaver. That I am not sure would have been easier or not. From my experience most people in this tech stack typically use Eclipse. I am not so sure about DB IDE.
Compared to my experience with Microsoft products, this was much much harder than learning MS products. Wizards, tutorials, how-to instructions, etc. were all levels easier to focus on the configurations that needed to be changed. MS definitely got my up, running, and programming within the same day. This took me about 3 weeks only weekends and some nights, so maybe equivalent to 10 days of actual work. Either case, way longer than it took for MS. Maybe this is a sign of my age...
As for pure learning curve goes, MS is way easier and faster.
As for performance, empty shells of a project is already way faster than empty MS projects.
As for price, MS is way too expensive.
In conclusion, there are pros and cons to both. As a person that wants to make decent wage to effort, learning non-MS product is worth the price as they are paid more in general for similar jobs. Good MS developers can still be paid well in higher tiers but there are fewer available openings and more lower quality developers vying for the same role plus managers who cannot recognize good talent.
Labels:
apache,
comparison,
database,
django,
eclipse,
google cloud,
linux,
linux vs windows,
Microsoft Windows,
MySQL,
postgresql,
Python
Saturday, October 12, 2019
Expanding to Linux, Apache, Postgres, Python, and Django in Google Cloud
I finally got around to learning Linux and Python for the second time. I tried many years ago at a friend's place but never went back after I messed up a build. This time it was way faster with Google Cloud.
I spent about half a day figuring out the free trial versus always free. In reality, I was trying to figure out and extrapolate the always free part. Because as a hobbyist, this was very intriguing part. So basically, I can spin up a small VM and Cloud Sql for free, of course up to a certain limit which I think is well below the traffic and usage that I will be working in.
I think this is great because I am mostly on to practice and learn. If I were to expand my projects, scaling up my projects looks to be kind of simple for both infrastructure and cost. Although I did not delve deep into how to do that exactly. But the costs seem rather reasonable on a personal level.
I spent the rest of the day learning the different parts of google cloud. I quickly went through some of the options then saw all the different types of OS and DB google cloud has to offer. Of course, I spent most of the time figuring out which Linux distro to choose (Debian) and database (Postgre).
I chose Debian because it was free and seemed to have good amount of documentation online. I chose Postgre because it is new to me (I have worked with Oracle, MySql, and MS Sql in the past) and appears to be gaining some popularity (and also been seeing quite a few on job posts).
The next day, I spent all day trying to install Python, Apache, and Django. I spent part of the day looking into which web server to use which I almost scrapped because Python had its own server. I could not get the Python web server to work properly because I did not know how to open a web browser to be local within my google cloud "space" (I am still unsure if that is even possible). I was not able to open the ports to access it from an external source.
I also spent a lot of time trying to learn all the Linux commands to install. I spent a good amount of time trying to find what I can do without super user (sudo) which I found to be almost nothing. I was eventually able to install Apache with Python by following directions and open it from my system's browser (outside of google cloud).
I then looked into Python IDE which then I stumbled across Django which I later learn is a framework for python web development. So then I attempted to install Django, but ran into a lot of issues. Because I already had Python and Apache installed, I was trying not to repeat certain steps or skip certain steps. Because I was not exactly clear on what needed to be done and things were not working, I deleted my Django project and tried to start over.
I had to start over a few times until I found a different site (https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-debian-8) that eventually got me up and running. On the bright side, I am now a bit more familiar with a few basic Linux commands: sudo, nano, mkdir, rm, mv, cp, service, etc. At least I think they are Linux commands as opposed to Python or Apache commands.
I have not started any programming yet, but excited to eventually get to that point. I still need to learn a bit about the Django framework before I can really start. So hopefully, I will get some time to work on that soon. Also, I still need to find an IDE or text editor.
Reference
https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-debian-8
Labels:
apache,
debian,
django,
experience,
first time,
google cloud,
linux,
postgresql,
process,
programming,
Python
Thursday, December 19, 2013
Ubuntu: Day 7 - Hello World! with Python, Django, and Eclipse Completed
I still do not have a full grasp of Eclipse, but I finally got to start programming in Python and publishing a Python Django site. A very simple "Hello World" page but this should basically be the last major barrier to starting the web application. Although it took me about a week, I probably put in about 16 hours of reading, preparing, installing, and learning some very basic stuff including Linux so I think I did a decent job of getting started.
Microsoft Visual Studio builds practically all the starting files so that you could run the application right after creating the project. I thought it was much easier to figure out which files I had to update without watching tutorials.
There are also some nuisances in getting the intellisense to pop-up. I still need a bit more experience in how the import portion works. I am not quite sure why I have to reference a library then import a "class" or is it a library(?). Anyhow, I figure I will get more exposure to this as I program a bit more.
Ubuntu Eclipse
My experience with the install was a little disappointing. I am still not quite sure what I did wrong the first time through. It may have to do with Django not being compatible with Python 3, but the article I read was rather old. I figured it would be by now. I could probably read up on that, but this just adds more complexity to the users who just wants to get something up and running.Microsoft Visual Studio builds practically all the starting files so that you could run the application right after creating the project. I thought it was much easier to figure out which files I had to update without watching tutorials.
Keyboard Shortcuts
I am also having issues with the keyboard shortcuts. I dislike that I have to go to the bottom window to end the virtual web server, then go back to the top to restart. I found a keyboard shortcut, CTRL+F2, that should end when debugging. I am not quite sure what it means by debugging but I couldn't find option that says to just stop whenever. I am assuming that setting is what is preventing it to work even when I tried to run in debug mode (at least I think I was from clicking on the bug button). I can change the shortcut key to other key combinations and CTRL+F2, so it is not another application has some sort of higher priority to the key binding.Intellisense
This feature is always nice. I probably need to spend some more time familiarizing myself with libraries but there are a lot of functions that I do not think I always need to see. There's a lot of properties or functions that are surrounded by sub-scores like '__someName__' which from what I understand so far are more internal use (but technically available). I think this makes it more difficult to learn some of these classes.There are also some nuisances in getting the intellisense to pop-up. I still need a bit more experience in how the import portion works. I am not quite sure why I have to reference a library then import a "class" or is it a library(?). Anyhow, I figure I will get more exposure to this as I program a bit more.
Conclusion
I am happy that I've gotten to this point. I do not enjoy having to learn all the little nuances just to get this up and running, but then if this was exactly like VS then I suppose there wouldn't be a need to have Eclipse. I wonder at what point when I feel comfortable to put this on my resume.
I also have noticed that for some reason when I want to type python, I sometimes type pythong instead. I am wondering if this is because it is similar to 'anything.' Anyways, I may occasionally misspell this word in my post so just know that I mean python. Hopefully my muscle memory will correct this soon.
There is at least one big obstacle that I still need to work on which is publish the website to Apache. Currently, running out of Eclipse is sufficient for hobby purposes. I definitely will not be looking into the till later in January at the earliest. I need to give my brain some time to connect a bunch of the new dots.
Labels:
django,
eclipse,
experience,
intellisense,
keyboard shortcuts,
Python,
ubuntu
Wednesday, December 18, 2013
Ubuntu: Day 6 - Reinstalling Ubuntu, Python, Eclipse, Django, MySql
Spent most of day 6 reinstalling Ubuntu 13.10, then Python 3.2.3, Eclipse 4.3, and Django. I was finally was able to create a project with Django within Eclipse with Python 2.7 but not Python 3.2. I spent some time trying to get that to work but to no avail.
I've been tired the last couple days and have not progressed further in my Linux project yet. I am currently in the process of install MySql which seems to take quite some time to install. (Edited 12/19 - In the middle of the install, it requests for a password for root. For some reason this dialog box does not appear on top of the software center window. Look for the extra icon in the left tray.)
I'm not sure I'll have time tomorrow either to do some shopping and other chores before the holidays. I may have one last evening to work on something before year end. Otherwise, I'll pick this back up in January. I did start reading a book on graph databases in hopes of perhaps looking into MongoDb.
http://community.linuxmint.com/tutorial/view/864
I've been tired the last couple days and have not progressed further in my Linux project yet. I am currently in the process of install MySql which seems to take quite some time to install. (Edited 12/19 - In the middle of the install, it requests for a password for root. For some reason this dialog box does not appear on top of the software center window. Look for the extra icon in the left tray.)
I'm not sure I'll have time tomorrow either to do some shopping and other chores before the holidays. I may have one last evening to work on something before year end. Otherwise, I'll pick this back up in January. I did start reading a book on graph databases in hopes of perhaps looking into MongoDb.
http://community.linuxmint.com/tutorial/view/864
Saturday, December 14, 2013
Ubuntu: Day 4 & 5 - Broke Ubuntu by Uninstalling Python
Yesterday, I installed Eclipse 3.8 and PyDev.
This morning, I was trying to create a new Django project in Eclipse but kept running into an error, "Django not found." There were several sites that fixed this issue but none fixed mine. I checked that Django was indeed installed and that it was installed in Python 2.7.1. I added the Django folder to Interpreter's PYTHONPATH. None seemed to have fixed the problem.
After a couple hours of resolving the issue, I uninstalled Python and all applications dependent on Python. Of course, I did not realize how many applications were dependent on Python. I reinstalled Python in hopes that it will at least fix the problem with Eclipse (which it did not). I noticed some apps were not working properly like the Software Center, so I rebooted Linux. After I logged in, I just had a blank screen.
I am not exactly sure how to revert back, so I am considering to reinstall Ubuntu. I could use more practice in the installing applications. There were also some questions whether Python was installed in a virtual environment which I was not sure if mine was or not. I do not believe so as I did not install any virtual machines, but perhaps Python has its own method of installing in a contained environment? This is all new so I am only speculating.
Worse comes to worse, I could just start developing a Java application.
This morning, I was trying to create a new Django project in Eclipse but kept running into an error, "Django not found." There were several sites that fixed this issue but none fixed mine. I checked that Django was indeed installed and that it was installed in Python 2.7.1. I added the Django folder to Interpreter's PYTHONPATH. None seemed to have fixed the problem.
After a couple hours of resolving the issue, I uninstalled Python and all applications dependent on Python. Of course, I did not realize how many applications were dependent on Python. I reinstalled Python in hopes that it will at least fix the problem with Eclipse (which it did not). I noticed some apps were not working properly like the Software Center, so I rebooted Linux. After I logged in, I just had a blank screen.
I am not exactly sure how to revert back, so I am considering to reinstall Ubuntu. I could use more practice in the installing applications. There were also some questions whether Python was installed in a virtual environment which I was not sure if mine was or not. I do not believe so as I did not install any virtual machines, but perhaps Python has its own method of installing in a contained environment? This is all new so I am only speculating.
Worse comes to worse, I could just start developing a Java application.
Ubuntu: Day 3 - Crashes, Django, Apache
Continuing to watch videos. Ubuntu appears to crash whenever I leave the videos on overnight. This was the second night that this has happened. After the first night, I was able to use the mouse and click on other windows but was unable to type anything in. Also, I could not click anything on the top so I could not shutdown or restart. I was able to close windows and open whatever was in the left panel. After the second night, I had left the youtube video on full screen. I was not able to click on anything at this point although the mouse moved. Clicked on videos, replay button, full screen button, and keyboard shortcuts do not seem to do anything. Both times I had to hard reboot. Everything seems to function after rebooting.
Yesterday, I installed Apache while I was watching videos on Python. I came across Google's Python 2 day class which I thought was very informative while I was cooking. The day 2 part 1 on regular expression was worth skipping. It was more on RE than on python programming. If you are watching for RE, it may be worth it. I did hear much of it as I was washing dishes while that section played. Afterwards, I tried to find some more tutorials and came across Django.
Django seems interesting. It is a web application framework. So far it seems analogous to ASP.NET for C# (and other .NET languages). I am hoping to get some time to install and actually start playing around with all the different apps that I've installed.
Yesterday, I installed Apache while I was watching videos on Python. I came across Google's Python 2 day class which I thought was very informative while I was cooking. The day 2 part 1 on regular expression was worth skipping. It was more on RE than on python programming. If you are watching for RE, it may be worth it. I did hear much of it as I was washing dishes while that section played. Afterwards, I tried to find some more tutorials and came across Django.
Django seems interesting. It is a web application framework. So far it seems analogous to ASP.NET for C# (and other .NET languages). I am hoping to get some time to install and actually start playing around with all the different apps that I've installed.
Friday, December 13, 2013
Ubuntu: Day 2 - MySql, Python, Keyboard Only XP
Keyboard Only
Since I am working off a pc mounted to my friend's tv and didn't have access to a mouse, I tried to navigate around with just a keyboard. I was able to get around quite a bit with just the keyboard. Linux has a bunch more keyboard shortcuts which I learned quite easily, although some of them I have to consciously think about because the key patterns are different from windows.For example, navigating webpages uses the alt plus arrow keys. You'll see me just hacking away at the backspace like your standard ID10T. Also does not help that my friend's keyboard also has foreign keys so the layout is just slightly different enough to mess with my fingers. There is an extra key between alt and space. I learned that I find the alt key by referencing the space key. Also the right shift is much smaller to fit in the up arrow which is probably the most frustrating lesson for my fingers to learn.
What I found most interesting was navigating YouTube. I cannot find a way to get the "cursor" to activate on the video. So, I cannot rewind, fastforward, stop, full-screen, and worst of all skip super long commercials. Fortunately, the video auto-starts because if it didn't I'd be stuck for a while. I was using YouTube to test the video because there is quite a bit of lag with the TV.
Disabling Screen Saver or Monitor Power Off
While watching some of the tutorials, the TV would turn off after 5 minutes of inactivity. So whenever I forgot to press a button or doing some chores while watching, the TV would just turn off. Because I am such a sucker for punishment, I wanted to just figure this out without looking online. The more I couldn't find it, the more I didn't want to look it up. I looked under power, monitor display, and even the TV menu (thinking perhaps there is off-chance that it was the TV... although it was obvious since it would say that it loses data connection). But seriously... who would look under brightness and lock?
Installing Applications
My Ubuntu life became much easier when I familiarized myself with the Ubuntu Software Center. It works similar to the Google store. And works quite while with just the keyboard.The first app was Chromium. A nice small lightweight application to test out the install process. I found that this is much easier tool for first-time users. After getting the hang of Linux a bit, I can see how the command prompt could be slightly faster once someone is familiar with it.
Next, I installed MySQL. I find it interesting that I say "my-S-Q-L" for MySQL when I use "sequel" for SQL. I wish I kind of knew why I do that. Anyways...
At first, I thought Linux crashed because it stayed at the same point in the install for a very long time. I am still quite not sure what happened. The PC is somewhat slow but it took a few hours. Fortunately, I was doing chores so I didn't just sit there the whole time.
After that, I installed the MySQL Workbench which appeared to be an developer environment somewhat similar to Microsoft's Management Studio. This time it installed at a much more normal rate that I expected.
I watched a couple quick tutorial while it downloaded and installed. It has some functionality similar to Management Studio like the ability to create tables and databases, but very different overall. The naming schema is not the same. The structure of schema, database, and tables are not exactly the same, but not difficult to learn.
Python
My friend was talking about how he had to learn Python to use a certain library that did what the manager needed. So, I (being the easily distracted person that I am) started to look into Python. Python is already installed in Ubuntu so that part is super easy.You can start writing commands write in the terminal and see results of what happens. It being a scripting language and with the interpreter engine, there is no need to build a project and compile to see something happen. This is very similar to VBScript and JavaScript but even easier.
I stumbled across a tutorial on string manipulation, and I was impressed to how easy it was to manipulate a string variable. Very intuitive, simple, and still elegant to read even for someone that hasn't even written Python code before. In C# or Java, it would still be quite a bit more verbose to do the same functionality. Of course, Python may not be as perfectly efficient in execution in the highest tier of efficiency but most applications and developers do not have to think at that level anymore. I could even argue that traditional languages could be inefficient if designed incorrectly.
Conclusions
I still have a long ways to go. For some reason, work has been very busy so I have not been able to put as much time and energy into getting my Linux project going. But I have been able to put a couple hours into it so far. I hope I can at least have a simple web application up and running by next week.
Labels:
experience,
MySQL,
Python,
ubuntu
Subscribe to:
Posts (Atom)