Showing posts with label ubuntuappshowdown. Show all posts
Showing posts with label ubuntuappshowdown. Show all posts

Tuesday, 17 July 2012

My Favourites Application's list from UbuntuAppShowdown

At this link, you can find all the application that passed the qualification for Ubuntu App Showdown contest.
I was so curious about this list so I have watched the applications listed.. and this is the list of the applications that IMHO needs attention:
  • Cookety: an application for recipies. I really like the design. Easy, clear, simple. I would like to see it connected with a cloud for hosting,share,save recepies between users.
  • Fogger: pay attention to this app. It hides a website logic inside a unity integrated application.  I like it for many aspects: but the idea to transform unity as a "platform" for website.. is really interesting and new.
  • GWOffice: a desktop client for google drive. It seems a good quality app and I think it is really hard to create something like this... so +1 for this.
  • NitroShare: Cool project. Do you want to share a file with another computer on the LAN? Just drag&drop the file on an Icon on the desktop and it is shared.
  • PostMan: help you to manage photos to send on cloud services like ubuntuone or flickr... So cool UI. Easy to send an image on the cloud, just as sending a letter :)
 
PostMan

And this is a list of applications that I found nice(as realization or idea) but for me not able to win:
  • StackLens a unity lens for stack overflow: stack overflow integrated in unity .. good for developers!
  • PicTag: help people to geotag photos. I would like to see it integrated in an application like shotwell instead of a separeted application.
  • XKCD browser: nice to have.. to launch sometimes during an hard working day.
  • Snare: A minimalistic drum machine. I like the style of this application.. clean! Nice UI for this kind of application
  • SmartShine Photo: I don't know how good it is.. but I like the idea. It corrects photos, based on an algorithm.
  • Nulloy Music Player: yes it is just a music player.. but that's why I like it.. Modern players are full of unuseful feature. Just put an mp3 on the player's list and press play. Good.
  • Interest Calculation: It can be useful for people who manage this kind of calculation everyday.
  • Houston ( I hope is not.. "we got a problem" :D ) An UI for manage servers on the cloud. Good Idea, need a lot of work on it.. But it is a nice start.
  • Facebook App: Do we need a facebook app? I don't know.. but it seems (from sshots) a good designed application.
  • Format Junkie: a frontend for easy convert file formats. Good, Ubuntu needs something like this. I'm not enthusiast of the UI but it is just my opinion :)
  • Lightread: an rss client. Good UI designed. If you use a lot RSS, you probably like it. I thinks it needs ubuntu one sincronization.
My judge is based on the description from Software Center of every application, I didn't try these application yet.. and I judged it basing on my first impact watching the description, screenshot and videos(when present).
It is all IMHO :)

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!

Thursday, 5 July 2012

The community is the key


Linux and all the software around it, it is one of the most challenging and complex enviroment out there.


You know, what is it really hard? Keep all the things working and coordinated.. because you have to deal with many and many problem that proprietary software don't have.
 
It is an enviroment, not ready for all, at least for now, because it needs time... but a route is traced and the key of this enviroment, it is the community around it.

You have feedbacks; there is always someone that watch your work, someone that gives you ideas, for improve your application, and I f*cking love this.


Yesterday, I said that I had finally put the ppa on launchpad... but it was not working correctly.. today I have finally upload a working version.
You can find a version here.

Meanwhile someone (Daniel Holbach) watched the code of my application submission on ubuntu software center, and he found a bug on my licence.. many thanks.


This is such a kind of collaborative env, very hard to find elsewhere.


Protoborsa, new update!

Some minutes ago I uploaded a new version whit these changes:

  * fixed Licence file.:
  * improved company search on add stock.
  * fixed first loading of settings.
  * little changed on thread code for future improvements.

but this version, got a bug (damn!)...the first run fail to copy of a settings file to your homedir/.protoborsa/ directory..
You can manually create this directory and copy the /opt/extras.ubuntu.com/protoborsa/share/protoborsa/db/stocksymbols.db inside it.. or wait for the new version (protoborsa_12.07.5ubuntu5)... that is on the way, and will be downloadable soon.

