Tuesday, September 27, 2016

Programming Languages to Learn

Programming Languages to Learn

My first programming language was assembly for the Motorola 6800.  I remember most of the commands with the different addressing modes (Immediate, Direct, Index, Extended, Inherent) and the different registers.



I understand bit’s and byte’s.  I also know several programming languages and wonder if I should learn another language or increase my expertise with the ones that I know.  What are the best programming languages to know?

IT-Skills-Watch gives me an idea of what I should learn and because it is updated monthly I can keep track over time what I should evaluate and learn.  The Top 20 Development Skills shows programming languages, and the Top 40 IT skills shows the applications to watch. 


Beginners and experts know that there are many factors that should be taken into account while deciding what to learn.  Different Fields will require different technologies and with the rate technology evolves, by the time you become an expert it can already be considered obsolete.  There are ways to learn faster, and according to Josh Kaufman, you can learn anything in 20 hours.

Languages vary in terms of functionality and complexity. Each programming language strengths will help you with different types of tasks you want to perform.  Each grouping of task can be thought of as programming “tracks” or “developer paths”.   

C
C#
C++
Objective C
Java
PHP
SQL
Ruby
Python
Javascript
Game Programmer
x
x
x

x





Mobile App Developer



x
x





Web Developer

x


x
x
x
x
x
x
Software Developer
x

x

x

x

x


In addition to programming Tracks, the Genealogy of Language can also guide your path as each language is influenced by other languages.  If you know Perl, then Learning Python, Ruby and PHP become easier. Perl’s creation is influenced by C, AWK, csh and the next generation of Perl, Perl-5 was influenced by C++.  C, Perl and Python are close enough that if you know one, then learning the others will be easier. And of course, you will want to have a book to read, so Free Programming Ebooks.

The top languages to learn was influence by IT-Skills-Watch.

1. Java was developed by James Gosling, in 1990 at Sun Microsystems. Java is an object oriented programming language. A Java core principle is WORA (Write Once Run Anywhere). Java is designed to be portable. You compile Java Source code and then on any machine where JVM (Java Virtual Machine) is installed, you can run that code no matter what OS or Hardware it is on.

Java should be learned by every programmer. Learn Java at UdemyLearn java online. Learn Java on Youtube (do not forget to use Filters = Long (> 20 minutes) ).

2. Python is extensible and has a small core language.  Guido van Rossum, being a fan Monty Python named the language Python. In the ‘Zen of Python’ there are 20 software principles the influence the design of python. For example;
·         Beautiful is better than ugly
·         Explicit is better than implicit
·         Simple is better than complex
·         Complex is better than complicated
·         Readability counts
Python may owe its surge in popularity to Google’s investment in the language in the last 10 years.  Some web sites that currently operate using python include pinterest.com, instagram.com, and rdio.com.  Python and PHP have associated web frameworks to make it more convenient to develop web based applications. Learn Python on Udemy. Learn Python on Codecademy. Learn Python the Hard Way.

3. C is a good programming language to learn (learn C at Udemy), specifically for the beginners who are intending for a programming career in the long run.  This language was created in 1972 by Dennis Ritchie at Bell labs. C is used to develop low level applications and program embedded systems.  C is fast because it doesn’t have support for garbage collection, dynamic typing and other facilities which make it easier for the programmer to write programs but the additional processing overhead degrades performance.  There are many resources you can use to Learn C which can be found with google.

3. C++ is widely used and in high demand in the job market. The C language performs extremely well but it lacks object orientation (OO). In 1983 C was extended to include object orientation. This extension is C++. “Most packaged software is written in C++. That means games, office applications, graphics and video editors, and operating systems. In fact, if you think of the software you use every day that isn't online, chances are it is written in C++ (or C or objective-C). It's not written in Java, Python, Ruby, Perl, etc”((ref))

There are many resources you can use to Learn C++ which can be found with google. Learn C++ at UdemyLearn C++ for free.

3. C# (pronounced "C sharp") was developed in 2000 by Microsoft as part of its family of programming languages and is part of the .net framework.   C# is very similar to Java in terms of capabilities. C# is a pure Objective-Oriented language that combines the power and flexibility of C++ with the advanced features of Java.  If you know C#, you should be able to switch to Java and vice versa.

C# can be used to develop almost all types of software applications.  “If you don't already have C#, you can acquire a version of Visual Studio that includes C# for free from the Visual Studio site.” ((ref)) “The best GUI frameworks for Windows applications is Winforms and WPF together with .NET Framework. The best programming language to work with the .NET Framework and it's APIs is C#. Java is not an alternative for this. And C++ is an older language without automatic memory management.” ((ref))

