September 01, 2010

Lori Lee

Joel on Software (the book)

I just finished reading Joel on Software (the first book) by Joel Spolsky. If you don’t know, it’s a book of some of his best blogs posts, dating back to as early as 2000. When I first picked it up, I honestly didn’t think I would read it because it looked very dry at the first glance, despite that I knew how well-known and respected he is. Turns out I was quite wrong, for the most part (there were a handful of articles that went way over my head that I skipped over).

The writing style is really entertaining to read, and gets the point across in a way that makes it memorable. (Kind of unexpected, considering that many people in tech cannot write to save their lives.) Read this if you have problems with writing well — the article is about writing functional specs that people will want to read but I think it can apply to writing in general.

Style aside, I felt like I gained a lot of practical information about software development in general. I actually wish that it was mandatory to read Spolsky as part of my university’s curriculum. This is the type of stuff that they do not teach and that you wouldn’t learn as a student without having years of experience in the field, yet it is so invaluable if you are interviewing for a job, starting a startup, or just trying to find ways work better. If you are a student, read this book! And the second one, too.


Filed under: books

by Lori at September 01, 2010 06:03 AM

August 27, 2010

Martynas Mickevičius

Appliance control using a mobile phone and SMS messages, part 1

Hey, how are you doing? (: Since there was a week between the end of the GSoC and the start of my studies, I decided to do some hobby hacking.

I have some remote (50 km away) appliances (electric heater) that I would like to control from wherever I am. The SMS service is a very compelling solution for this kind of problem. The main challenge is to figure out how to make a mobile phone to a relay that can switch on and off things.

I found a nice tutorial here which tells how to control a 12V car relay with a vibrator signal from the phone (no firmware modification is involved there). This gave me a good jump start. I picked up my old Nokia 3310 for this job. One nice thing about this phone is that it has a thermometer that is mounted in the battery (only original batteries have these). The thermometer will tell what is the current temperature around the phone. The phone will use this information to decide whether to turn on or off the heater in order to keep the same temperature in the room. SMS messages will be used to notify me if something goes wrong or to change the preferred temperature. This can be used during winters when you want to preheat the place before arriving there. Another advantage of this phone is that there is a marvellous open source tool called NokiX, that allows to modify phone's original firmware.

First of all I modified the phone's F/W which turns vibra on and off according to the environment and preferred temperature. You develop these patches using C or Rexx. There is quite a lot phone functionality exposed already. My application does the following things:

  • turns the vibra on or off according to the temperature readings
  • you can give a ping to the phone (call the phone for one signal and then hang up), and then the phone will send you the current temperature
  • the phone will send you a message when temperature drops down below a certain limit

After that came the hardware part.
Don't mind the labels in the picture above. I wanted to place all the components in a quite an optimal way, so I created a PCB design first. It is quite compact but I still could not get rid of one wire going on the non-component side of the PCB.

You can notice a misturned transistor in the pictures above. Thankfully my dad noticed it before I plugged this thing on. After I completed soldering this board a time came for the modification of my good old Nokia 3310. What I needed to do was just take that mobile phone apart, take that vibra motor away and solder two wires in its place.

Then I needed to make a little hole in the plastic frame so these two wires can get out. I did all of this following pictures from the link mentioned in the beginning of this post. After I put everything back together I measured the voltage of the vibra motor. According to the site it should be around 3.75, and so it was.
<object height="385" width="480"><param name="movie" value="http://www.youtube.com/v/5rryXb4UjAo?fs=1&amp;hl=en_US"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><embed allowfullscreen="true" allowscriptaccess="always" height="385" src="http://www.youtube.com/v/5rryXb4UjAo?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" width="480"></embed></object>
So far so good. But there was one problem when I connected the phone, power supply and relay to the board. Relay was always on disregarding the vibra power of the phone. I measured the voltage on the relay and it gave me 6V when vibra was completely turned off. Well I am not that good in radioelectronics so I asked my dad for some help while debugging the situation.

After couple of voltage measurements we decided to put a 68ohm resistor between the base and the emitter of the transistor. This helped. When the vbra power was off the transistor was completely off and relay voltage measured 0V. When the vibra was on full power transistor was completely on and relay voltage measured near 12V. This modification was needed because we used a different kind of relay than the one mentioned in the article.

This left us with a working bunch of wires and components on the board. Tomorrow I will try to put everything into a nice box. See you then.

by Martynas (noreply@blogger.com) at August 27, 2010 11:07 AM

August 18, 2010

Ninad Pundalik

Summer of Code – Week 12

And, it’s finally over! :O  My round up of the Google Summer of Code experience will have to wait a little, as I want to spend time compiling the exact changes I made, as against the ones I set out to do at the beginning.  However, here’s my slightly delayed weekly report for the last week of GSoC.

  • Completed the documentation for the PHP files that I changed.  Added PHPDoc compatible comments for the newly added variables and functions.  Also added comments for the newly added/suppressed output for an Ajax request.  A quick grep for the variable $GLOBALS['is_ajax_request'] will point you to most of the files that have been changed over the summer.
  • Added documentation to the JavaScript files that I modified and created.  Most of the logic flow was already part of the comments, but the comments about the functions and variables were not JSDoc-Toolkit compatible.  Though I am having issues with getting JSDoc-Toolkit to capture the documentation in the jQuery namespace, in my recent experiments, I could get it to parse the variables and anonymous functions in two JS files.
  • Fixed a few minor bugs and typos that I noticed during the documentation.

I did not take out time to write the Wiki pages as I had planned for the last week.  After reading the discussion between Martynas and others on the mailing list, I’m considering putting some of the documentation in the Documentation.html page, and the detailed information on the Wiki, in the Devel category.

Share/Save

by Ninad at August 18, 2010 03:04 PM

August 16, 2010

Lori Lee

GSoC – August 16

Today is officially the end of Google Summer of Code. I made some minor changes in the last week:

  • created a Back button on export.php
  • fixed a JavaScript bug with the table actions dropdown
  • added text in the left frame’s “fast filter” that says what it’s for (the text disappears when you click or tab into the box)
  • fixed some JavaScript bugs in the export form
  • documentation

I think that I completed most of what I set out to do. The redesign of main.php is still incomplete however, because of the missing icons.

It was a lot more difficult than I anticipated to get eligible participants for usability testing (especially since there was no compensation at the end except my friendship), and so I wasn’t able to test as much as I wanted. I also made a handful of mistakes during testing, which invalidated some of the data.

I wish that I could have contributed more because there is definitely a lot more room for improvement but I only had a short period of time for this project. Of course I can still contribute after it’s over (and I will, since that is the point of GSoC) but I’ll be working and not have as much free time.

Things I learned from working on PMA:

  • Even though it may take weeks of hyperventilating and confusion from trying to understand the source code, I will eventually become comfortable with it and even chuckle as other people look at the screen and say “OMG
  • The importance and value of an MVC framework (which PMA does not use)
  • PHP and jQuery
  • Cross-browser testing (i.e. becoming familiar with some of the different quirks of each browser and how to resolve them)
  • How to use Git (well, kind of), which I used to hate and had epic struggles with

Filed under: Google Summer of Code

by Lori at August 16, 2010 10:03 PM

Adnan Mughal

Google summer of code 2010: 11th week

hi folks, Last week of coding have been finished and I found VERY  interesting things while working on EPS and MS Visio XML Schema’s. EPS Schema Export As you know I had installed xampp in Ubuntu. So, I could install PS PECL Extension to code EPS files. But damn, I got stuck while PECL INSTALL PS  package in [...]

by Muhammad Adnan at August 16, 2010 09:36 AM

August 15, 2010

Piotr Przybylski

User preferences – weeks 11 and 12

My last Summer of Code report for my user preferences project. During last two weeks I worked on fixing bugs and improving code documentation. The most notable changes include:

  • fixed <select> handling
  • fixed regular expression validation when phpMyAdmin custom error handler is set
  • removed debug code, made CSS caching aware of user preferences changes
  • fixed configuration merge when importing settings
  • added information about setup script to “manage your settings” tab, as some people are not aware that such feature exists
  • cleaned up comments

by Crack at August 15, 2010 11:13 PM

Martynas Mickevičius

GSoC 2010 Week #12 report

Hello everyone,

well it has come to the end. This is my last GSoC 2010 weekly report. First of all I would like to say that it was an unbelievable experience to work whole summer on the open source project such as phpMyAdmin.

Well talking about my initial proposal to phpMyAdmin not everything that was written there is implemented. Two out of the three main goals are completed. Now any user can see and create charts out of their data and I believe that I did quite a good job giving future developers a way to expand chart implementation with different chart renderers.

One thing that was in my proposal and I left it out is JS chart implementation. I dropped it because image charts looked so nice and I was able to add some interactivity (tooltips) to them which are probably the most used feature of JS charts.

I spent the last week rewriting comments so that phpdoc can understand them. I also added some documentation and linked wiki to the FAQ section of the documentation. So any user that has a problem while drawing a chart can seek help there.

Well I haven't had a blog before GSoC, but I will try to keep on posting what is happening around me. See you some time later!

by Martynas (noreply@blogger.com) at August 15, 2010 10:03 PM

August 12, 2010

Ankit Gupta

Gsoc weekly statuts Report

Hi all,

Now only a week is left for Gsoc ,it has been a really good learning experience,
now as the coding period ends , it’s time to start working on documentation and
continue with bug fixes

coming to the status report last week finally i completed from and having clauses .
and now we have auto joins support on visual builder :)
i figured out a few bugs , now this week will be fixing those and do a thorough testing.
and complete the documentation .