I would like to improve my application for:
  • better handling of loading chart with thread support and animation while loading
  • toolbar instead of the bottom buttons: this is just for a better UI integration with Unity.
  • try to add unity quicklists
  • add progress while downloading data, on unity icon.
That's all!

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



Monday, 2 July 2012

Changes, Changes and... Changes!

The code relatives to chart is finally ok..
Now the program is capable to:
  • plot a chart with the data ordered by date
  • put the correct label on the chart ticks
  • put an explicative label on the axis
  • calculate a good y-range for displaying the chart (see this option of pycha)
  • for every click on one of the symbol on the stocks list, it display the last month of data on the chart.
  • I added a reload button... if you want you can trash all your dowloaded data and download it again.
About pycha: this is the complete list of options and if you want to specify ticks labels, you need to give pycha something like this:


[

{'v': 0, 'label': 'day1'},
{'v': 1, 'label': 'day2'},
{'v': 2, 'label': 'day3'}

]


It is a list of dictionary.
so record 0 will have day 1 on the first tick.. and so on...


Tomorrow I will spend my after-work time, trying to put it on the ppa and making it ready for the ubuntuappshowdown!

Last screenshot here:



After that, I will spend my resting time for:
  • finish about page.
  • unity integration.
  • make it possible to change data displayed on chart
  • caching data (I want to reduce queries to yahoo whenever is possible).

I need also some graphics.. for icons at least.

Saturday, 30 June 2012

Talking with Thread

With another search on the web.. I have found the answer I was searching on yesterday: Queue with thread.

How? you can read here a good guide.
So anytime the code need to fetch data from the web, there is a good thread who can manage it.

I would like to see a urllib2 library completely asynchronous.. but for now.. you need threads.

Other things I did..a lot of bugfixing and a little bit of code cleaning.

I have also found another bug while displaying data on the chart.
Next step, will be chart improvements... and than..

first alpha will be out!

Friday, 29 June 2012

Baby, did a bad, bad thing

Yesterday I wasted a little bit of time searching to find a bug: I had to delete a selected element from the list of registered stocks in the main screen, and also from the internal db.
Everytime I searched to delete one element from the list, the deletion of that element from internal db doesn't work... instead it was deleting another element.
The code was something like that:
  1. get the iterator and model , for the selected element of the treeview.
  2. remove the element from the model giving the iterator.
  3. the iterator became invalid...(yes it is deleted!) so I did the same thing of step 1.
  4. remove the element form the db getting the key from the iterator.
The bug was simple but it takes some time.. at point 4, the selection to the treeview changed to the previous element in the list!
So the code changed like this:
  1. get the iterator and model , for the selected element of the treeview.
  2. remove the element form the db getting the key from the iterator.
  3. remove the element from the model giving the iterator.

Now add and delete of stocks works.

The other problem is with pygtk and thread.. As I mentioned before.. everytime the application try to connect to the web the interface freeze until this operation is complete.
This happened because retrieving data from the net, it is a blocking operation, and block the main thread where the GTK engine runs.. so the application freeze.

I read so many pages about which is the best way to implements a Thread.. and I hope to be near to a solution.. but not yet!

Thursday, 28 June 2012

Add functionality & autocomplete

I have added a textentry on the top of the dialog for add a new stock quote.
This textentry helps to find through the list of available company, with an autocomplete algorithm... while you type, the list change.
The Add, now it works!

In the main screen when you select one of the registered stock quote, the chart updates, but I have some problem displaying the chart..
I need to examine more later on this, I have a pycha error with some company and I have to understand if it is a problem with the loaded data or a pycha problem.



Latency
Every network operation is blocking the main thread.. so the UI freeze until the dowload of data from the yahoo finance complete: when you add a new stock, at startup and when chart updates.
A disaster! :D

This is a common UI problem and the solution, here, it is to use a secondary thread that manage the connection.
I have to search for which is the common solution on pygtk.. maybe there is a good way to do this, or a pattern to follow.

Wednesday, 27 June 2012

It is growing day by day!

I think the final name of the app will be UStockQuotes!

This is a screenshot of the last evolution of my app:


As you can see there is a list of stock quotes now.
This is the list of the stocks interested by the user.
At the moment the data is stored inside a database, the application fetch the list from the database and than fetch the updated data from yahoo service.

When you select one of the row of the table, the chart update itself retrieving the data.
 
So this is roadmap, just for the first part:
- add/remove stock quote.
- handle no-selected quote, no-stored-data (leaving a banner for example or a message), yahoo errors: means no plot.
- change chart period.
- change stock quote order in table.
- data caching mechanism for fast response and less requests.
- loading screen.
- better unity integration.
- ppa & preparation for contest.


Nice to have:
- Fullscreen mode.
- Fullscreen with stock quote data-rotation.

Tuesday, 26 June 2012

Main Screen Mockup

 I did some test with Yahoo Finance Api.. trying to understand, which data, it is possible to retrieve fast from their service and which is slowly, also because it is huge.
What I would like to achieve in this application is  a fast, responsive interface, designed to mitigate the delay during data retrieval.
A good organized application can help to reduce this problem and make users happy to use the application.

After this step, I did a mockup, with pencil, of the main screen of my application:
Let me show you how it should work... using the 3 bullet on the mockup
  • bullet 1: this is the zone where chart of a selected company is displayed. At the first launch will display the chart of the first present company or, a message if none company is registered. As you can see, there is also on the top right a combo box. This combo box contains some prefixed , period: 1 week, 1 day, 1 month, 1 year ecc. Changing the combobox will update the chart accordingly to the selected period. I don't know if I will use a combo box, but it's just for the idea.  I would like also to change the period, simply scrolling in or scrolling out on the chart.
  • bullet 2: The list of your selected stock quote companies. At the launch of the application this table should be populated asynchronously .. putting every line , one by one, after every download of the information from a company, and making user informed of the in progress operation. Clicking on one of this row will update the chart.
  • bullet 3: a toolbar for handling: add of a new company in the table, remove of an existing company, fullscreenmode. Fullscreen will be a mode to use all the screen for displaying the data of only one selected company with a chart that will take 90% of the screen. It needs a new mockup only for this.

I will try to reduce call to yahoo service whenever is possible with a local caching mechanism like save the data displayed on the table, save the data displayed on a chart for a company... So if I know that the data is locally present, I will not fetch it from Yahoo, otherwise I will fetch, display and save it locally.

Other Features..
Yes, it is not just finished here but, my time is limited so I need to proceed step by step and reach some milestones before proceed with other feature..
I prefer to create a working program with less feature but robust than an application with many feature and bugs.

Monday, 25 June 2012

About Dialogs and Gtk.TreeView

Just finished working on this: open a new dialog with a simple treeview inside and other widgets.
This dialog will be used for searching inside the stock quote table(see the previous post)

First problem first
Adding a new dialog to your project it is easier than you think.. if you know that you should use Quickly (and if your project is quickly based)!

Quickly team make easy to add a new dialog to your project.. just follow this answer.
I wasted an hour searching for an answer on how to manage it with glade3 and finally I found that post.
I like this solution... it is easy to add a new dialog and it manage files for you.. just quickly.

After a dialog finish his task, it return a response code; a list of response code is here.

Second problem.. Treeview, pygtk and Glade
This is a complicated task... information on the net are poor or refers to old version.. but you can do a lot with glade3.
You need to create a TreeView and the associated ListStore.
On the treeview you should define:
  • column list with information
  • the renderer for every column you need like Text, Image or other widget available
On the liststore you have to define:
  •  the column to use with the type for every column (for text gchararray is enough)
  • eventually, any static information you need in the list when the treeview start.
ListStore need to be connected with Treestore and also you need to map every cellrenderer to an attribute on the liststore! For this last point, there is a "Text" property in the tab General of a CellRenderer element.
If you don't map the attribute and you have elements on the liststore, you will probably see 0 lenght string on the treeview.

What now?
Now, I have enough informations to stop hacking and start designing the app.
Also I will try to include the feautres that someone asked on reddit :).
Need to sleep now, it is a working day tomorrow and it's too late!

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.