Showing posts with label quickly. Show all posts
Showing posts with label quickly. Show all posts

Monday, 9 July 2012

Last improvements

I did some improvements in the last 3 days :)
This is how the application UI is now:


I removed the 3 buttons on the bottom and I added a toolbar with the 3 buttons: add, remove, reload.
I've also introduced some unity integration in the app:
  • progress/loading in the launcher
  • quicklists for reload action

Unity integration is easy to do.. but, you have to deal with some problem with .desktop files like this one.
I had also this problem with quickly.
All of these problems are defeatable... but they make headaches.
You've just to ask to the community: there is always someone who can help you if you ask the right question.

I'm very tired after these 3 weeks of programming after-work and I thinks that if there is no problem with submitting, my application is ready as is.
UbuntuAppShowdown is a really nice experience.
My application is not perfect, buy I'm a bit proud of the result... it's not easy to work on this kind of application everyday, scheduling the work to do.
And I've also learned a lot of new things!
Need to sleep now, if you found a bug on protoborsa, please write me!

Wednesday, 4 July 2012

First Version is out...!

Finally my application for ubuntuappshowdown is out..
After 2 nights of tests..

It's not perfect.. when you are far from a milestones, all it seems perfect..when you are near to reach the milestones, bugs comes from everywhere!

The application is on a ppa here: https://launchpad.net/~dega1999/+archive/protoborsa/

The Name:

So first of all.. my application is called now.. protoborsa.. why this name? because this was the name of the application when I started to hack this project...
I thought that it was simple to change the name of a quickly project in another moment.. but there is no way (let me know if I am wrong please!) to refactor a project and change the name..
So at the end I left this because refactoring for rename is a problematic task. And it is better to don't talk about version... it's  12.07.5 the last uploaded.. LOL.


Quickly submitubuntu is not enough for now
quickly is a young project and so this competition is a good way to test it for bugs.

It's not just (mention from showdown page):
  • Set up a PPA on Launchpad
  • Run the following command to package and upload your app: quickly submitubuntu
 because you need also to:
Other stuff
I spent a lot of time trying to make a good svg icons for the application (the one present in media with the same name of application):  pay attention to make it a 64x64pixel svg (you can create it with inkscape)... not the image.. the entire document...

After that, in order to join the competition you have to upload on Ubuntu Software Center:
  • Create some screenshot of your application
  • Remember to "IMPORTANT! While submitting your app, fill in the App Showdown Participation Details and upload it in the ‘Your application‘ field in MyApps"
  • Create 4 icons: 16x16, 32x32, 64x64, 128x128. You can use a command like this "convert youricon.png -resize 128x128! youricon_128x128.png"
and follow all the steps..

Testing..

I haven't tryed to download from the ppa and install the application from there and verify if it is all ok or not (application is on /opt and it works...)
I will do tomorrow..
if someone read this and wants to try..
Let me know if it works or not, thanks you.

Next.
I think I will spend my resting time to:
  • testing
  • correct bugs
  • improve unity integration



Friday, 22 June 2012

Data downloading... complete!

Ok here it is again.
Today, I'm happier than yesterday.. just because the things went as expected and I can go to sleep earlier...

This is how it looks the new experiment:

That chart display google stock quote (on a predefined period) integrated with pycha library and gtk3!

What I learnt
If you want to:
  • draw on a GTK3 drawing area, you need to register to "draw" event.The "expose" event doesn't exist anymore.
  • update a drawing area widget, you must call queue_draw on that widget
  • get the dimension and position of a widget, you can call the methoed "get_allocation()" on that widget. This methoed give back a Rectangle object with this properties: x,y,width,height.
  • plot with pycha, you have to create a context from the drawing area widget and from the context a surface, than pass the surface to pycha. More info on this point soon.
Yahoo Finance and Stock Quote Data
The stock quote data is obtained from Yahoo Finance, thanks to a web services present on their portal.
Thanks to Corey Goldberg with his library ystockquote obtain these data is a pretty easy task.
I have only to understand how much deep I can go with this script and if it is enough for what I'm looking for...
I also don't know where I can find the right keyword for stock quote companies: Google is GOOG , Apple is AAPL but I don't know where to find a list of these keywords.. or better a webservices to query.