The job market for C# programmers is good (see IT-Skills-Watch Top 20 Development Skills ). Start learning C# at Udemy.

3. Objective C was initially conceived of by Brad Cox and Tom Love, in 1983. Influenced by Smalltalk and intrigued by problems of re-usability in software design and programming they wanted a language that was backwards compatible with C.  In 1988  NeXT licensed Objective-C  and it has been used as a development platform for Apple based software applications.  


4. Perl was created by Lary Wall in 1987 and is in continual evolution.  Perl 5.000 was released in 1994. The interpreter was rewritten to add many new features including “objects, references, lexical (my) variables, and modules. Importantly, modules provided a mechanism for extending the language without modifying the interpreter. This allowed the core interpreter to stabilize, even as it enabled ordinary Perl programmers to add new language features.” ((ref))
Perl comes standard on my Unix Releases, and is freely available for download

Perl comes with a very active community, and large number of resources for learning Perl including tutorials from novice to advanced. Start learning Perl at Udemy.

5. JavaScript was created in 10 days in May 1995 by Brendan Eich.  JavaScript is a client side language and is one of the three core technologies of the World Wide Web alongside HTML and CSS.  JavaScript runs inside a client browser and process commands on client computer.  This decreased load on the Server and Increases Application Speed. JavaScript was designed by Netscape and many websites make use of JavaScript.


6. Ruby was created by Yukihiro Matsumoto in 1995 and was influenced by Perl, Smalltalk, Eiffel, Ada and Lisp.  Ruby was created to be an Object Oriented language.  It is also a dynamic, general-purpose and reflective language that supports imperative and functional programing paradigms along with being Object Oriented.  Similar to Python it is readable and has been used to create websites including Github, Scribd, Yammer, Shopify, and Groupon via Ruby on Rails.  Ruby is flexible to the point you can redefine the + instruction as “plus”.


7. PHP originally stood for “Personal Home Page, but now is a recursive acronym “PHP : Hypertext Preprocessor”.  PHP’s first incarnation was as a set of CGI (Common Gateway Interface) binaries but after in 1997 the was developed into a new independent programming language.  PHP is a server-side scripting language processed on the server and the end result is sent to the user of the website in the form of plain HTML.  PHP has a mature interface for APIs, protocols, and multiple databases and is also extensible which attracts developers who create and submit modules extending PHP itself. With thousands of already built in modules you can usually find the desired functionality or use one of the hundreds of PHP platforms such a WordPress, Drupal, Joomla for website development.  PHP is also an integral part of the famous LAMP (Linux Apache MySQL and PHP) platform and is one of the languages that every programmer should learn especially if they are looking for a Web Developer’s Career.

Start learning PHP at Udemy, w3schools, or at anyone of 50 websites.

8. Bash or Bourne Again Shell, is a Unix shell first released in 1989 and is the default shell for most major Linux distributions.  Bash is a command line interpreter that parses tokens into simple compound commands and performs various shell expansions, breaking the expanded tokens into lists or filenames and commands and arguments.  Bash can perform any necessary redirection and execution of commands.  Anyone who works with Unix will want to know bash.

Start learning bash at Udemy, with a free guide, TutorialsPoint.  There are literally thousands of options for learning bash and hundreds of online books to learn from.

9. SQL SQL (Structured Query Language) was created in the 1970’s for managing data held in a relational database management system.  SQL provides a standardized way to interact with a database and is extremely simple to learn.  Like JavaScript, knowing SQL is not beneficial by itself, but having a command of it will allow you to create applications that access and manipulate backend databases.  The most common SQL for many is MySQL that is part of the LAMP LAMP (Linux Apache MySQL and PHP/Python/Perl) open-source web application software stack.


 SQL Language Reference(pdf. 1634p Oracle).  SQL Reference(pdf. 1597p IBM).

Saturday, July 30, 2016

Bullet Journal

Bullet Journal: Concept of paper journal... to an Online version?


After watching a concept called Bullet Journaling I wondered if it could be used as a way to track things on-line world instead of paper.

The concept requires an index that you can go to and put information into, and page numbers.  But would you really require a page index if you could use a permalink, like what I can use on this article.

So, if I have an Index article, and just go and edit it when I need to add or update, wouldn't I be able to use the same concept online?  And even easier, I could create a calendar to put the information into for the Future Log.  The Monthly Log will be the dates along with the letter (s,m,t,w,t,f,s) of the week.  The Monthly gives you a Birds Eye View of what you need to get don in that month and the Time you have to do it in.  Next you will have the Daily Log that give you tasks with short bullet-ed sentences.