by ankitgupt at August 12, 2010 06:56 AM

August 09, 2010

Lori Lee

GSoC – August 9

Last week I swapped the old tooltip code with this new jQuery plugin called qTip. It works nicely across all browsers, including IE6. Also for the past few days I’ve been struggling to fix this back button problem. I think I have come close but am not quite there.

So the problem is that the PMA URLs look like this: localhost/index.php?server=2&token=7b45596d7f255c22db2531947a12ffce#PMAURL:server=2&target=server_variables.php&token=7b45596d7f255c22db2531947a12ffce

There is a hash at the end so that when you bookmark the link or copy and paste it into a new window, it’ll open on the same page by reading the hash value:

localhost/index.php?server=2&target=server_variables.php&token=7b45596d7f255c22db2531947a12ffce#PMAURL:server=2&target=server_variables.php&token=7b45596d7f255c22db2531947a12ffce

The first time I try to use the back button, it’s fine. However, the second time there is a problem (in Firefox) because the hash part of the URL changes but the page content does not load. You end up having to press the back button twice, and sometimes it loads the wrong page (the page you would see if you were to press “Forward”).

I’ve found a solution here, which is not exactly graceful: http://ajaxpatterns.org/Unique_URLs Basically the strategy is to check every second whether or not the hash has changed. If it has, then load the page that’s specified in the hash string. Sounds simple enough but I can’t get it to work.

Since I’m running out of time, I’m going to put a “Back” link in export.php since that is one of the most likely places that someone is going to use the back button, and it’s also what other tabs in PMA have.

This week I will also imrpove the comments in my code.


Filed under: Google Summer of Code

by Lori at August 09, 2010 06:10 PM

August 08, 2010

Martynas Mickevičius

GSoC 2010 Week #11 report

Hello everyone,

well not much code was added this week. However I have tried to install my PMA fork to as many machines with as many configurations as possible. By doing so, I have found few bugs and made some fixes which will help with the compatibility.

Who would have ever thought that I would find a machine with no JSON capability. After this not usual encounter I added check for JSON functions and if there are not any, then tooltips are disabled.

Next week is the last week of GSoC and I will work on documentation, more testing and fixing bugs if any.

by Martynas (noreply@blogger.com) at August 08, 2010 09:57 PM

Adnan Mughal

Google Summer of Code 2010: 10th week

hi, This week was very disappointed for me because my health was broken and 5 hours of work took more than 4 days to complete I had decided to go with manually creating EPS files by using POST SCRIPT commands. I had started very good but when I had to calculate the width of string [...]

by Muhammad Adnan at August 08, 2010 08:00 PM

Ninad Pundalik

Summer Of Code – Week 11

Ah! It’s already the 9th of August over here. This means that we have come to the end of the coding period of the Google Summer of Code and work on documentation starts. A peek at the git commit log shows that I have covered most of the tasks I set out to do for this week:

  • Ajaxified the Change Password and Create Database actions on the main page.
  • Moved the code that sorted a table (of users/databases/tables) into a jQuery function, which is called after a new row has been appended to the table.
  • Added jQuery code that appends a new anchor to each row for inline editing.  It will be executed on a browser only if JavaScript is supported and hence, will leave most of the previous code untouched.
  • Completed the CSS rules for the Ajax notification.  The notification div is now properly centered and also has rules in the Darkblue/orange theme.
  • Fields with mimetype application, blob fields and images are now handled correctly in inline editing.
  • While testing inline editing, I realised that NULL fields were not handled properly.  Added a couple of checks that corrected the behaviour.

I could not complete the hooking in of some validation functions, as I had planned to.  However, I will do this as soon as I complete the documentation work that I have to do this week.

Things to do in the last week of the Google Summer of Code:

  • Document, document and document!
    • Add JS-Doc compatible comments for all the newly written functions and jQuery scripts, and improve it from the very basic comments necessary for me to understand the code into proper documentation.
    • Document the newly added variables and code blocks in PHP as well.
  • If possible, I would like to add a page on the phpMyAdmin Wiki that explains what should be done to convert an existing action to Ajax using the functions that were developed over the summer.

The coming week might be the end of the Google Summer of Code, but I’m hoping that it will be just the first step in a long journey with phpMyAdmin.  In the next few weeks, it will be good to see some of the code getting merged into the upstream code, the main phpMyAdmin repository.  I hope that we don’t cause too much trouble to the phpMyAdmin mentors when they review and merge our code! :)

Share/Save

by Ninad at August 08, 2010 07:54 PM

August 06, 2010

Ninad Pundalik

MiniDebConf @ COEP Tomorrow!

I’ve been in Pune for almost a month now, but due to the 6 day week schedule at my Practice School 2 station and GSoC hacking, I’ve not had a chance to get in touch with the very active Pune Linux Users Group (PLUG) people.  Thankfully, the guys at Uncode, Free Software User Group at PICT and PLUG got together and decided to organize the MiniDebConf 2010 India at Pune, giving me a chance to meet these guys.  The MiniDebConf details are:

  • Venue: College Of Engineering, Pune.
  • Date: 7th and 8th August.
  • Time: 10 AM to 5 PM.

Being a DebConf, the primary focus is going to be on Debian, even though a sizeable number of participants seem to be Ubuntu users, just like me.  On the first day, Praveen Arimbrathodiyil will be introducing the Debian OS to the participants of the conference.  The next session sees Kartik Mistry and Vikram Vincent giving the conference a more serious turn, focussing on the Developer Toolbox that Debian provides to it’s hackers/users.  Even though I’ve been using Ubuntu for almost three years now, I expect to learn quite a lot here, as I’ve mostly done web development, and never done any desktop/server application development on the system.

The afternoon session will be handled by Kartik Mistry and Onkar Shinde, and will be a full blown workshop on packaging debians.  This is guaranteed to be a very good learning experience, and hopefully, I’ll do better than my half hearted attempts at packaging the G2IP Messenger after this session.  In the evening, a key-signing party, a talk on encryption and the monthly meeting of PLUG are planned.

