About this article
On the other hand, if you say Python! Python!
At a study session, I was asked to talk about Python because it doesn't matter, and I summarized the material.
It's my first time to write a long blog, so I'm sorry for the connection of sentences.
What made you want to do Python
I've been doing Java for about 15 years, and I've been worried that it will take time in terms of Java environment and build method.
Also, since I want to develop on a contract basis with a small company, I need to make it quickly and with a low budget,
I felt that it was not efficient to just prepare a build environment and use a reasonable cost.
There is no point in writing everything in Java
We engineers try to deal with the problem at hand using the methods we can.
It will have a big impact on your choice of programming language.
We try to implement not only large-scale system construction but also simple functions in the existing development environment and languages we know.
Certainly, it is rational, and now that Java engineers are overflowing, it is easy to procure engineers and it is easy to maintain due to unified technology.
Also, static typing may reduce run-time errors as much as possible, which may be one reason why it is used in large systems.
But what about choosing Java just because you can write it now?
Should your system be built in Java because you can write it?
Should I still write in Java? (What I hate Java)
Development environment is complicated
There are ant, maven, gradle and other build aids, but the larger the system, the more complicated it becomes with esoteric definition files.
I understand the mechanism for loose coupling, but the looser the coupling, the more complicated it becomes.
I've been doing it for over a dozen years and I can see that it's more convenient now than the heyday of Struts.
But it's not easy for everyone in the project to understand.
heavy
For web applications When deploying to an application server such as Tomcat or Weblogic, the dependent libraries are all jars and wars that are in memory.
When implementing a batch that runs in parallel in Java, it is difficult to run it as a single process.
If you use gigabytes of memory for each process, you will need to put it on the application server even in batch.
In a large-scale system that executes in parallel, it would be difficult in reality to save memory by considering the dependencies for each batch and reducing the jar dependency by executing.
It takes time to check the operation
It takes time to build and deploy just by modifying one place.
Many engineers repeatedly build and check the operation when implementing the function,
It is a lot of man-hours to accumulate build and deploy for several seconds to several tens of seconds.
It is very unfortunate that man-hours are required due to waiting time.
It is also stressful for engineers to take time.
Deployment Deployment can be done a little faster, but it's not in the same state as when it was released, so another problem is waiting.
Expectations for a scripting language
I remembered that when I developed a system with PHP, I could debug at high speed.
I wish I could develop a scripting language more smoothly. That was the reason I thought so.
Therefore, I narrowed down the languages to be compared to the following.
- PHP (scripting language)
- JavaScript (scripting language)
- Python (scripting language)
- Ruby (scripting language)
Features of each programming language (from a Java shop perspective)
Java
- Lots of work (now).
- There are many large projects.
- I can't escape from the secondment.
- Young people avoid Java.
- Will the number of young Java engineers decrease in the future?
- Difficult to develop in-house human resources.
- I don't like package management tools.
- ant, maven, gradle
- Should I use jEnv?
- Debugging hassle
- Create and deploy wars one by one
- Deployment deployment is fine, though.
PHP
It's not bad. But. .. It is an image of an extension of a web page.
I don't want to use it for anything other than HTML generation.
PHP: It's a Hypertext Preprocessor, isn't it?
It's not bad. ..
<?php
//This enclosure looks like a premise of mixing HTML and logic, and it causes a slight rejection.
?>
- When writing a class, it seems strange to declare Class in JSP.
- It feels strange that the scriptlet is essential.
- There are many writing styles in which tags and processing are mixed.
- An image with little awareness of writing neatly (selfish).
- Image that there are many (selfish) engineers who just need to move.
- It seems easy for beginners to introduce, but honestly it's hard to write.
- For some reason, the unit price is low (although it doesn't change much)
- Because the unit price is low, it must be made quickly, so the quality will be low.
- Don't you use a template engine?
- I think people with high awareness and the field are using it
(Bonus) Why PHP is doing well
There is a strongest library in the CMS world called WordPress
JavaScript
At first it was the most promising candidate. Is it a web system curse? It's JavaScript, but if you can master it, you can finally create a Web system in one language. However, I don't want to write or read.
- A language that is almost indispensable when creating web applications.
- Previously used to do front-end processing.
- To be honest, it's hard to read and I don't want to write.
- It's great to be able to unify the language on the front end and back end by using Node.js.
- Good at processing hard I / O with a large number of requests
- 1 I'm not good at processing heavy CPUs for each request
- You can also create Window applications with Electron
- Chromium and Node.js allow you to create Window applications using web technology
- Typical example: Atom (text editor)
Python
It's my favorite right now. I like how easy it is to read.
Programs are overwhelmingly read rather than written.
Other than that, I like the fact that it is strong in machine learning, which is now popular.
- Easy to read (easy to maintain)
- Good at machine learning.
- Selected on the basis of programming learning
- In education, Python after graduating from Scratch
- Linux standard
- centos(python 2.7)
- Easy to make a little batch
- Wow popular worldwide
- Only Tokyo projects in 2018 (expected in 2019)
- No switch (this is a little surprising)
- Weak access restrictions
- not protected
- Private can also be accessed by writing the class name
Ruby
I was considering Ruby as a candidate equivalent to Python,
The more I investigated, the more subtle it seemed.
- Rails is really amazing
- Multi-line comments are a little subtle
=begin
This would be Nai ...
I thought
Is it possible to do it with one shortcut key in IDE?
=end
- I don't like closing the end of the block with end.
- Lua language or vb-like
- This may be easier for beginners to see
- I had a good match with Python for a while
- Many Japanese articles and books (made in japan)
- One of the selling points is the language made by the Japanese
- High usage rate only in Japan.
- A warning will be issued if the constant is overwritten.
- Treated as a constant if it starts with an English capital letter
*Grammatically out of order with other languages(10.times do |num|)
- Many ways to write (often you can write like this)
list.times{|num|
p "test"
}
list.times do |num|
p "This way of writing is also OK"
end
puts "hello"
puts "You can add a semicolon";
for i in 0..4 do
puts "for statement"
end
for i in 0..4
puts "can be omitted"
end
Language comparison (from a Python perspective)
- Most readable (personally)
- Is the unit price quite high?
- Expected to increase the number of people who can use Python in the next 10 years
- Because people who study programs as a culture are studying Python.
- Ranking 1st or 2nd (definitely 1st in scripting language)
Language ranking
Let's take a look at the language ranking.
Language comparison
Disadvantages of using Python
- Slow speed (should be considered for speeding up using pypy etc.)
- There are few Japanese articles (do your best)
What I did with Python
micro web-framework (RESTful framework)
Web application using bottle.
DB uses SQLite.
The front end was implemented in vue.js.
** Typing game **

Click here for Puru Puru Typing
game
I created a game using pygame.
I first made it to teach children how to make games.
I made it according to the following article.
** Invaders game **

Excel output
I tried to output the invoice in Excel using xlsxwriter.
Invoice

Thinking about industry trends
Java shop may decrease in the future?
- There is a high possibility of a difficult job in a large project just by selecting Java
- Almost no remote work
- That means avoid young people
- Need to daringly choose Java, which takes time? Isn't it enough to have only a part?
- If you want to output a form with SVF firmly, Java
- When the speed is a little in the script language Java? (Is there anything else good?)
- I can't think of anything else
(By the way) Many beginners do Ruby
- Is it easy to do because there are many Japanese documents?
- You don't have to write SQL? (Rails)
- Is it easy to create a web application? (Rails)
Image of using Ruby because Rails is good.
Future of Web system (personal thinking)
- Scripting language for quick and quick creation
- Especially if you do micro services
- The world's Python wave is expected to come to Japan
- The Tokyo epidemic will come to Osaka one year later (selfish theory)
- I'm worried about the future if I'm doing Java or Ruby
- Go should catch up
- It seems to be the top two of Python and Go
Language technology
~~ Sorry for the lack of information on PHP and Ruby. ~~
I added the information provided in the comments. Thank you everyone.
| - |
PHP |
Python |
Ruby |
Java |
| CMS |
WordPress,Drupal |
Mezzanine,django-cms,Wagtail |
Refinery,ShimanePrefectureCMS,Joruri,Zomeki,Egret |
Liferay |
| Web Framework |
Laravel,CakePHP |
django,Bottle,Flask |
Rails,Sinatra |
Play,Jersey,Spring |
| package manager |
composer |
pip, Pipenv |
gem |
maven, gradle |
| IDE |
PhpStorm |
PyCharm |
Whichisfamous? |
Eclipse |
| code checker |
PHPStan |
pycodestyle,autopep8 |
Whichisfamous? |
CheckStyle(inEclipse) |
I'm still new to Python, so what about Python? What to think
I'm just getting started with Python, so I don't know much about it.
- Easy package management?
- Do you use nexus in python?
- Is Pipenv the young you are now?
- I feel that Anaconda has a different purpose
- Do you install Anaconda to create a web environment?
- What is good about IDE (currently implemented in Atom)
- PyCharm
- Monthly $ 8.90 (about 1,000 yen)
- Can I put breakpoints in Django?
- Jupyter
- Wing
- PyScripter
- Eclipse (with Plugin PyDev)
- I don't like it because I need Java to run it
- What is good for log output?
- How about memory usage
- Are events like Django, Bottle, Flask, etc. threads?
- Is the checker of the coding standard around here?
- pep8 → It seems that it became pycode style
- pep257 → It seems that it became pydoc style
Other languages of concern
Go
- high speed!
- Use structures / pointers
- Good at multithreading
- High learning cost (similar to C language)
Score table without permission (out of 5 points)
- Other Go languages you care about also participate
| - |
Python |
Ruby |
PHP |
Java |
Go |
Remarks |
| speed |
3 |
3 |
3 |
5 |
5 |
GoのspeedはJava並み? |
| Easy to read code |
5 |
4 |
1 |
3 |
3 |
Python is easy to see and I don't want to maintain PHP |
| Easy to learn |
5 |
4 |
4 |
3 |
2 |
Go is a little difficult |
| Object-orientation |
3 |
5 |
4 |
5 |
2 |
純Object-orientationならRuby。Goでは構造体。 |
| Machine learning |
5 |
2 |
2 |
3 |
2 |
R language except Python |
| World popularity ranking |
5 |
2 |
4 |
5 |
3 |
Go is skyrocketing. |
| Domestic popularity ranking |
2 |
4 |
5 |
5 |
1 |
It seems that Japan is still going to make it with PHP. |
| annual income |
4 |
3 |
1 |
4 |
5 |
High for machine learning projects. Python and Go have few Web projects. |
| area |
Only in Tokyo |
Only in Tokyo |
Also in Osaka |
Also in Osaka |
Only in Tokyo |
Osaka new motivation. |
| Simple score total |
32 |
27 |
24 |
33 |
23 |
It is not something that can be judged simply by totaling, but as a guide. |
Summary
- Python is definitely the next choice for Java vendors in terms of popularity
- Java is already available, so if you need Java, just use it
- Python is the second language of choice
- Using Python live is not fast enough
- Ruby is popular in Japan now, but without Rails, its value is halved, so it's subtle.
- Let's strengthen while people around us are looking at Ruby (I think)
- Can CMS beat WordPress?
- If you have a "good" CMS made by Python, it is definitely No. 1 in the Web world.
- Ruby also has "Yes" as an option considering the development speed
- In the end, should we be able to choose technology according to requirements rather than choosing from technology?