. (dot) - Task Bullet
- Notes
0 Events

You can have an Asterisks (*) signifier  if task is important.  Extra meaning - Priority.

At the end of the month, you set up the next Monthly Log.  Go through the information and evaluate if it is still worth my time.  If not strike it out.   Otherwise, use a Right Arrow (>) to copy to the next Monthly Log if it should be done next month, or Left Arrow (<) to indicate that it is due after next month, and copy to the corresponding entry in the future log.  This is called Migration and it will help you weed out distractions.  It is Designed to help you focus on things that are worth your time.  The difference between being busy and Being Productive.

Related Tasks & Notes go into a Collector.  Make sure you index the collector.  If I wanted to keep something private I could always use my google drive but for most of my life, why not share it... Might keep me honest when I write articles.


Now the Question is, can I get this onto LifeHacker or Lifehack ?  And would I want to?




 




Saturday, July 23, 2016

Thorium Nuclear

Can nuclear energy be safeclean, and abundant?  

I believe that any technology has favorable and unfavorable factors; with nuclear the negatives have been named over the last 35 years as Three Mile Island, Chernobyl, and Fukushima. Nuclear power is controversial for many reasons and the top concern for most people is safety and then waste, and finally that it is not abundant. When it comes to safety nuclear energy has caused less loss of life than Coal, but when looked at critically all 104 nuclear reactors currently in the US are at risk from extended power outages. After safety what is most commonly asked, is “what do we do with the waste?” Waste from Nuclear plants is radio toxic and transportation and storage solutions are limited because of the longevity and amount of waste. There is also concern about what should be done with the tailings, waste material, from mining the ore. And finally, the currently known Uranium reserves will last for 50 years so another source of fuel is needed. Thorium is safe, clean and abundant and able to provide earths energy needs.

Energy production in the world is a recent invention with electricity coming first from a Coal fired power station built in 1886. Nuclear power is more recent and on June 26, 1954 APS-1 (Obnisnsk, Russia) connected 5MW to the power grid. Two years later the first commercial nuclear power plant added 50 MW to England’s national power grid. As of March 11, 2014 the world has 435 nuclear power plants generating 372 GW with no significant projected increase over the next 50 years. To maintain our current technological society and prosperity we need energy but with implications of climate change the amount of CO2 we produce needs to drop as well. Even if CO2 were not a factor, it is projected that peak energy will occur in 10 to 35 years resulting in a projected population decline to 4 Billion by 2100.

The problem for meeting our energy needs is not the lack of technology; it is that we cannot get the major players to agree. Most environmental groups feel that the solution is to use solar, wind or wave to provide our energy needs. When I evaluate their claims I can never find the cost of building, the environmental impact to fully replace fossil fuels or how they are going to replace petroleum in cars. When it comes to nuclear, the current stakeholders want a status quo and that is what it looks like when you look at the projected number of facilities being built. Only China is in the process of building nuclear facilities, and they are also looking at Thorium reactors to replace all of their current coal power plants, and have even designed the coal plants being built today for that option. After Fukushima, Japan is looking critically at other energy options and they are working with a Swedish company on the possibility for using Thorium. Politicians want nothing to do with any type of nuclear because of the general population’s fear of nuclear disasters. But the ultimate stake holder is us, the people who depend on energy in our lives.

Kirk Sorensen is for Thorium. He has a BS in mechanical engineering, MS in aerospace and nuclear engineering, worked at NASA from 2000 to 2010 where he researched nuclear power for space missions where he came across a book titled "Fluid Fuel Reactors" and after studying it, he could not understand, "Why was the Molten Salt Reactors not pursued?" Kirk explains that Thorium in Liquid Fluoride Thorium Reactors (LFTR) does not require water for cooling, and in the case of loss of power, like Fukushima Daiichi the nuclear reaction can also be stopped with or without human intervention by draining the core (p61) to a cooling container (p73). Shutting down a system this way isn’t just in theory, in Oak Ridge National Laboratories (ORNL) between 1965 and 1969, they shut down the reactor every night (p54). Kirk contrast Pressurized Water Reactors (PWR) housed in a 9 inch thick steel reactor with water pressurized to seventy atmospheres (think scuba tank) operating at a temperature that if there is a breach of the reactor vessel, the water will expand to over 1000 times its original volume (explode). Because of this volatility, the reactor is housed in a huge steel reinforced concrete containment structure, with redundant backup power and cooling pumps. Cooling is critical and must be maintained even if there is a problem and the control rods are inserted rapidly into the pile (SCRAM) or the residual heat could melt through the reactor walls. This happened in Fukushima where the control rods were in the pile, but the facility lost diesel backup power and only had 8 hours of battery backup for the cooling pumps. When the batteries lost power, cooling was lost and the reactor was breached and then the containment building. Both of these are impossible with a LFTR.