After this research.. I need to pass to design & a bit of mockups!
 




Thursday, 21 June 2012

Lack of documentation

Yesterday I spent a lot of time trying to plot a Chart in a Gtk Drawing Area, using quickly, Glade3, pygtk and pycha.

Some criticism about these tools:
  • "hackish" style... you fix some problem thanks god to people like this: http://somethingididnotknow.wordpress.com/2012/01/27/retrieve-the-window-object-from-widgets-with-pygobject-gtk3.
  • general lack of documentation. what you find around the web is usually deprecated and it doesn't work when you try it
  • the gtk documentation is mainly in C, not in python, and sometimes have a C function called pippo() doesn't mean it exists the equivalent python function pippo()..but something like pyPippo()....
  • when you need a library for a simple task, like plotting on a screen, you can find a lot of solutions, but find the one that just works , it is hard. Many library examples just doesn't work.. you have to find the solution. Read this http://detrasproject.wordpress.com/2011/04/04/show-graphs-using-pygtk/ Also if you don't want plot chart, read the post to understand what I mean. It's not coding.. it's hacking.
  • Trying to plot a line chart inside a drawing area...it has been a bad experience.. and the result not satisfying for now... it looks good but there are a lot of bug to fix.
a prototype.

Quickly, pygtk, glade etc are great tool.. but Ubuntu need documentation, keeping it updated with examples and easy to find tutorial on "how to solve a simple task" or a page with the most important and working library for solve a task.
The hackish approach is not for all, we are in 2012.

This is not an attack to ubuntu community or in general to opensource.
Instead it is an important point, where community should think and improve.

I will post later the recipe for plot a pycha inside a GTK window made with Glade.

Wednesday, 20 June 2012

Planning and some code

For many reasons, the only way I had to find a place for ubuntu 12.04 was some space on Virtualbox.
Ubuntu on Virtualbox is quite fast to don't regret a real machine.

I have seen some parts of the video recorded from UbuntuDevelopers on this youtube channel: http://www.youtube.com/user/ubuntudevelopers
If you are new to pygtk, glade and quickly I suggest to follow those videos.

Planning
From now on, I have around 15 days to produce something good for the competition..
The 15 days will be splitted like this:
  • 3 days experimenting, searching and understand new library in python: fetch webservices,  plot graphs (at least lines) and tools pygtk/glade, quickly.
  • 4 days for design
  • 4 days for programming
  • 1 day for testing
  • 1 day for submission
  • 2 days extra time.. I know those days will be used in some way.

1st Problem
Yes, 1st problem: I desperately need to find a way to plot "cool" graphs with python.

I searched a bit and what I've found is not satisfying me enough.

I don't have the time to create a new library for plot graphs like I want..

Maybe, at the beginning I will use matplotlib (see this tutorial http://www.thetechrepo.com/main-articles/465-how-to-create-a-graph-in-python ) and I will try to improve how graphs looks on the screen only if I will have the time to do it..
I hope matplotlib is able to draw directly on a Gtk Drawing Area... I don't want to save on disk the image than load an image on the Gtk Drawing Area..... it is a sad approach.

Tuesday, 19 June 2012

A Stock Quotes App for Ubuntu

I will do a simple stock quotes application with Quickly for Ubuntu 12.04 but first of all..

Why did I choose to make a stock quotes app for Ubuntu?
Everything started some day ago, while I was playing with the new beta of IOS 6, I found the IOS default app for trace stock quotes information:

It was the first time that I ran that app.

I like the way it works:
  • built to be easy
  • fast manipulation of information: add/remove stocks quote
  • fast searching for stock quotes
  • interface without noise
  • smooth animation and graphics
I've never been interested in stock quotes, markets, etc.. but when you find an application like this and you feel how it is designed...you are captured by how it guides you.

After that I see there is an Ubuntu competition and I have thinked to make something similar for Ubuntu.
I am an Ubuntu user since 4.10 and I would like to give some of my contribute back to the community (I did in other way in the past but I never did a program for the community).
I see there are other stock quote application but I don't like it.. and I have some idea on how to create something different... I would like to create a "wow" effect app.. maybe
I will use quickly (as suggest in the competition) and I will use this blog to document my progress.
I hope the future informations posted on this blog will be useful for others.