Come Sunday morning, some of the future plans of the Debian community will be discussed, something that will be a pretty good learning experience for me, as I have absolutely no idea about the directions that Debian is taking, as I’ve never been a part of the community. The rest of the day is dedicated to bug fixing, and will be my first time when I’ll be participating in a coding session attended by a lot of people.

As this is the first proper Linux/Open Source event that I’m purely attending, I’m looking forward to learning and spending some time getting to meet new people, and having a good time.  Do expect some posts on how the event turned out soon on this blog! :)

P.S. : For details, visit  http://wiki.debian.org/DebianIndia/MiniDebConf2010

Share/Save

by Ninad at August 06, 2010 07:16 PM

August 05, 2010

Lori Lee

GSoC – August 4

Eek, there’s only really a week and a half left before GSoC ends.

Stuff I did last week:

  • fixed all the bugs that I found last week except the IE5.5 one because I realized that pretty much nobody supports IE5.5 anymore
  • also realized that the back button is actually still broken in Firefox for all of the pages because of this line of JavaScript:
    setURLHash(“<?php echo PMA_generate_common_url($url_params, ‘text’, ”); ?>”);
    which causes the URL to change from http://myurl/index.php?token=abcd1234 to http://myurl/index.php?token=abcd1234#PMAURL:server=1&target=server_export.php&token=abcd1234

To do this week:

  • replace the current tooltip with jQuery’s tooltip, which will overcome this problem in IE6:
  • fix the back button issue which continues to plague me

Filed under: Google Summer of Code

by Lori at August 05, 2010 12:58 AM

August 04, 2010

Ankit Gupta

weekely status report

Hi all,

Last week i completed the from clause which was only thing left in query building,
now i am testing it on my machine, there are few issues with automatic joins which i will fix

Plans for next week are resolve join issues testing and fixing bugs, improve styling.


by ankitgupt at August 04, 2010 12:09 PM

August 01, 2010

Piotr Przybylski

User preferences – week 10

Despite encountering some bugs in my code, I managed to finish all planned tasks, i.e.:

  • some fields have an additional comment (denoted by a blue “i” next to them), with an information whether required PHP extension is available (for compression and validator), or whether field value has an upper limit (MaxDbList, MaxTableList)
  • users can change only_db and hide_db values

Other changes and fixed bugs:

  • user preferences forms now work correctly without output buffering
  • removed superfluous ob_end_clean() which caused page rendering to fail when OBGzip was enabled
  • fixed config file generation in setup script when users clicks Download without showing preview
  • further improvements to array formatting in config files generated by setup script
  • fixed some fields not saving due to equality conversions (eg. 0 == ’auto’)
  • selected tab is kept selected when settings are saved

Additionally, “Validator” tab has been removed from user preferences.

In the next two weeks I intend to find and remove remaining bugs, check code comments and improve documentation.

by Crack at August 01, 2010 09:29 PM

Adnan Mughal

Google Summer of Code: 9th week

hi, 9th week  is gone  and I explored XML for MS Visio Schema, EPS Schema format and issues for making PDF, SVG and Dia Exports downloadable. I had coded pdf,svg and dia exports that these will be prompted for download. It was working on my local wamp installation but not on demo server. Unfortunately that [...]

by Muhammad Adnan at August 01, 2010 08:51 PM

Ninad Pundalik

Summer of Code – Week 10

Things have been a little slow the last week, thanks to preparations for a small family function today.  But, I did get a decent amount of time to work on the code last week.  Here’s what the git commit log says:

  • Inline editing now supports handling of ENUM field types.
  • Almost completed inline editing support for relational key fields.  Just need to add support for current session settings of relational field display as key or column.  Currently, the display as key option has been implemented.  Also, included support for the $cfg['ForeignKeyMaxLimit'] setting while retrieving possible foreign key values.
  • Transformed fields with mimetype text/plain are handled correctly.
  • Fixed the bug noticed by Marc Delise, where field comments were being taken as part of the field name for inline editing.
  • Ajaxified the Create Database action on the Server Databases page.  However, the newly created database is not yet appended to the list of databases.