After Safety, Nuclear waste is the next largest concern, but for Thorium Energy proponents, it is an opportunity to sell the reactors as a waste disposal system, Cambridge scientists published in the Annals of Nuclear Energy that it is possible to "achieve near complete transuranic waste incineration" by throwing the old residue into the reactor with thorium. This means LFTR can burn up existing stockpiles of Uranium, and plutonium, including the spent reactor fuel from our current nuclear reactors. Even Presidential Candidate Bob Greene in his Thorium Basics presentation shows an mining advantage for Thorium over Uranium of 3667 to 1 (p76) and 363 to 1 for solid waste (fission products) (p77) for the same 1 GW*yr of electrical energy. With thorium according to Professor Barry W. Brook, professor and ARC Future Fellow in the School of Earth and Environmental Sciences at the University of Adelaide, Australia you can store the 100 Tons of Spent Nuclear Fuel (SNF) for 300,000 years or process it and end up with 5 tons of fission products that store for 300 years. In his presentation, he shows that the nuclear material needed for one person’s life time as being the size of a golf ball, and the resulting waste would fit inside a can of soda, were after 300 years, they can be processed and sold.

The third advantage is abundance, not only in the ore but in the energy produced. Thorium is 200 times more energy efficient that uranium and is four times more abundant; think Lead compared to Platinum. Of the known thorium reserves, Norway contains 180,000 metric tons, the US has 160,000 (not counting what is buried in desert), Australia 300,000 and India 360,000 with a world total of over 1,200,000 metric tons. (Nezhad, Dr. H. 2011). With a single Idaho-Montana mine being projected to contain four times as much Thorium(p43) as quoted by Bob Greene in his Thorium Basics, the U.S. estimates are probably low.

The first argument against thorium is it is nuclear and almost immediately the nuclear accidents are brought up as cases against all nuclear. Because of their lack of knowledge most people they think all nuclear is the same and do not know that thorium reactors have two parts; the fissile U-233 core and the fertile Th-232 blanket and no water to explode. If power is removed, the U-233 core drains away from the graphite core (moderators) in the reactor and nuclear fission (energy production) no longer continue. The same argument from a different direction is that it is radio-active. But Thorium has a half life of 12.5 billion years and since it is a low-alpha emitter, all you need is a piece of paper to block the radiation. What they usually mean is the waste product or fission products are radioactive, which is true, but the decay chain produces less gamma emissions (equivalent to X-rays) and the fission products only need to be stored for 300 years.

The second argument against it is that renewable energy can provide the energy safer and cleaner. Here there is some truth to what they say on the surface, but as Professor Barry Brook explains, after 22 years France has 85% of all their energy supplied by nuclear with 90g CO2 per kWh and Denmark has less than one percent from renewable with 650g CO2 per kWh. The problem with both wind and solar is they don’t work all of the time, so you need to back them up with a nimble system which is usually a gas-turbine generator. The result of choosing the quick 10 minute start up gas turbine at 29% efficient is you use 1.4 times more gas than if you ran a Combined Cycle Gas Turbine (CCGT) with 60% efficiency 100% of the time. Solar has a similar problem, except the cost for solar is 1.2 times what wind costs. The solution for wind and solar that does not exist is inexpensive reliable energy storage.

The third argument against thorium is that it is more expensive, but that statement is based off of what they know about nuclear and when you compare it on a per GWh/yr bases the cost of materials is more for wind and solar. The ratio of tons of concrete to steel for conventional nuclear is 43 to 8, Solar Photo Voltaic 43 to 10, Solar Thermal with 7.5 hours of storage 338 to 105 and onshore wind 159 to 43. Although current nuclear plant constructions constantly go over budget, thorium reactors are projected to use even less materials than a conventional nuclear power because they don’t need the cooling towers or the containment structure and are expected to be built in a factory and the containers shipped to where they will be used to produce power with cost estimates of 200 million for a 100 megawatt system. By comparison that is almost half the price of coal, one sixth that of wind, one eighth the cost of solar, with the ability to be ran anywhere, not just next to water sources. Those against, feel nuclear is expensive. With the current nuclear plants, that is correct.

