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 django. Show all posts
Showing posts with label django. 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
Wednesday, October 9, 2019
I stopped using Microsoft Visual Studio and Azure (2019)
I am mostly a hobbyist developer. I had moved to more process management in software engineering. So the cost of paying for the professional version ($1200 / $800) of Visual Studio is quite steep even though I still paid for several years. I am aware there is an Express version which I had used initially but the professional provided a lot of neat features also provided Azure credit so I figured it compensated some of the cost.
I was content with paying but then my real work got busy for several months, also many things came up in my personal life, so I had neglected programming for a bit. When I returned, I realized Visual Studio no longer let me log in. I eventually found that my subscription had expired. I then noticed that I had received a bunch of emails that said I was overdue. This was due to a fraudulent charge on my credit card which was canceled, and that card was the one on record to renew.
This was extremely confusing, because I thought they had moved to subscription basis which I had been paying. When I paid all the overdue costs, I was still unable to use VS 2019. But somehow VS was separate and that had expired several months past, so it will cost me another $1200 to repurchase to use. I am still a bit confused exactly what is what, like what was Visual Studio and what was monthly subscription.
My current understanding is that I was paying monthly for Azure which does not include VS. I had paid for VS the prior year. Sadly, I didn't notice that I had been paying some much to MS for so long. So I still have Azure to host my site temporarily, but absolutely no access to VS. But if I paid for VS, then I should basically own my copy of VS. After talking to support, this was confirmed to be the case. I was unable to find a key in my MSDN subscription. I just grew tired and frustrated, then just refused to use VS again... not even the Express version.
On top of that, since I had purchased VS 2019, I should have had $50 monthly credit to Azure so why was I paying the Azure monthly costs (which was under $50 / month)?! Ugh.... this is so painful.
I was content with paying but then my real work got busy for several months, also many things came up in my personal life, so I had neglected programming for a bit. When I returned, I realized Visual Studio no longer let me log in. I eventually found that my subscription had expired. I then noticed that I had received a bunch of emails that said I was overdue. This was due to a fraudulent charge on my credit card which was canceled, and that card was the one on record to renew.
This was extremely confusing, because I thought they had moved to subscription basis which I had been paying. When I paid all the overdue costs, I was still unable to use VS 2019. But somehow VS was separate and that had expired several months past, so it will cost me another $1200 to repurchase to use. I am still a bit confused exactly what is what, like what was Visual Studio and what was monthly subscription.
My current understanding is that I was paying monthly for Azure which does not include VS. I had paid for VS the prior year. Sadly, I didn't notice that I had been paying some much to MS for so long. So I still have Azure to host my site temporarily, but absolutely no access to VS. But if I paid for VS, then I should basically own my copy of VS. After talking to support, this was confirmed to be the case. I was unable to find a key in my MSDN subscription. I just grew tired and frustrated, then just refused to use VS again... not even the Express version.
On top of that, since I had purchased VS 2019, I should have had $50 monthly credit to Azure so why was I paying the Azure monthly costs (which was under $50 / month)?! Ugh.... this is so painful.
In Summary
I had once forgot to renew in the past and paid the full cost, so this is the second time. I was barely ok with the cost. Then they moved me to subscription basis which I had complained about because I just wanted to pay a flat amount. Then I found out that I still had to pay the VS subscription and I guess I was paying the Azure subscription. I had been using VS for over 10 years, maybe around 15 years.... and absolutely no sympathy for my situation. I have been a promoter of MS VS, .NET, and MS SQL, but no longer. I don't hate them, but definitely no love anymore.
And so, I have moved to Google Cloud, Linux, Python, Apache, Django, and Postgres. After one week, the pricing scheme is very reasonable for hobbyists and people who wants to experiment before going full production. First impressions for this new tech stack will come in the future.
Will I go back? Maybe if there were some changes, but unlikely. I'll continue to use MS Windows, although a good chance I may move
Labels:
Azure,
coding,
Complaint,
cons and pros,
Cost Analysis,
django,
linux,
programming,
Visual Studio
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.
Subscribe to:
Posts (Atom)