Tasks for next week:

  • Complete inline editing support for image/* and application/* mimetype transformations in jQuery scripts.
  • Add a new anchor for inline editing with jQuery on page load for each row, and remove the current inline editing action from the ‘Edit’ anchor.
  • Create Database action on the main page is not yet ajaxified, complete it and test it.
  • Ajaxify ‘Change Password’.
  • Complete pending tasks.  This includes the long overdue CSS rules for the Notification division.
  • A couple of validation functions have not been hooked in correctly on some forms.
  • And, last but not the least, fix bugs that everyone on the mailing list so kindly points out!

Phew, that’s a long list of tasks for next week.  See ya!  :)

Share/Save

by Ninad at August 01, 2010 06:39 PM

July 31, 2010

Martynas Mickevičius

GSoC 2010 Week #10 report

Hello,

well I spent this week fixing various bugs and polishing some details. One of the more significant achievement was more sophisticated tooltip generation. Now it should work on any pie chart. Even on one with only one piece.

I have solved the base64 image length problem that I described in my last post. I decided to slice the chart image vertically into as many as 20 parts. In such way one part of a very big chart is under the limit of the base64 image length so it is displayed properly. This added some difficulties for the user when saving the chart to the hard disk. Therefore I have also added an option which allows to output a chart in one single piece.

I have tested various trivial cases for tables and checked if query results work on them. There was some tweaking to be done for these cases.

I also documented some work I have done in the wiki. You can find it here. There is also a format documented that is accepted for query results charts. You can see the preparations that need to be done for your data if you want to put it to the chart.

I have also merged master to my fork. There was only one minor conflict. This actually means that I am not changing PMA code much. I am just adding some new.

Next week I will continue polishing and fixing bugs if any.

by Martynas (noreply@blogger.com) at July 31, 2010 08:42 PM

July 29, 2010

Lori Lee

“Shouting” to Apple on a Message Board

I saw this randomly and thought it was so funny that I took a screenshot of it.


Filed under: From the Net

by Lori at July 29, 2010 06:24 AM

GSoC – July 29

This week I finished the redesign of the main page but there are still some missing icons because I don’t have the skills to make them myself and the person who’s working on the new set hasn’t responded to me about the status of them.

I also did some browser testing and functionality testing using IE, Firefox, Chrome, Opera and Safari. These are the problems I’ve found so far:

  • the ENUM/SET editor doesn’t open when the link is clicked (IE5.5)
  • the table actions dropdown list is positioned completely incorrectly (IE6 and IE7)
  • the ENUM/SET editor popup overflows and has scrollbars on the bottom and right (IE7)
  • the <ul> elements are spaced weirdly in the export and import forms (IE5.5, IE6, and IE7)
  • I get a bunch of popups regarding script errors everytime any page loads — this is on the stable branch too (all versions of IE; Opera9.63 detects it too but doesn’t display a popup)
  • I get logged out randomly or the page just doesn’t load, but I think it’s because of these script errors (all versions of IE and Opera 9.63)

This week I will be trying to fix all of these problems.

Why can’t IE just be obliterated :P

On the plus side, I discovered that Chrome and Opera have built-in developer tools.


Filed under: Google Summer of Code

by Lori at July 29, 2010 02:29 AM

July 28, 2010

Ankit Gupta

Gsoc status Report

Hi all,

i had decided that by 25th i will complete the query building, but i got sick in between
and it took a couple of days to recover  :( .
Now i am all fit and fine  and will try to complete the query building by the end of this week.
i have already completed select clause,where clause,order by and group by clauses.
main part remaining is FROM clause and generating LEFT JOINS.
I have figured out the logic for that and will implement it by the end of this week.

also while implementing order by and  group by i felt few changes are needed in design
so am planning to  add Ascending and Descending button for ORDER BY
and include a HAVING clause with GROUP By.


by ankitgupt at July 28, 2010 06:28 AM

July 27, 2010

Piotr Przybylski

User preferences – week 9

Things done in week 8, aside from styling changes and bugfixes:

  • connection collation and language are saved to user preferences
  • better tab menu – tabs that don’t fit into the first line of menu are collapsed into a submenu; when window size changes, items are added to it or removed, depending on current window size
  • cleaned up config tabs JavaScript to be simpler, using jQuery’s functions
  • Developer tab (controlled by UserprefsDeveloperTab setting) with debugging options
  • Warnings tab with options to disable mcrypt, Suhosin and pmadb warnings
  • SQL Validator tab, allows users to enable SQL validation provided by Mimer SQL Validator Web Service
  • changes in Server tabs in setup script

This week I want to improve configuration forms and make them easier to use: include some more information (eg. whether required extension is available at all). I have yet to decide whether do it by adding information somewhere near such option, or use validation message for that.

Next, I want to look into allowing users to set only_db and hide_db.

by Crack at July 27, 2010 01:10 PM

July 25, 2010

Ninad Pundalik

Summer of Code – Week 9

Damn!  It’s already the end of Week 9!  The Google Summer of Code has only 3 more weeks to go, and it feels as if it was just yesterday that I started working on phpMyAdmin.

Here’s what happened last week:

  • Fixed the issue that caused an empty notification divisions on the top of the page during an Ajax request.  Used jQuery’s .clearQueue() to dequeue all the previous animations when showing a new message, thus preventing it from showing a blank div after the content had been cleared.
  • Improved the behaviour for adding a new user, adding a table and deleting users.  The tables are now sorted, so the new user/table that is appended to the table is now in the correct alphabetical order.  Also, on deleting users, the classes of the remaining rows are re-adjusted so the table retains the uniform look of alternating dark and light rows, handled through CSS.
  • Newly copied users are appended to the list of users, just like newly created users.  Also, when a user’s privileges are updated in the dialog, the table of users is updated with the latest privileges.
  • Saving of inline editing has been completed.  Any changes made during inline editing are now posted back to the server, and the table of results shows the latest value for the edited rows.  However, the edited values of relational fields and transformed fields need improvement.  Currently, the new value of the field is just shown over there.  It does not undergo transformation, or if it’s a foreign key, it does not link to an SQL query that shows the foreign table with the key’s row.

I still have not worked on the CSS rules for the Ajax notification, something that I wanted to do last week but could not, as inline editing has been quite complicated.

Tasks for Week 10:

The schedule says that I will be working on basic actions like Changing the Password and actions on the Database/Table Operations page.  However, inline editing still is not complete and some of the tasks for week 10 have been accomplished in the previous weeks.  Hence, after discussing with my mentor Marc Delisle, we’ve decided to complete and test inline editing as much as we can before GSoC ends, so that it can be rolled out in one of the coming versions.  Thus, this week, I’ll be concentrating on improving the handling inline editing of all the transformations that phpMyAdmin supports.  Once that is done, I’ll move on to the other tasks, as per availability of time.

Share/Save

by Ninad at July 25, 2010 08:18 PM

July 23, 2010

Martynas Mickevičius

GSoC 2010 Week #8-#9 report

Hello,

first of all sorry I missed the report of the week #7, but I was ill that week so nothing much happened. This week I have started adding JS to the charts. So this is how it went.

The PHP library that I use (pChart) for chart generation has some ImageMap functionality. What it basically does is return some data to JS where a tooltip must be shown. That data is only coordinates of two points. That script allows to show tooltips only above rectangles. Well, pie charts and radars charts consist of not only rectangles but we want tooltips on them too.

So I started this week by writing some PHP code which calculates the areas where a tooltip should be on a chart and then JS had to be improved to cope with more complicated figures. There was some interesting math involved in this. Now we have tooltips over pie and radar maps too.

Well with JS sometimes comes compatibility issues. So when I started writing JS I also have started testing my work on other browsers. Only now I have noticed that IE 8 (I haven't even tested it on older ones) does not always show base64 encoded images. Some images which have long base64 strings are not shown. This is a little show stopper because I have no idea how to fix this without scrapping base64 images.

Talking about charts (: I was thinking about and looking at flot library for charts. It is not really suitable for this. It does better job while rendering plots than charts. pChart does render really good looking charts and no other library can do it better. I am not sure if PMA needs another implementation (JS) for charts. I think now I will do my best to add some convenience JS functionality and it will be much better than completely different JS charts implementation.

Now I am going back to tinker around with details and some bugs that are still there.

BTW. You can test out the chart functionality here. Just go the the status page and you will see nice looking pie chart. It is harder to test query results charts because you need some data which script does understand.

by Martynas (noreply@blogger.com) at July 23, 2010 07:56 AM

July 22, 2010

Lori Lee

GSoC – July 22

Stuff I did last week:

  • Turns out the back button works when I am using PMA on the demo server but it doesn’t work when I am using it on my own local server, so I guess there’s nothing to fix…?
  • Finished the ENUM/SET editor
  • Started redesign of the main page

To do this week:

  • Fix the hidden table structure actions drop-down, which gets messed up when the table is too wide (forces you to scroll to the right)
  • Finish redesign of the main page
  • Browser testing and functionality testing of all the stuff I’ve worked on

Filed under: Google Summer of Code

by Lori at July 22, 2010 11:10 PM

July 20, 2010

Adnan Mughal

Google Summer of Code: Mid Term Evaluations

Hi, I am very delighted that I have passed the mid term evaluations of my project. So far, I have done PDF, SVG and DIA export relations schema’s. SVG and DIA export is done by using  [0] extension of php. It was not easy to use that library because there was not much support tutorials [...]

by Muhammad Adnan at July 20, 2010 07:19 PM

July 19, 2010

Piotr Przybylski

User preferences – week 8

Tasks completed this week:

  • HTML 5 local storage – proper UI, if pmadb is unavailable user is asked whether settings from browser should be imported
  • import – allow to import configurations that fail validation, invalid fields are skipped
  • UI – CSS for Darkblue/orange theme, shorter inputs for numeric inputs
  • validation – valdiators can be configured by taking additional arguments, one field can have many attached valdiators
  • MaxDbList and MaxTableList options – in user preferences forms their values are bounded by the original value
  • bugs fixed: user preferences didn’t work correctly with fontsize and DefaultTheme, “restore default value” button in forms was always displayed, added a few missing string escapes in phpMyAdmin code, added missing validations for a few options, added missing comments to some functions

This week I want to:

  • store connection collation and language in user preferences
  • allow users to disable some options (eg. “Validate SQL” link, main frame information) which are enabled, but without the possibility to enable them
  • experiment with phpMyAdmin tabs and figure out a good way to hide some rarely used options under a menu link, something like:
    “Option 1″ “Option 2″ “More >”
    Hovering over “More” would show a vertical menu with hidden options, users wolud be able to determine which options should go into this menu
  • if I will have enough time, look into allowing users to set only_db and hide_db
collation_connection lang

by Crack at July 19, 2010 02:20 PM

July 18, 2010

Ninad Pundalik

Summer of Code – Week 8

Tasks completed in Week 8:

  • Append newly created users to the list of existing users on the server privileges page and a newly created table to the list of tables on the database structure page:  Completed.  However, the newly created user/table are appended to the table, and hence, they are not placed according to their correct alphabetical order.  This is something that can be improved.
  • Start the ajaxification of inline editing of data retrieved from a table:  As expected, this is among the toughest tasks in my entire Summer of Code.  When I began work on this, I did not know about phpMyAdmin’s Transformation feature, and it took me some time to figure out how to handle transformed and truncated data fields.  Also, relational fields might take some extra work to process.  The jQuery scripts for handling this are at a very basic stage, and the next week will be spent in coding the Ajax calls and handling the PHP side of this task.  There is a possibility that this task might extend beyond the two weeks allotted to this, but week 10 has simpler tasks scheduled, so I should be able to complete this feature well.
  • Fixing bugs mentioned on the phpmyadmin-devel list:
    • Index not defined error for $GLOBALS['cell_align_left'], reported by Marc and Dieter has been fixed.  During an Ajax call, one of the files that generates the HTML head is not included, which was leaving this variable undefined.  Put in a check in the PMA_showMessage() function, where the error was being thrown.
    • Dieter suggested that I update the links/initials for paginating the users list shown on top, both when a new user is added and when the last user with a particular initial is dropped.  Completed this feature.
    • Also, pagination of user’s list was facing caching issues, as Marc noticed.  Added a random variable that prevents this from happening.
  • Modified the PMA_mysqlDie() function to support Ajax requests and improved the error handling on sql.php and Table Search pages, a few conditions were not covered properly in the last week’s code.

Tasks for Week 9:

  • Last week, I mentioned that I had fixed the bug that caused the empty notifications shown at times during an Ajax request.  It seems that I had caught only one of the reasons causing the bug, there’s another condition that I’m trying to fix.
  • Complete inline editing ajaxification: Handle the transformed values as well as truncated and relational values.  Modify PHP code for the submission of the Ajax request.
  • Continue testing for bugs and fix them.
  • Find/figure out a better CSS styling for the notification division.  It does not stay centered when the length of the notification’s message is more than 2 words.  Also, add similar styling rules to the Darkblue/orange theme.

And yes, yesterday, I received the mail confirming that I passed the mid-term evaluations for the Google Summer of Code! :)

Share/Save

by Ninad at July 18, 2010 09:52 AM

July 14, 2010

Lori Lee

GSoC – July 14

Stuff I did last week:

  • Fixed all of the stuff in this post except the back button thing which I am still working on
  • Finished the reveal-on-click table actions
  • Testing on the ENUM/SET editor
  • Added option to configure the default export method in config.inc.php, as requested

To do this week:

  • Fix that back button
  • The submit button in the ENUM/SET editor currently serves two purposes (submits the form and refreshes the form with additional new text fields) which is bad design; going to fix that
  • Test the reveal-on-click table actions
  • Begin redesign of the main page (though I do not know what the status of the new icon set is)

Filed under: Google Summer of Code

by Lori at July 14, 2010 07:07 PM

July 13, 2010

Ankit Gupta

Weekly status report -Gsoc

Hi all,

Finally the ‘Query Building’ part of visual builder has started !!
Select options with rename and aggregate operator part of query building is complete .

To store select options i used a select_field[] array, some changes were made to implement select * option, query for rename and aggregate operator is done.
A Query window is also created which shows the query built.

Next week i am planning to complete From part of builder and start working on where.


by ankitgupt at July 13, 2010 10:32 PM

July 12, 2010

Ninad Pundalik

Summer of Code – Week 7

Tasks completed in Week 7:

  • Converted the Insert page to Ajax.
  • Converted the Table Search page to Ajax.
  • Removed all remaining inline calls to confirmLink() and confirmAction() and modified the code so that jQueryUI’s dialogs are used.
  • Fixed issues reported on the mailing list:
    • The Ajax notification shown on the top of the page lingered at times, partly visible when it should have completely hidden.  Fixed it.
    • An empty notice division was generated whenever an SQL query was being retrieved over Ajax.  That div is no longer visible.

Tasks for Week 8:

  • Add newly created users and tables to their forms when on privileges and database pages respectively.
  • Begin modifications of inline editing of data retrieved from a table.  Create the necessary classes for inline editing and write jQuery scripts that will replace the HTML content with appropriate forms/input fields.  The PHP handling of the submissions will be covered in the next week.
  • Continue fixing the bugs reported on the developers mailing list.

Share/Save

by Ninad at July 12, 2010 06:52 PM

Piotr Przybylski

User preferences – week 7

Import and export for files in JSON format and for HTML 5 local storage is almost complete. There are still a few things that don’t work and a few I want to add, but basic functionality is there.

User preferences are moved to server top level menu, along with a new page for import and export.

This week I will finish preferences import/export, and try to catch and fix all remaining bugs. The next task is to check whether all user-editable string inputs are safe to use and add value escaping where it is needed.

by Crack at July 12, 2010 04:34 PM

July 11, 2010

Martynas Mickevičius

GSoC 2010 Week #7 report

Hey everybody,

quite a lot have happened this week. Let me have a peek to the commit list...

Aha. First of all I have found one serious bug that was present in the demo server. There was no GD extension installed there. Not quite a bug you may say, but it took me some hours to figure that out. So then I implemented some error checking and notification.

Besides error checking I changed the structure of some classes responsible for charts. This helped me to introduce new chart types quite easily. Now you can choose among bar, line, radar and pie charts for query results chart. I am still not quite happy with the new structure. There are some places where I would like to use multiple inheritance. But this only says that the design is not perfect.

Next week I will start the implementation of JS charts using flot. So for now static image chart code will stay as it is. I believe I will have to change it in some way or another because I would like to have image and JS charts looking similar, but JS charts having interactivity. I am really looking forward to this part. JS is always somewhat challenging to me. (:

See you after week!

by Martynas (noreply@blogger.com) at July 11, 2010 07:46 PM

July 08, 2010

Lori Lee

Usability Test Results – Import and Export

I performed usability tests on the Import and Export forms with 3 subjects*. They all have intermediate to advanced knowledge of databases. The following are problems that they encountered while performing a list of tasks which I posted earlier. I listed them in order of importance and number of occurrences.

Problem: When the user is viewing the output as text, clicking the Back button results in nothing happening or messes up the form (i.e. some of their settings are erased).

Solution: To be honest I have no idea what causes this to happen or how to fix it.

Problem: The file name template usage is difficult to understand. The “1″ superscript was at first not seen at all, but when it was seen, none of the users tried to hover over it. When one user finally saw the footnote, he thought that the forward slash was part of the template (i.e. “__SERVER__/“)

Solution: Maybe the superscript can be changed to     instead, with the reveal-on-hover info box but removing the footnotes. If they don’t have JavaScript, when they click on the     there can be a page anchor to footnotes at the bottom.

Problem: It is not obvious when you are in table, database, or server mode and that each mode has slightly different options.

Solution: I created headings for both forms saying which mode the user is currently in:

  • Exporting databases in the current server
  • Exporting tables in the database “the database name”
  • Exporting rows in the table “the table name”
  • Importing into the current server
  • Importing into the database “the database name”
  • Importing into the table “the table name”

Problem: It is confusing why the default column termination symbol for CSV is a semi-colon when a comma is expected (“comma-separated values”). Users also had to re-read the label “Columns terminated with” to understand what it meant.

Solution: I just changed the default to a comma and changed the label to “Columns separated with.”

Problem: The user is unable to predict whether or not the file type will be added as a suffix to the file name (ex. “mytable.sql” versus “mytable”)

Solution: We can check for whether or not they included the suffix. If they did, then don’t add it in.

Problem: When selecting a file to import by browsing, the text says “Browse the server” but the user is actually browsing their own computer.

Solution: I changed this to “Browse your computer.”

* Edit: I should have tested 5 people, according to Jakob Nielsen, and I really wish I could but it’s really hard to find participants :(


Filed under: Google Summer of Code

by Lori at July 08, 2010 11:21 PM

GSoC – July 7

Stuff I did last week:

  • finished the no Javascript version of the ENUM/SET editor
  • finished implementing the no Javascript version of the Import and Export forms
  • some browser testing
  • another usability test (will post results of all later)
  • started working on the reveal-on-click table actions

I still have not been able to find a Windows machine so I can test in IE which is really annoying. I’m going to have to wait until the beginning of August to do this.

To do this week:

  • update Import/Export based on usability test results
  • finish the reveal-on-click table actions
  • begin testing ENUM/SET editor

Filed under: Google Summer of Code

by Lori at July 08, 2010 12:54 AM

July 06, 2010

Martynas Mickevičius

GSoC 2010 Week #6 report

Hello,

as I said earlier I was away for the whole previous week. Now I am back ready for some coding action.

This week I will iron out the problems that the demo server has with the charts. I have tried to do this old-fashioned way and by now I believe that there is something to do with different GD versions. Because of this I will also add some version checking and error message generation to the code. It is always good to do this before any errors happen or you can loose some time while hunting bugs as I have.

After this I think I will be ready for JS chart implementation.

Take care,
Martynas

by Martynas (noreply@blogger.com) at July 06, 2010 08:22 PM

July 05, 2010

Piotr Przybylski

User preferences – week 6

Import and export options are in place. After giving it some more thought, I settled on manually copying all options to configuration files. It meant more work to get it done, but allowed me to group similar formats and keep form list short. Also, loading everything from plugin files would mean reading a dozen of additional files and storing a big cache array in session.

Besides taking care of the remaining options, I finally removed all unnecessary strings from messages.inc.php and finished refactoring of old code.

This week I plan to add import and export functionality for user preferences, and HTML 5 persistent storage.

by Crack at July 05, 2010 05:30 PM

Adnan Mughal

Google summer of code | 6th week

During the 6th week of Google Summer of Code, I finally completed the structure of Relation Schema and PDF is successfully working now with the new OOP structure of Relation Schema.  SVG Schema structure is also ready to implement now. Dia structure is also inline ..  I documented some classes and renamed the methods/code according [...]

by Muhammad Adnan at July 05, 2010 01:46 AM

July 04, 2010

Ankit Gupta

Weekly status Report-Gsoc

Hi all,

Last week i travelled a lot, made a round trip to delhi and then to bangalore, so was not able to do much though i almost completed the history tab(have to remove a few bugs), now have to test it on other browsers, currently i have tested only on firefox v 3.6.6 .

Last week tasks done

  • improved the styling of history tab
  • Added new delete button .
  • Added edit option,for where,rename and aggregate to change these options.
  • Added detail button in history tab.

Tasks for next week

  • Check history tab on other browsers.
  • build a data-structure to store selected columns.
  • build a query window.
  • start on query building :)

by ankitgupt at July 04, 2010 05:25 PM

Ninad Pundalik

Summer of Code – Week 6

Tasks done in Week 6:

  • Localise the jQueryUI Dialog buttons :   Done.
  • Conversion of SQL pages to Ajax:  Completed the conversion of Ajax of the retrieval of a query’s result, pagination of the results table and sorting of the results.
  • Wrote a rudimentary script for retrieving the results of the Database Search page.

Tasks for Week 7:

  • Convert the Insert Page to Ajax.
  • Some JavaScript functions still have inline calls which have not been removed.  Complete this task.
  • Convert the Table Search page to Ajax.

Share/Save

by Ninad at July 04, 2010 06:54 AM

July 01, 2010

Lori Lee

GSoC – July 1 (Happy Canada Day!)

Stuff I did last week:

  • another usability test for Import and Export forms
  • finished the Javascript version of the ENUM/SET editor
  • started working on the no Javascript version of the ENUM/SET editor
  • trying to figure out how to implement a no Javascript version of the Import and Export forms

Stuff to do this week:

  • finish browser testing and usability testing for the Import and Export forms
  • finish the no Javascript version of the ENUM/SET editor
  • finish implementing the no Javascript version of the Import and Export forms

Filed under: Google Summer of Code

by Lori at July 01, 2010 03:07 PM

June 28, 2010

Piotr Przybylski

User preferences – week 5

Changes for the previous week:

  • setup script generates nicely formatted arrays when needed
  • new configuration oprion: $cfg['UserprefsDisallow'], allows to disallow user modifications to some values
    each setting in setup script that can be overridden by users now has a checkbox which allows to modify UserprefsDisallow
  • disabled options are marked as such in user preferences panel, tabs now have icons (I reused already available ones)
  • user preferences are applied immediately after save (at least from a user’s viewpoint), if any changed setting concerns the navigation frame, it is reloaded

In the meantime, Michal Čihař set up demo servers with all Summer of Code projects, updated to reflect current state of our repositories. If you are interested how we are doing, take a look:

My original plans for this week consisted mostly of clean up of refactored code, which is already done, so now I intend to take a closer look at import and export plugins. I have not decided yet whether I will duplicate all settings and put them in my configuration forms (the easy and inflexible way), or change plugins in a way allowing me to automatically read required information directly from their files (more complex but flexible, all future plugins and changes would not require any changes to user preferences).

by Crack at June 28, 2010 03:10 PM

Ninad Pundalik

Tasks done in Week 5:

  • Modify the behaviour of all SQL pages so that the result of the query is retrieved via Ajax and displayed on the same page:  A rudimentary script has been written to do this task, and hooked in on the Server, Database and Table SQL pages.  Fixed some jQuery conflicts with document.write() to get this working properly.
  • Fix issues reported on the development list:
    • Use localized strings for messages in jQueryUI dialog using gettext.
    • Fixed bug noticed in PMA_ajaxResponse().
    • Fixed the bug due to which the database did not reload on renaming the database.
    • jQueryUI dialogs were not closed and removed correctly.  Fixed this.
    • Show the SQL query too when renaming a databse.  Modified PMA_showMessage() so that it will do this work.
    • Hooked in the validation function for Add a New User form.

Tasks for Week 6:

  • Complete the conversion to Ajax for the SQL pages and also paginate the results.
  • Test changes made till now, continue fixing bugs reported on the mailing list.
  • Figure out how to localize the jQueryUI Dialog buttons and make the necessary changes.
  • If time permits, modify the Database and Table Search pages.  This makes use of a logic similar to the SQL pages, and hence, should re-use the code written in this week.

Share/Save

by Ninad at June 28, 2010 02:31 PM

Due to some issues at my hosting service, this blog post is appearing almost a week late. I am extremely sorry for the trouble caused.

Tasks done in Week 4:

  • Improved the PMA_ajaxShowMessage() function.  Now, multiple messages won’t be shown at the same time.
  • Ajaxified “Rename Database”, “Copy Database” and “Change Database Charset” actions on db_operations.php
  • Ajaxified “Flush Privileges”, “Revoke User”, “Export Privileges” actions.
  • Wrote a PHP wrapper function for generating JSON responses in an Ajax request.
  • Ajaxified “Drop Column”, “Add Primary Key” actions on tbl_structure.php.
  • Asked the phpMyAdmin developers mailing list to provide testing feedback on changes made till now.

Tasks for Week 5:

  • Modify all SQL pages where the user enters an SQL query and retrieve the result via Ajax.
  • Fix issues reported while testing by the developer mailing list.

Share/Save

by Ninad at June 28, 2010 02:11 PM

Due to some issues at my hosting service, this blog post is appearing almost 2 weeks late.  I am extremely sorry for the trouble caused.

Tasks for Week 3 and their status:

  • Refactor JavaScript functions:  Except for 4-5 calls to confirmLink(), and confirmAction() and checkSqlQuery(), all other functions listed on the wiki page have been re-factored with jQuery.  The corresponding inline calls to those functions have been removed and jQuery scripts written to handle the features.
  • Handle submission of the “Add a User” form:  Work in progress.  Testing the changes made, will be completed soon.
  • Write a PHP function that standardizes response for an Ajax request: Pending.
  • Style the Ajax notifications div: Pending.
  • Ajaxified “Drop Table” and “Truncate Table” actions on db_structure.php.

Tasks for Week 4:

Deliverable 4: Convert the Server Privileges page (server_privileges.php) to Ajax.  This includes the following work

  • Add a new user
  • Revoke a user
  • Edit privileges
  • Export privileges
  • Paginate table of users
  • Flush Privileges

Share/Save

by Ninad at June 28, 2010 01:56 PM

June 26, 2010

Ankit Gupta

Weekly status report

History tab is taking more time than what i planned :( , still i have to improve styling and add few features.

while implementing i realized that clubbing  all object with same table name together will be a good option ,as user can easily see what all conditions are  imposed on a particular table.

I have made a history_array[] to store all the history objects(where,rename,aggregate,groupby,orderby).
so now we will have all the information needed for query building in this data structure.

for the next week i am planing to complete history tab, improve the styling and  add edit and remove features


by ankitgupt at June 26, 2010 07:35 AM

Adnan Mughal

5th week

5th Week is over and I have committed what I have done so far. Following is the demo server URL http://demo.phpmyadmin.net/gsoc-adnan/ where you can see it in action. PDF is working fine with rewrite of some of its structure. while SVG is in process. waiting to hear the structural comments about my code from my [...]

by Muhammad Adnan at June 26, 2010 12:53 AM

June 25, 2010

Martynas Mickevičius

GSoC 2010 Week #5 report

Hello all,

this week was spent implementing charts for the query results. As mentioned in my latest blog post I implemented rendering charts for the query results in two formats.

The branch that I am working on is available here. Unfortunately charts are broken there, even they work on my local web server. I have yet to find what is wrong.

This week was a very short week for us lithuanians. On Thursday and Friday we have celebrated mid-summer which is a national holiday here. I will be taking the next week off because I will attend at social experiment.

I will be back to business the week after. Then I will be getting ready for JavaScript chart implementation. Can't wait! See you then!

by Martynas (noreply@blogger.com) at June 25, 2010 08:40 PM

June 24, 2010

Lori Lee

GSoC – June 23

I’m supposed to be doing testing this week, however I have to wait til next week to get my hands on another computer where I can test in Chrome and IE, which I can’t do on my computer (Mac OS X Tiger). Also because of the G20 thing going on in Toronto, the University of Toronto is closed so I don’t have a place to do usability tests.

I did do one test today remotely, where the participant recorded a screencast and thought outloud but not everyone has a microphone and I would also prefer to observe it in person. I also had him use the demo version of my branch hoping that nobody would alter the tables while he was doing it (lol). I scheduled another one for next week and will write up some results later but in the meantime I’m going to begin working on the ENUM editor.

Regarding the usability test I did today, I wrote out a list of tasks for the participant to do. However, because it was the first time that someone else ran through them, there were a few problems in the way I designed them. I still found the results useful though and re-wrote the list of tasks (they are at the end of this post).

Guidelines from Steve Krug’s “Rocket Surgery Made Easy”:

  • The tasks chosen should be
    • the most important ones that people have to be able to do
    • the things I suspect people are going to have problems with
    • things that other sources of information suggest people have had trouble with
  • Make the tasks into scenarios – I can’t really do this because it’s such a specialized application

Suggestions for new tasks are welcome. Also, if you want to do the tasks yourself and to see if you encounter any problems and give me feedback that would be good. It takes about 30 minutes to do the whole thing.

Stuff:

  1. The list of old tasks
  2. The list of new tasks (updated on June 24)
  3. My branch on the demo server

Filed under: Google Summer of Code

by Lori at June 24, 2010 03:55 AM

June 22, 2010

Martynas Mickevičius

Query results chart

Hello,

while the code for generating charts for the status page and the profiling page was more or less trivial, code for the query results will be more complicated. This is because of the dynamic data structure that query results can have. You can get any number of rows and columns as a result. Also the data in the result is composite - there are strings, numbers, dates, etc.. Not everything is suitable for one chart or another.

I decided to introduce two (for now) query result formats that must be followed when you want to put your data to the charts. If this format is followed code will recognise that and will render a chart which suits best.

For now I will be talking about two types of charts: simple bar charts and stacked bar charts. For the simple bar chart we need to provide X and Y axis value pairs, something in a lines of this:
<style>table {border-collapse:collapse; margin:auto;}table thead {font-weight:bold;}table thead td {border:2px solid black; padding:0px 20px;}table tbody td {border:1px solid black; text-align: center;}</style>
MonthSum
2009-11225
2009-121157
2010-01569
2010-02282

You could imagine now that the chart for this table would look like this:


Now this is easy. What if we know that the total amount on every month is composed of different parts and we would like to see them in the chart as well. For this we will have to add another column which specifies which component the data belongs to. This breaks the monolithic bars into the bars composed of series of data.

MonthSumOperator
2009-11129Bite
2009-1140Omnitel
2009-1156Tele2
2009-12176Bite
2009-12707Omnitel
2009-12274Tele2
2010-01422Bite
2010-01108Omnitel
2010-0139Tele2
2010-02110Bite
2010-02131Omnitel
2010-0241Tele2

For this data generated chart would look like this:


Note that for both charts labels for X and Y axis were taken from the column names. It is nice to have such details taken from the query result. However I would also imagine that some users would prefer to set details like these in the chart generation page. I will be adding some options there which will have default values but will give the ability to change them to whatever you like.

So If you would like to put your data to these gorgeous charts generated by pChart just write a MySQL query which puts your data to the formats described above and you are done. Any other chart types which are suitable for query results?

by Martynas (noreply@blogger.com) at June 22, 2010 09:35 AM

June 20, 2010

Piotr Przybylski

User preferences – week 4

Report for 4th week of Google Summer of Code.

Saving settings to database took me longer than I anticipated, so not everything I planned got done during this week. After finding a proper way to handle pmadb and finding a good place to call settings loading, I hit an unexpected problem with input validation – setup script’s code allowed to actually save incorrect data after showing a warning (what, after writing it myself two years ago, I totally forgot). I modified the approach for user preferences to disallow it, so that users will be able to save only forms that pass all validation rules.

So in short, tasks done:

  • forms are properly styled
  • user preferences are integrated with phpMyAdmin: saving and loading works
  • added proper error handling when submitting forms with erroneous data

My plans for the next week include integration with setup script (setting which options can be configured by end users). If I find time between learning for my exams, I will also clear my backlog – add Import and Export options.

by Crack at June 20, 2010 11:24 PM

Martynas Mickevičius

GPRS internet on your PC using a mobile phone modem

Hey,

I have thought for some time that it would be quite cool to have the internet anywhere you go using the GPRS network. All of us carry some mobile phone device. Not all of us know that almost every mobile phone can be connected to the PC and be used as a modem for GSM or even GPRS data transfer. Even better, mobile phone can be connected to the PC using Bluetooth - no unnecessary cables! When I saw that my carrier (Tele2) allows me to use 1 GB for 1 LT (~3.5 EUR) every month I decided to figure out how to put everything together.

The first thing I did was download mobile internet settings from my carriers web page and set the new connection as a default one in my mobile phone. Then I have found quite a good tutorial in the carriers home page. It basically deals with how to set up the dial-up connection on Windows XP using GPRS through a mobile phone. You can find it here (mirror). This is in lithuanian but has many pictures so it is quite easy to understand the general idea.

However there was a catch. I did follow every step from that document but with both my mobile phones I got the Error 31 when trying to connect. As I have discovered later this was due to not set GPRS APN setting in my mobile modem. To set it you will have to connect to your mobile phone modem using some terminal program. I have used puTTY.

First of all you have to know the COM port that your phone modem has been assigned to. You can do this by clicking twice on newly created dial-up conenction and then Properties.

The port that I want to use happens to be COM27. So fire up puTTY, select Serial as connection type, type in COM27 as serial line and click Open. Black screen will show up. To test the connection type in AT and press enter. If OK shows up you are good to go. Note that some mobile phones require a confirmation when someone is trying to access their modem through Bluetooth or USB.

The mighty command (I found it here) that you have to enter is: AT+CGDCONT=1,"IP","<YOUR GPRS APN>". I do not really know why does this do the trick, but it does. (: If you did everything right OK will show up. You can check if this information is saved by typing in AT+CGDCONT?. I have noticed that this information stays saved even between mobile reboots. So it seems that you only have to do this once.

Now close the puTTY window and give a few seconds for a mobile modem to close the connection. Then try to initiate dial-up connection from your PC and emerge into to the meadows of not so fast internet.
Now whenever I have my laptop in the wild with me and I need connectivity for one reason or another I just activate Bluetooth on my phone and that's it. I have tested this with two not so new and shiny mobile phones - Motorola E398 and E2. Both have worked but the connectivity was not very stable. There was about 40% of dropped packets when I was pinging to google.lt. Nevertheless it is better than nothing. (:

This was my little adventure on an early Sunday morning. See you.

P.S. I posted this from my notebook using GPRS internet. (:

by Martynas (noreply@blogger.com) at June 20, 2010 02:43 PM

GPRS internet on your PC using a mobile phone modem

Hey,

I have thought for some time that it would be quite cool to have the internet anywhere you go using the GPRS network. All of us carry some mobile phone device. Not all of us know that almost every mobile phone can be connected to the PC and be used as a modem for GSM or even GPRS data transfer. Even better, mobile phone can be connected to the PC using Bluetooth - no unnecessary cables! When I saw that my carrier (Tele2) allows me to use 1 GB for 1 LT (~3.5 EUR) every month I decided to figure out how to put everything together.

The first thing I did was download mobile internet settings from my carriers web page and set the new connection as a default one in my mobile phone. Then I have found quite a good tutorial in the carriers home page. It basically deals with how to set up the dial-up connection on Windows XP using GPRS through a mobile phone. You can find it here (mirror). This is in lithuanian but has many pictures so it is quite easy to understand the general idea.

However there was a catch. I did follow every step from that document but with both my mobile phones I got the Error 31 when trying to connect. As I have discovered later this was due to not set GPRS APN setting in my mobile modem. To set it you will have to connect to your mobile phone modem using some terminal program. I have used puTTY.

First of all you have to know the COM port that your phone modem has been assigned to. You can do this by clicking twice on newly created dial-up conenction and then Properties.

The port that I want to use happens to be COM27. So fire up puTTY, select Serial as connection type, type in COM27 as serial line and click Open. Black screen will show up. To test the connection type in AT and press enter. If OK shows up you are good to go. Note that some mobile phones require a confirmation when someone is trying to access their modem through Bluetooth or USB.

The mighty command (I found it here) that you have to enter is: AT+CGDCONT=1,"IP","<YOUR GPRS APN>". I do not really know why does this do the trick, but it does. (: If you did everything right OK will show up. You can check if this information is saved by typing in AT+CGDCONT?. I have noticed that this information stays saved even between mobile reboots. So it seems that you only have to do this once.

Now close the puTTY window and give a few seconds for a mobile modem to close the connection. Then try to initiate dial-up connection from your PC and emerge into to the meadows of not so fast internet.
Now whenever I have my laptop in the wild with me and I need connectivity for one reason or another I just activate Bluetooth on my phone and that's it. I have tested this with two not so new and shiny mobile phones - Motorola E398 and E2. Both have worked but the connectivity was not very stable. There was about 40% of dropped packets when I was pinging to google.lt. Nevertheless it is better than nothing. (:

This was my little adventure on an early Sunday morning. See you.

P.S. I posted this from my notebook using GPRS internet. (:

by Martynas (noreply@blogger.com) at June 20, 2010 02:42 PM

June 19, 2010

Martynas Mickevičius

GSoC 2010 Week #4 report

Hej,

there has been quite a lot of activity happening this week. First of all after some discussion I have scrapped the flash implementation of the charts. We have decided that the same chart functionality can be achieved using JS. And since JavaScript is still needed to load the data to the flash charts it does not really make much sense to have flash and JS.

This week I have implemented static image charts using pChart library. Before that I thought of implementing image charts by myself. However after stumbling upon (tm) pChart I have changed my mind. For now charts are working at the status and profiling pages. I have some code to generate charts from the query results, but I will push that and write a blog post completely on that a little bit later. These are still more or less prototypes. I do feel that it is better to try different approaches and be not afraid when deciding to go or not to go in some particular way.

Working with pChart library is quite nice. Everything is in one file hence the very easy installation. Charts look sleek and clean. The only drawback is the chart generation type. It feels that it takes extra one or two seconds to generate a chart.

During the next week I will be working on the charts for the query results. This is the most tricky part. Data is quite dynamic there and generally can be anything, thus I have to make sure to not get the user lost. More on that later...

Take care.

by Martynas (noreply@blogger.com) at June 19, 2010 09:56 PM

June 17, 2010

Lori Lee

GSoC – June 16

Stuff I did last week:

  • continued implementing the new import and export forms

To do this week:

  • finish implementing the new import and export forms
  • begin testing

Filed under: Google Summer of Code

by Lori at June 17, 2010 01:03 AM

June 16, 2010

Ankit Gupta

Status report Gsoc week 3

last week i started working on history tab

Tasks Done

  • J-Query : was thinking to use j-query for implementation of history panel, but i have no previous experience so learned the basics.
  • implemented a OOP model for history panel.

Tasks For next week

start work on display of history with various options (delete,edit etc)


by ankitgupt at June 16, 2010 07:00 PM

June 14, 2010

Martynas Mickevičius

GSoC 2010 Week #3 report

Hello,

I am finally done with travelling and all the progress that I made last week is the progress made today. As promised I implemented the Pie chart using OFC for the query statistics.

I have put the flash file which is needed for OFC into the js/ directory. The name of the directory does not say that this is right. I believe that it should be placed into flash/ directory, but since there is no such yet (it seems that there was no Flash in PMA until me) I will temporarily keep it there.

To embed SWF file into the page I did not use SWFObject script but rather plain and simple HTML tag. I remember when some time ago this did not work correctly throughout all the browsers, but today I have tested this on every major browser using the latest version and I didn't notice any errors.

For this week I will add Pie chart to the query profiling statistics and will start working on other types of charts using OFC.

The colours and layout are not yet final. I still have to find the best place to put javascript enabled and plain image charts.

by Martynas (noreply@blogger.com) at June 14, 2010 09:01 PM

June 13, 2010

Piotr Przybylski

User preferences – week 3

Week 3 progress report for user preferences.

Things done:

  • added proper form display for most options, along with proper styling, default value setting and JavaScript validation
  • refactored setup script JavaScript code and fixed all comments to conform to JSDoc
  • added validation and translation strings for some new options

Tasks for the next week:

  • finish form display
  • add user preferences saving to pmadb
  • take care of Import and Export forms

by Crack at June 13, 2010 01:12 PM

June 12, 2010

Adnan Mughal

Google summer of code 3rd week ended !

3rd week of the coding period has been ended and I am feeling a bit comfortable now that I will be able to make the SVG and PDF Export with a better classes structure in next coming week. But I have my mid term exam at 15th June , So I will try my best [...]

by Muhammad Adnan at June 12, 2010 07:58 PM