The one thing that people who are against Thorium almost always say is “Why have I not heard of this before”, or the corollary, “it is unproven technology”. Before 1939 nuclear energy was the thing of science fiction. Two years later in 1941, Britain’s Military Application of Uranium Detonation (MAUD) Committee created two reports. The first was the ‘'Use of Uranium for a Bomb' and the second report was the 'Use of Uranium as a Source of Power'. By 1945 the there was sufficient Pu-239 and highly enriched U-235 to test the first Atomic Bomb (Pu-239) in Alamagordo New Mexico on July 16th. Why the Molten Salt Reactor (MSR) was not fully developed and widely built is not because of technical reasons. Dr. Alvin Weinberg supported the MSR and increased nuclear safety, but the Republican Party had already selected the Liquid-Metal-cooled Fast Breeder Reactors (LMFBR) for political reasons and Weinberg was removed as director of ORNL for not following along.

When I look at all of the material that I have sifted through the one thing that stand out is ‘everyone lies’. I was able to ferret out that many of the anti thorium statements were either completely false, half truths, or they were really facts about uranium fueled nuclear reactors. I also found that the pro-thorium factions didn’t mention all of the details that would have hurt their case like the fact that the say you can make a bomb from the materials in the reactor. A U-233 nuclear weapon was created and detonated. What they should have said is that it is very difficult without the plutonium the military used and the yield was not as they expected.

The pro-thorium people did come up with solutions to use the thermal energy from thorium reactors to make synthetic fuels. With the heat from the reactor you could make ammonia for fertilizer, Methanol as a gas replacement for cars and Demethyl ether to run diesel engines. Robert Hargraves shows that you could replace the crude oil energy with synthetic fuel for about $2.20 / gal but then waffles and says that it is actually 1/3 the cost or $1.46, since he left the taxes and refining costs the same, and there really isn’t any refining costs.

With the entire pro-nuclear stance, you would think that I am for nuclear. I am actually anti-nuclear for the simple reason that I am aware of the 1859 ‘Carrington Event’, named after Richard Carrington, as well as the 1921 and 1989 solar storms and the near miss in 2013. The first three storms were all earth directed Coronal Mass Ejections (CME) that resulted in huge currents being induced along the wires, and in the case of the 1859 event melted telegraph lines in Europe and North America. The 1989 event caused Quebec Provence to lose power and in New Jersey it melted a transformer at a nuclear plant. In July 2013 the earth just barely missed another “Carrington event” so big that it could have knocked out power, cars and iPhones (electronics) across the United States or a potentially a loss of all power to all 104 nuclear facilities in the U.S. and in the US, we only have 4 hours of battery backup.

Considering that all of the current energy sources have different risk factors and issues around them, I do not consider that they can provide the base load to supply the world with safe, clean and abundant energy. I think everything except fossil fuels have their place including making things more energy efficient. The only real solution is Thorium which needs a project equivalent to Manhattan Project to design a reactor with an 80 year lifetime which is able to be mass produced. The Manhattan project cost over a billion dollars; proponents of thorium say it shouldn’t cost more than 500 million.

What I have learned is that all of the fear about radioactivity is biased and based on a limited understanding of radioactivity. Consider that all three types of radiation, alpha, beta, and gamma are basically helium, an electron, and a photon (light energy) respectively. Alpha can be stopped by a piece of paper, Beta by a piece of aluminum foil, and Gamma being equivalent to x-rays, needs something thick like lead to prevent it from moving about freely. Once all three slow down, they are harmless, and none of the three cause any thing that they impact to become radioactive (alpha, beta, gamma). So, once you have fission products that have a decay pathway, they cannot blow up or melt down.

I also didn’t know that coal contains uranium and thorium and that as coal is burnt, that significant amounts are released. Per year a 1,000 MW coal-burning power plant could release 12.8 metric tons of thorium and 5.2 metric tons of uranium, containing 74 pounds of Uranium 235 which is more than what is needed to build an atomic bomb. By comparison, a 1,000 MW nuclear plant will generate about 30 short tons of high-level radioactive solid packed waste per year. Those against nuclear because of concern about radiation might want to compare the uncontrolled release of radioactivity into the air in 1982 by coal burning power plants which is 155 times more that what was released by Three Mile Island incident.

Can nuclear energy be safe, clean, and abundant? Liquid Fluoride Thorium Reactor do not blow up or melt down and are passively safe in the event of power loss. Including Three Mile Island, they disperse less radioactive waste than coal fired plants, so they are safe. They produce less waste in mining and from operation with fission products that have a much shorter half-life of 300 years, so they are clean. With an abundance of two cubic centimeters of thorium in every cubic yard of earth on the planet the first kilometer of earth, at current world power usage it would last longer than the life of our sun, so thorium is abundant. Based on everything I have learned; Thorium is the safe answer for nuclear and the least expensive way to provide safe, clean, and abundant energy for every person on the planet.