Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Thursday, 17 November 2022

Hands up! Measure! And keep it simple!

At the end of this post I will expose an example of a speedup of 8000x. This means that a program that at first took almost five hours to complete, ended up in two second.
A ratio of 8000:1.
Pretty impressive!

Wait! What?!

Wednesday, 18 November 2015

A Way to Deploy Python Programs

[...]we will use Java, because a jar file is easier to deploy.
This sentence occurs sometimes where I work. In this multi-environment place, a easy way to deploy your software is a fundamental requirement.

Tuesday, 17 June 2014

What I miss in Python Game Development


As I said before (and I repeated), if I start a new project, I prefer to work with Python, 'cause I like its huge standard library, its portability and its syntax and this is true for every new project I do for work: such as "building netcdf files", "analize meteorological datas", "manage databases". But I had a big problem for a personal project, a long dreamed chimera never really realized: a videogame. I thought to build a simple shooter, something like the old "galaga" or "space impact", using hardware accelerated graphics for great effects, such as particles and flashes. There are many schools of thought on game development under Python: there's PyGame ones, Pyglet, Pandas, ecc. I would like to talk with you about actual game development in python and reflect about my needs

Thursday, 17 October 2013

Mac OS X, Python, PySide and Matplotlib

In these days I'm working on Python application for manage some metereological datas. It uses PySide for the GUI and Matplotlib to plot some useful charts. Unluckily, I had some troubles to add this last library. After some work, I found a solution. This post is a brief guide to my little oddity on using PySide and Matplotlib on a Mac OS X environment.

Wednesday, 27 February 2013

New Aqueduct Release


Aqueduct development continues and now it supports HTML throught a new AqueductDriver. So you can export your Fountain files as HTML+CSS files.
Try it and report bugs.
You can obtain Aqueduct at


http://www.github.com/jacopoprendin/aqueduct


Monday, 18 February 2013

Aqueduct on GitHub

If you're a writer and you like to write screenplays for theatre or movies (as me), maybe you know Fountain, a markup language realized to give you a simple, easy and elegant way to manage your scripts.

Thursday, 7 February 2013

Why I Will Not Use Java


This post is quite old. I wrote it back in 2010, when I realized Java's main drawback is its verbosity. I didn't expand my thoughts, 'cause I was too engaged at work with C, Objective-C and Python. But in these days I read some articles about Java 8 and I felt very disappointed, 'cause it lacks some features, some snippets and doesn't resolve Java's main drawbacks.

Java Language is Verbose

Java Language is verbose, in the worst way you can say it, mainly for two reasons.

Sunday, 6 January 2013

Lua vs Python or Embedding vs Extending


Another (in)famous comparison!
At least once in your programmer career, you will face the need to add a scripting language to your program. Many famous programs use a scripting language: Unreal, Quake, Emacs, Blender 3D and many games. But, when you decide it and when you start to project your implementation, you face a terrible dilemma: should you make a program with a interpreter or functions for a interpreter? This crossroad is the "embed vs extend". I'll talk about my personal opinion and how this dilemma is equal by Lua vs Python comparison.

Wednesday, 30 November 2011

The End of Multi Threaded Programming

I warn you: this is a provocation. I really want to have replies to this post. Because I'm talking about one of most famous themes for computer-science students: threads and multithreading programming.
A special thanks to Andrea "MEgrez" Talon whom solved some doubts I had about Node.js

Friday, 22 July 2011

Pyglet on Windows 2000. Yes, you can!

So, you're a "pythonist", right? And you get tired of pygame, right? And you want to play with pyglet but it doesn't work beacuse there's an error with GDI+?
Relax, man! I'll explain you how to resolve ;)
  1. go to MSDN site and download the GDI+ packages
  2. Decompress it on a directory. It's not important wich one: we have to get the gdiplus.dll file
  3. Copy gdiplus.dll from /asms\10\msft\windows\gdiplus
  4. Paste it on your python directory. I have it on C:\python26.

It's all! Happy coding!

Wednesday, 13 July 2011

«From Python to Ruby» aka «Yet Another Infamous Comparison»!

In these days I'm interesting about Ruby and Ruby On Rails. I already know PHP and Python, but Ruby seems more active, widespread and interesting. For "interesting" I mean PHP still appears to me as a easier Java without compilation and classpath. Some friends of mine use Symphony, but I am not so enthusiastic about it. I like Python's abstraction level, but I admit it has too many web frameworks and none of them seem "cool" enough.
Rails, instead, uses an high level language (Ruby) and creates a homogeneous, well designed and complete environment for web application development.
These are my first impressions: maybe I am wrong.

This post is written for another religion war: Python vs Ruby. I belive it's a war without sense and I think it's usefull learning both.

Always learn at least one scripting language

It's fundamental to learn at least one scripting language. It could be lisp, javascript, python, ruby, perl, ecc. But it must read/write files, opens sockets and do everything a real language must do. It will help you to write some usefull scripts (e.g. create and populate a database from text files, download and save XML from network to local disk, ecc.)
Will learn more than a language will help me? yes! Because...

...you must use the more confortable tool...

...for a specific task. C and C++ are usefull for real-time applications and for videogames. They're not very good to write CGI or web applications. Java is good on servers, but I think isn't good for heavyweight audio manipulations.
I found myself comfortable with Python in many cases, but it is very likely I will use Ruby more often. Remember: the silver bullet is an anti-pattern. Learning more languages will give you more instruments to work better and faster. In programming there's not a Holy Grail, just the right tool in the right place.