Planet phpMyAdmin

April 10, 2014

Michal Čihař

Heartbleed fun

You probably know about heartbleed bug in OpenSSL as it is so widespread that it got to mainstream medias as well. As I'm running Debian Wheezy on my servers, they were affected as well.

The updated OpenSSL library was installed immediately after it has been released, but there was still option that somebody got private data from the server before (especially as the vulnerability exists for quite some time). So I've revoked and reissued all SSL certificates while regenerating new private keys. This has nice benefit that they now use SHA 256 intermediate CA compared to SHA 1 which was used on some of them before.

Though there is no way to figure out whether there was some information leak or not, I have decided to reset all access tokens for OAuth (eg. GitHub), so if you have used GitHub login for Weblate, you will have to reauthenticate.

Filed under: English phpMyAdmin Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at April 10, 2014 08:00 AM

Chanaka Indrajith

Singleton with PHP

        Singleton pattern is under creational design patterns which deals with mechanisms of creating objects according to the situation. I recently used this pattern with PHP. It's very important to get to know use of this pattern.

              Singleton pattern can be used for always keep one object of a specific class while an application is running. It save the memory which is going to allocate for new objects of the class in every where inside the application. Singleton practically used for logger classes which provide global logging access point whithout logging each and every application after the main loggin operation, configuration classes which consist configuration data of an application, access resources which are in shared mode like multi threading applications, Factory design pattern which dynamically create the objects etc.

         It's very easy to implement singleton with PHP (as well as other languages). What we need to do is make a private constructor and control the creating object of this class by a public method. Following code snippet shows how to do this.

class MySingleton {

    private static $instance = null;

    public static function getInstance() {
        if(is_null($this->instance)) {
            $this->instance = new MySingleton($params);
        }
        return $this->instance;
    }

    private function __construct($params) {
        // set parameters
    }

    public function doSomething() {
        // some code
    }

}

         Since the constructor is private only the class itself can be access the constructor. getInstance method is accessible for anywhere and since that is a static method it can be used anywhere without creating an object of this class. This function handles the situations of the need of a new instance of MySingleton class by calling the private constructor if needed. Static variable is used because of the restriction of using non-static fields inside static functions.

In the places where needs to call doSomething method in MySingleton class, we call as,
MySingleton::getInstance()->doSomething()
or, if the functions inside the class is frequently used,
$my_singleton = MySingleton::getInstance();
$my_singleton ->doSomething()

It's very simple. Hope this helpful. Have a fun with singleton. :)

<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js" type="text/javascript"></script> <script language="javascript"> SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf'; SyntaxHighlighter.all(); </script>

by Chanaka Dharmarathna (noreply@blogger.com) at April 10, 2014 06:25 AM

April 09, 2014

Chanaka Indrajith

Getting Started with WSO2 ESB Connectors

Enterprise Service Bus (ESB) is the infrastructure which provides the implementation of the concept of Service Oriented Architecture (SOA). The connectors are the new concept coming with the wso2 ESB version 4.8.0 and above. Connector is an intermediate API layer, which will represent a real world developer API, while being in the ESB itself. With this post, the initial steps to create a connector will be described.

Download Maven Dependencies:
You need to checkout the source code from here and run maven install command on it. It will download set of required dependencies to your local maven repository. Following are the commands if you have a command line SVN and maven client.

$svn co https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/mediation/mediation-library/connector-template-utils/org.wso2.carbon.mediation.library.connectors.connector-archetype/
$cd org.wso2.carbon.connector/
$mvn clean install

Generate Connector Folder Structure:
Run the following maven command to generate maven project sample connector code.

$mvn archetype:generate -DarchetypeGroupId=org.wso2.carbon -DarchetypeArtifactId=org.wso2.carbon.mediation.library.connectors.connector-archetype -DarchetypeVersion=4.2.0 -DgroupId=org.wso2.carbon.connector -DartifactId=org.wso2.carbon.connector -Dversion=4.2.0


You may need give a name for the connector while processing the above process. (Let's proceed with entering googlebooks as connector name.) If the project creation success, you are ready to develop a connector with the following directory structure.

Fig. 1 : Connector Directory Structure

Before developing, there are some main components which you need to know.

Synapse Template : This is the component which calling to actual end point with the given request data. This will be placed in resources directory.

Proxy : This will handle the request coming inside to the ESB and response coming from the actual end point. This is not a part of connector, but need to invoke the connector.

Request : The request which follows the API published from the connector. This request can be REST or SOAP.

Connector for which API ?
There are large number of services which is provide in the world wide web to do a specific functions. In order to use these for developers, there will be one or several web service APIs  like REST, SOAP or a client libraries in one or several languages are provided by the service provider. Out of these, REST will be the simplest one that others since it has less work. Here we are using Google Book REST API which does not need authentication for some of services like volume search.

First we'll go the Google Books REST API documentation and identify the categorization of the services in GoogleBooks API. The services are categories like Bookshelf, Volume, Bookshelf.volumes etc. So we'll create new directory "volume" under resources directory, to place services in the Volume category.

Writing Synapse Template :
You can have a look on the sample Synapse template generated at helloWorld directory. Following synapse template is providing the service at list volume. This should be placed under "volume" directory as listVolume.xml.

<template name="listVolume" xmlns="http://ws.apache.org/ns/synapse">
    <parameter name="searchQuery" description="Full-text search query string." />
    <sequence>
      <property name="uri.var.searchQuery" expression="$func:searchQuery" />
        <call>
            <endpoint>
                <http method="get"
uri-template="https://www.googleapis.com/books/v1/volumes?q={uri.var.searchQuery}" />
            </endpoint>
        </call>
    </sequence>
</template>

Create a component.xml file in "volume" directory, with following content.

<?xml version="1.0" encoding="UTF-8"?>
<component name="googlebooks_volume" type="synapse/template">
    <subComponents>
        <component name="listVolume">
            <file>listVolume.xml</file>
            <description>List volumes matching for the given query.</description>
        </component>
    </subComponents>
</component>

Modify the conector.xml file by adding new dependency as below,

<?xml version="1.0" encoding="UTF-8"?>
<connector>
    <component name="googlebooks" package="org.wso2.carbon.connector" >
         <dependency component="helloWorld"/>
         <dependency component="googlebooks_volume"/>
         <description>wso2 sample connector library</description>
     </component>
</connector>

Now you can build the connector code and test the implemented service foe volume search method. To build the connector, run maven clean install command from the org.wso2.carbon.connector directory.

$mvn clean install

This will generate googlebooks.zip file in the target directory. You can upload this zip file through the ESB interface under connector category. Make sure you enabled the connector after uploading.

Writing Proxy :
Now you can invoke the implemented service for search volumes, by writing a proxy through ESB server interface. (Home>Manage>Services>Add>Proxy Service>Custom Proxy>switch to source view)

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="googlebooks_listVolume"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property name="searchQuery" expression="json-eval($.searchQuery)"/>
         <googlebooks.listVolume>
            <searchQuery>{$ctx:searchQuery}</searchQuery>
         </googlebooks.listVolume>
         <respond/>
      </inSequence>
      <outSequence>
         <log/>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>


Request :
Using a REST client, send following request, (you can use POSTMAN)

POST /services/googlebooks_listVolume HTTP/1.1
{
    "searchQuery":"aladin"
}

Hope you get the correct response ;)

<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"/> <link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"/><script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script>

by Chanaka Dharmarathna (noreply@blogger.com) at April 09, 2014 07:16 AM

April 02, 2014

Supun Nakandala

How I understood OSGi

Recently I was able to attend to the WSO2 Asia Con Colombo - 2014 as a student. There I learnt many new things about the WSO2 middleware suit including products like WSO2 PaaS, WSO2 Identity Sever, WSO2 App Factory, WSO2 CEP, WSO2 BAM, WSO2 API Manager etc. One important thing that I noticed in these products is that most of these products are running on a platform called Carbon. Also I came to know this Carbon platform uses a technology(or specification) called OSGi and is similar to eclipse. This made me curious about learning what OSGi and in the following posts I will be sharing my findings  related to OSGi.


What is OSGi (Open Services Gateway Initiative) ?

OSGi is a specification that describes a module system and service platform for the Java programming language that implements a complete and dynamic component model, something that does not exist in standalone Java/VM environments. These modules and services can be dynamically installed, activated, de-activated, updated and re-installed without requiring a reboot. A software module is called an OSGi bundle.

A very practical advantage of OSGi is that every bundle must define its exported Java packages and its required dependencies. This way you can effectively control the provided API and the dependencies of your plug-ins.

Importance of a Dynamic Component Model

To understand the importance of a dynamic component model think about an incrementally developed enterprise software system.

The system will first start with very limited functionality and with very few components. The interaction between these components can be easily figured out. So the initial architecture of the system will be something as follows.



But over time the requirements may grow and this will result in addition of lot of components to the system. These new components will be highly coupled. The result is a highly complicated code that is hard to understand and maintain. The resulting system will have an architecture diagram as bellow.


Another issue with this kind of arrangement is that it is very hard to make modifications to the existing components as the components as the highly coupled and doing so will introduce more problems and break the existing system.

In this kind of situation to reduce the complexity and have a more loosely coupled and more maintainable system we can use a dynamic component model. OSGi is a specification for one such dynamic component model.

How OSGi helps

OSGi makes it possible to create modular systems with clearly defined module boundaries. Defining the model boundaries enables the developers to change the component itself without affecting the other components. These boundaries are testable, repeatable and are understood by the OSGi system. There are various other ways that these can be done without using OSGi. But OSGi provides tools and ensures that people doesn't do any mistakes.


Also OSGI enables implementation of  complex systems by integrating simple systems.

How OSGi does it

OSGi does this by first defining the concept of a module. A module is jar file which contains some classes and has some identity. The OSGi define set of externals in terms of identity of the bundle (ie it's name), packages it provides and the services it expose. OSGi also defines its dependencies again in terms of identity, packages and services.

Services is one of the most important things that OSGi framework provides that is often used. It is the main contributor which enables OSGi achieves the above mentioned loose coupling.



The OSGi Architecture

OSGi has a layered architecture as shown bellow.


  • Bundles - Bundles are the OSGi components made by the developers.
  • Services - The services layer connects bundles in a dynamic way by offering a publish-find-bind model for plain old Java objects.
  • Life-Cycle - The API to install, start, stop, update, and uninstall bundles.
  • Modules - The layer that defines how a bundle can import and export code.
  • Security - The layer that handles the security aspects.
  • Execution Environment - Defines what methods and classes are available in a specific platform.

by Supun Nakandala (noreply@blogger.com) at April 02, 2014 05:01 AM

April 01, 2014

Michal Čihař

New SSL certificates

Today, I've replaced server SSL certificates with new ones issues by GlobalSign. These should not suffer of same trust problems as CACert one used so far (especially after CACert root certificate being removed from Debian).

While doing this, I had to use SNI on server to be able to decide which SSL certificate it should use. This should work for any decent browser, but I guess your scripts might have problems, but I hope this will be rare. Anyway if you will face some issues because of this, please let me know.

Other than that I've also tweaked SSL setup to follow current best practice, what could also cause troubles to some ancient clients, but I hope these are non existing in this case :-). See Qualys SSL report for more details.

Anyway thanks to GlobalSign free SSL certificates for open source projects you can use hosted Weblate without any SSL warnings.

PS: Similar change (just without SNI) has happened last week on phpMyAdmin web servers as well.

Filed under: English phpMyAdmin Weblate | 3 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at April 01, 2014 12:14 PM

March 27, 2014

Supun Nakandala

Using a Thrift JavaScript client sdk inside AngularJS

AngularJS is a very powerful JavaScript framework that can be used to develop rich client side web application. When developing such applications 99.99% of the time you will have to connect to a back-end REST API to retrieve data. Inside AngularJS you can use the $http() method to call back-end rest services.

Recently I came across a slightly different requirement. That is I wanted to connect to a Thrift service in my client application using the provided Thrift JS client sdk. First what I did was I replaced the $http calls with calls using the Thrift sdk and initialized the viewmodel variables. But even though the variables seem to be correctly updated the changes was not visible in the view. To understand the root cause for this issue I had to dig bit deep into how AngularJS bindings work.

In AngularJS when the view model variables are updated the view is also update and vice-verse. What AnugluarJS does behind the scene is that after a modification in UI or in the model variables, re-evaluates the view and the model.  But this reevaluation will only happen if the AngularJS framework identifies that an event has occurred. So when we fetch data using the AngularJS provided $http () method, an event is triggered and the necessary updating is done. But if we use a third party lib for AJAX calls this will not happen.

But this can be overcome by wrapping Thrift client inside AnangularJS service and using promises in AngularJS to notify the success of AJAX calls and then manually updating the DOM.

This is the AngularJS service that I created by wrapping the Thrift client.
<script src="https://gist.github.com/scnakandala/9811475.js"></script> And this is how I call that service inside the AngularJS controller.
<script src="https://gist.github.com/scnakandala/9811590.js"></script> The complete code example for this project including the Thrift server code can be found at [1]

[1] - https://github.com/scnakandala/echo_service

by Supun Nakandala (noreply@blogger.com) at March 27, 2014 04:27 PM

My First Web Service

Recently I was able to implement my first web service. I implemented this in php and it is a very primitive service. The fundamental idea of implementing this was to get the first hands on experience in web services. To benefit  those who are like me I would like to share my project here.

What is a Web Service?

To be frank this is a big question that I had in my mind, which I recently found the answer.  To be precise, web services are software components that can be run over the internet where those components use XML to communicate with each other (which are technically called remote procedure calls).

The main advantage of a web service is that it enables applications to be built which are platform independent and distributed.

What is SOAP?

SOAP stands for Simple Object Access Protocol. It specifies how the software components should request and receive messages within each other. SOAP messages are remote procedure calls that consist of XML which are send over HTTP. Therefore the differences between programming languages within software components does not hinders the communication between them and it allows seamless integration between them. 

Setting up the environment

For this project I used xampp server stack on linux as my server. You can use xampp for linux, wampp for windows or any other alternative server. But make sure that you have enable SOAP in your web server.


Implementing the SOAP server

The next thing I did was implementing the SOAP server. But before that there is some other thing that has to be done. That is setting up a database. In my project I implemented a simple web service which provide census data in various districts in Sri Lanka. First this data has to be come from a database. For this I used MySQL database in xampp.


  • First create a database (eg. census) .
  • Then you need to create your database table.  I implemented a table with 4 columns, first column is the district name,  second, third, and fourth columns are for the population value in each district in year 1981, 2001, and 2012 respectively.<script src="https://gist.github.com/3115704.js?file=census_db.sql"></script>
  • Then you need to insert data in to the table.
  • Now the database is ready for use.
  • The SOAP server that I implemented had only one method, get_population($district,). The SOAP server will return all the population values for that particular district in years 1981, 2001 and 2012. The following is the census_server.php code.
<script src="https://gist.github.com/3115710.js?file=census_table.sql"></script>
<script src="https://gist.github.com/3115687.js?file=census_server.php"></script> Now the SOAP server is ready for action. The next task is to implement the SOAP client.

Implementing the SOAP client.
I implemented a simple SOAP client in php. The following is the code for it. The content is self explanatory. <script src="https://gist.github.com/3115980.js?file=client.php"></script>

Implementing a web page for the SOAP client

Now the web service components are almost completed. But we need to provide an interface to the SOAP client. The following code implements the web interface for the client.<script src="https://gist.github.com/3116054.js?file=gistfile1.txt"></script>

Now everything required for the web service to work is implemented. The bellow picture shows my web service in action.


by Supun Nakandala (noreply@blogger.com) at March 27, 2014 02:53 PM

March 25, 2014

Supun Nakandala

Google Summer of Code 2013

This summer I was selected as a GSOC student to contribute to phpMyAdmin. I am really thankful to Google and phpMyAdmin for giving me this opportunity. My project is to refactor the SQL executor and Column's structure manipulation code.

Short description:
The goal of this project is to refactor the SQL executor and Column's structure manipulation code. To improve readability, reduce complexity, and to improve maintainability I am suggesting to refactor the SQL executor and Column's structure manipulation code using better approaches. The code will be refactored according to various code refactoring techniques mainly focusing on componetization and extract method.

My project proposal can be found here:
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/scnakandala/1

My github repository can be found here: http://github.com/scnakandala/phpmyadmin

In the coming weeks starting from 17 th of June I will be working on this project and I will use this blog to record the status of my work and to share interesting things that I find.

by Supun Nakandala (noreply@blogger.com) at March 25, 2014 02:00 PM

March 24, 2014

Michal Čihař

GSoC 2014 applications for phpMyAdmin

As usual, I look at the application stats for phpMyAdmin just after student application period of Google Summer of Code is over.

First of all we got more proposals than in last years, this time there is way more students from India and discussions on mentors lists shows this is quite similar for other projects. Maybe it's just different timing which works better for students there, but there might be different reasons as well. There is also quite low number of spam or bogus proposals.

Same as in past years, people leave the submission to the last moment, even though we encourage them to submit early so that they can adjust the application based on our feedback.

Number of applications over time

Anyway we're just working on evaluation and will finalize it in upcoming days. Of course you will know the results from Google on April 21st.

Filed under: English phpMyAdmin | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at March 24, 2014 11:00 AM

March 21, 2014

Michal Čihař

Automatically checking pull request on GitHub

Since introduction of Developer's Certificate of Origin in phpMyAdmin, we've struggled with automatically checking pull requests on GitHub that they match this.

First attempt was to integrate this check into Travis environment, but that proven to be hard to understand by potential contributors as it did not give direct feedback what went wrong. So it was still useful for us, but still we had to explain the situation. With recent flood of contributions from potential GSoC students, it became quite tedious task.

So let's automate that. GitHub has quite powerful API, so it should not be that hard. Looking at Webhooks documentation, it is quite easy to get hooked on pull request creation and updates and checking commits and adding comments is just a piece of cake. The hardest choice was choosing language in which to implement it :-). While not finding binding for GitHub in any of my favorite language packaged in Debian. I've decided to hack this quickly in PHP without using any library and if this turns out to be limitation in future, it can be easily rewritten.

First incarnation of our commit checker did check just Signed-Off-By lines in commit messages, but I've found that there might be some other useful checks. So the script got extended for various simple coding style violations, which we see quite often like wrong indentation or using DOS end of lines (the example of all fired checks can be found in pull request 1081). You can find the code for it in our scripts repository.

Filed under: English phpMyAdmin | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at March 21, 2014 11:00 AM

March 14, 2014

Michal Čihař

phpMyAdmin participating in GSoC 2014

phpMyAdmin has been accepted for Google Summer of Code 2014. So if you are a student and thinking about how to spend this summer, you might want to join us.

As usual, we have prepared dozen of ideas, so in case you are interested, it's really the time to start to work on your application. We require you to contribute before GSoC, so that we can see you can handle the code and our tools. All details you might need are available in our applicant guide.

Our requirements might sound strict, but without them, we would drown in hundredths of applications with no clue how to decide, so do your homework and prepare perfect application. If you have any questions, get in touch with us on mailing list and submit the application to to GSoC website.

Filed under: English phpMyAdmin | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at March 14, 2014 01:00 PM

January 20, 2014

Michal Čihař

Going to FOSDEM

Same as in past year, I'm attending FOSDEM 2014. This is the best opportunity to meet with free software world in Europe and get in touch with people you know only from mailing lists.

If you want to meet me in person and discuss anything, just get in touch with me and we'll arrange it.

Filed under: English phpMyAdmin SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at January 20, 2014 11:00 AM

December 18, 2013

Michal Čihař

Weblate 1.7

Weblate 1.7 has been released today. It comes with lot of improvements, especially in translation speed and many new features.

Full list of changes for 1.7:

  • Please check manual for upgrade instructions.
  • Support for checking Python brace format string.
  • Per subproject customization of quality checks.
  • Detailed per translation stats.
  • Changed way of linking suggestions, checks and comments to units.
  • Users can now add text to commit message.
  • Support for subscribing on new language requests.
  • Support for adding new translations.
  • Widgets and charts are now rendered using Pillow instead of Pango + Cairo.
  • Add status badge widget.
  • Dropped invalid text direction check.
  • Changes in dictionary are now logged in history.
  • Performance improvements for translating view.

You can find more information about Weblate on it's website, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Ready to run appliances will be soon available in SUSE Studio Gallery.

Weblate is also being used https://l10n.cihar.com/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

Filed under: English SUSE Weblate | 1 comments | Flattr this!

December 18, 2013 11:02 AM

Weblate 1.8

Weblate 1.8 has been released today. It comes with lot of improvements, especially in registration process where you can now use many third party services.

Full list of changes for 1.8:

  • Please check manual for upgrade instructions.
  • Nicer listing of project summary.
  • Better visible options for sharing.
  • More control over anonymous users privileges.
  • Supports login using third party services, check manual for more details.
  • Users can login by email instead of username.
  • Documentation improvements.
  • Improved source strings review.
  • Searching across all units.
  • Better tracking of source strings.
  • Captcha protection for registration.

You can find more information about Weblate on it's website, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Ready to run appliances will be soon available in SUSE Studio Gallery.

Weblate is also being used https://l10n.cihar.com/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

Filed under: English SUSE Weblate | 3 comments | Flattr this!

December 18, 2013 11:02 AM

Hackweek is over

10th hackweek is over and I think it has been again great chance to hack on something. This year we even had better food supplies so interruptions from hacking were even less frequent.

As you've might have already noticed, I was working on Weblate whole week and I think it worked pretty well and I've implemented all what I wanted.

First of all, Weblate now supports login using lot of third party services (like GitHub, Facebook, Google, ...). This was achieved by using python-social-auth for that. It is quite new module for this, so hopefully it's API will stay stable enough to be usable in the long term. It was surprisingly easy to implement, though I've spent quite a lot of tweaking of the login and registration process to make it work according to my expectations.

After doing this quite big change, I thought it's about time to restructure the documentation and document new features in it. I think it now covers all important things, but if you can't find something or some parts are hard to understand, just let me know, I'll fix it.

Another quite big feature (though it won't be much visible in upcoming 1.8 release) is source string tracking. This is prerequisite for many features people have requested in Weblate's issue tracker, but these will have to wait for next releases. If you want to see some feature earlier, you can support it by money on Bountysource :-).

Weblate can now also search in all strings, which might become handy if grepping over dozen of Git repositories is not your favorite game.

And last but not least, I've implemented simple Captcha protection for new registrations as the demo server is full of bots who register there and do nothing afterward.

Basically I think this makes Weblate 1.8 feature complete and I'd like to stabilize it in upcoming weeks to release. Right now it is deployed on the demo server, where you can play with it and discover bugs :-). Also it's now time to work on Weblate translations!

Filed under: English SUSE Weblate | 0 comments | Flattr this!

December 18, 2013 11:02 AM

Enca 1.15

Enca 1.15 has been just released. It does not bring any new features, just a little of cleanup and officially moves it's code to GitHub.

If you don't know Enca, it is an Extremely Naive Charset Analyser. It detects character set and encoding of text files and can also convert them to other encodings using either a built-in converter or external libraries and tools like libiconv, librecode, or cstocs.

Full list of changes for 1.15 release:

  • Documentation improvement
  • Development moved to GitHub
  • Do not use deprecated autoconf macros

Still enca is in maintenance mode only and I have no intentions to write new features. However there is no limitation to other contributors :-).

You can download from http://cihar.com/software/enca/.

Filed under: Enca English | 2 comments | Flattr this!

December 18, 2013 11:02 AM

Trip to Switzerland

After I was at DebConf 13, we took opportunity and made short trip through Switzerland.

Even the DebConf itself brought some nice opportunities to take pictures, especially in the morning:

Then there was a day trip to Creux du Van, which is a wonderful location:

After DebConf, we've traveled to visit our friend and made some trips. The one I really enjoyed was around Luzerne and to mount Pilatus:

An while being in north of Switzerland, we simply had to see Rheinfall:

Filed under: English Photography Travelling | 0 comments | Flattr this!

December 18, 2013 11:02 AM

First day of Hackweek

First day of hackweek did not really go as planned. I had to spend too much time on tasks which I did not now I will have to do in advance.

I've started with releasing Weblate 1.7. As a part of that I update SUSE Studio images with Weblate. Unfortunately this turned out to be more challenging than usual as with new version the build script always failed but without any obvious error. After some time, I've realized that it just does not show whole output, so the last (and most important) lines are missing.

Then it was easy to spot that the problem is in Whoosh version and it's just matter of providing newer version.

After fixing the image, I could finally focus on Weblate's issue tracker and resolved few issues and questions. I've also improved some of the in application documentation and links to documentation or other resources.

Meanwhile I could also setup translation hosting for monkeysign, happy translating!

Filed under: English SUSE Weblate | 0 comments | Flattr this!

December 18, 2013 11:02 AM

Weblate 1.8 is close

Thanks to great amount of changes I've been able do in Weblate during Hackweek, the 1.8 release is quite close.

All features I wanted there are implemented and it is already running for some time on my production servers which look quite stable. The only thing which needs still some improvement are translations. So that's your chance to contribute.

Translation status

If there won't be any blocking issue, Weblate 1.8 will be released during next week.

Filed under: English SUSE Weblate | 0 comments | Flattr this!

December 18, 2013 11:02 AM

Autumn in Dolomites

It has become a tradition, that I'm going into Dolomites each October with friends using Pentax. This year the weather looked more like a winter than autumn, but still it was nice opportunity to take some mountain pictures.

We've started near Passo Rolle:

However our first night and morning was at Passo Valles:

Inevitably we had to visit some places where we've been in past as well, so we went again to Passo Falzarego:

Last morning was at Passo Gardena, though it should be last time we did this (we've said this last year as well):

Filed under: English Photography Travelling | 3 comments | Flattr this!

December 18, 2013 11:02 AM

Hiking in Slovenia

Continuing in photo blog posts, here is our last vacation - in the beginning of September we've traveled around Slovenia, mostly for hiking, but we've enjoyed other things as well.

Our first short hike was around lake Bled, which is nice lake placed in between mountains:

Afternoon we had some time left, so we've walked around Peričnik waterfall, which was close to Mojstrana where we were accommodated (if you will be looking for accommodation there, check River Cottage):

Then it came time for some serious hiking and we went up to the mountains, in the end we did not make it to Triglav because of weather, but we've gone on Cmir:

After that we had to relax a bit and visited Ljubljana and ended up near Škocjan Caves which we've visited on next day:

After relaxing evening in Saksida winery, it was time to go back to mountains. We've started visiting Tolmin gorges, which is nice natural area worth short detour:

Last days we've spent near Bovec and hiked around a bit, one of the things we've enjoyed most is trip to Krnsko lake:

This was definitely not our last trip to Slovenia as there are still some places we want to visit :-).

Filed under: English Photography Travelling | 2 comments | Flattr this!

December 18, 2013 11:02 AM

Call for Weblate translations

Weblate, a free web-based translation management system, of course also needs to be translated. Now it's right time to complete translation into your language before Weblate 1.7 will be released.

The release is currently planned on Monday, to have clean table before hacking on Weblate during Hackweek. There is not much time left so jump in right now and start translating :-).

Translation status

Filed under: English SUSE Weblate | 0 comments | Flattr this!

December 18, 2013 11:02 AM

December 03, 2013

Supun Nakandala

Clean Code: Writing Code for Humans

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler

Recently during my internship period at 99XTechnology I came across some leanings about clean coding practices. I think it is worth sharing some important facts about clean coding with you.

Three Principles of Clean Code


  • Right tool for the job
    • As software developers we have so many tools at our disposal. Selecting right tool for the job is very important. We have to recognize that every technology has it's place. 
  • High signal to noise ratio
    • In science and engineering SNR refers to the level of desired signal to level of background noise.  Clean code optimizes the signal and reduces the noise so that the reader can easily read the logic and understand the intent. 
  • Self-documenting
    • The main contributor to the code level documentation is not comment but good programming style. 

The right tool for the job.

Every developer has his/her favorite technologies. There is nothing wrong in  specializing and striving for expertise of a given tool. But a developer should not get too fixated to a tool, pattern or paradigm


When picking tools the risk of selecting wrong tool for the job exists in the boundaries. Consider the bellow set of technologies used for web applications. Each technology is used for a specific purpose
  • HTML - Semantic markup for the content.
  • CSS - Separates styling from the markups.
  • Javascript - Provides behavior.
  • C#, PHP, Python - Used for implement business logic.
  • SQL - Data storage, access and manipulation.
The boundaries between these technologies let developers in trouble.



In such a scenario some frequent bad coding practices that developers do as follows
  • Embed Javascript in html or generate HTML from javascript without having separate Js and HTML files.
  • Generate Javascript from server side programming language such as C#, PHP.
  • Storing HTML in SQL databases. Databases should contain only the row data.
  • Putting inline styles in HTML instead of a separate CSS file.
  • Generating dynamic SQL in server side programming language instead of using an ORM or stored procedure.
The bottom line is avoid using one language to write another language/format via strings. Eg Using strings in C#, Java, PHP etc. to create
  • JavaScript
  • XML
  • HTML
  • JSON
  • CSS
This ideas also called as "Staying Native". A good rule of thumb is to stick for a single language for a file. So if you have more than one language in a single file think about more different and elegant way of solving the problem.


by Supun Nakandala (noreply@blogger.com) at December 03, 2013 10:13 AM

November 21, 2013

Chanaka Indrajith

OAuth2 with LinkedIn

OAuth2 basically allows third party application, to access protected resource of a specific user. You may have seen some web applications/sites allows you to login through your Google, Facebook, LinkedIn etc accounts. As an example just try this with any mentioned account (Google, Facebook, Yahoo etc.). After giving your username password credentials you will be notified the authorities which the third party application will get if you agreed to proceed.

Some important term definitions in OAuth2:
  • Resource Owner - The person/entity which capable of granting the access to a protected resource.
  • Resource Server - The server which contains the protected resources, and capable of deal with access tokens in protected resource requests.
  • Client - The application which requests for protected resources on behalf of resource owner.
  • Authorization Server - The server which authorize resource owner, and issue access tokens to the client

Following figure shows basic flow of OAuth2 authentication process.




If you are really interested in digging more details, OAuth2 RFC will be the best resource. I strongly recommend you to go through at least up to 1.6 section in the RFC.

With this blog post, I show you how third party java application can access protected LinkedIn resources.

1. Register an application on LinkedIn. - This basically helps to create a link between LinkedIn and your application (third party application).

2. Get an access token - The access token represent the credentials to access protected resources. So your application does not need to store resource owner's credentials, but the access token.

3. Make API calls - Yes, after obtaining access token you are free to call API methods with that, until it expires.

LinkedIn official documentation contains detailed description on the above steps. You can follow those and familiar with this matter. Make sure you tried both Authorization code request and Access token request.

Now we need our application to store access token. For this we have to do some coding in the application. We can easily get authorization code with a GET request. Then we need a POST request to get access token using the authorization code and other required parameters.

So, we can get the authorization code from request parameters in the redirect uri, and make server side code request to get the access token. For this we have to use a HTTP client library. You can use Apache HTTP client library components to approach this. For process the responce you can use XML parser like DOM or SAX. Try out the sample application yourself after reaing README file. Happy coding !


Thanks to mkyong for making me comfortable with his SpingMVC example.

by Chanaka Dharmarathna (noreply@blogger.com) at November 21, 2013 06:19 PM

November 15, 2013

Michal Čihař

Autumn in Dolomites

It has become a tradition, that I'm going into Dolomites each October with friends using Pentax. This year the weather looked more like a winter than autumn, but still it was nice opportunity to take some mountain pictures.

We've started near Passo Rolle:

However our first night and morning was at Passo Valles:

Inevitably we had to visit some places where we've been in past as well, so we went again to Passo Falzarego:

Last morning was at Passo Gardena, though it should be last time we did this (we've said this last year as well):

Filed under: English Photography Travelling | 3 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at November 15, 2013 11:00 AM

November 07, 2013

Michal Čihař

Weblate 1.8

Weblate 1.8 has been released today. It comes with lot of improvements, especially in registration process where you can now use many third party services.

Full list of changes for 1.8:

  • Please check manual for upgrade instructions.
  • Nicer listing of project summary.
  • Better visible options for sharing.
  • More control over anonymous users privileges.
  • Supports login using third party services, check manual for more details.
  • Users can login by email instead of username.
  • Documentation improvements.
  • Improved source strings review.
  • Searching across all units.
  • Better tracking of source strings.
  • Captcha protection for registration.

You can find more information about Weblate on it's website, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Ready to run appliances will be soon available in SUSE Studio Gallery.

Weblate is also being used https://l10n.cihar.com/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

Filed under: English SUSE Weblate | 3 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at November 07, 2013 10:00 AM

October 24, 2013

Michal Čihař

Weblate 1.8 is close

Thanks to great amount of changes I've been able do in Weblate during Hackweek, the 1.8 release is quite close.

All features I wanted there are implemented and it is already running for some time on my production servers which look quite stable. The only thing which needs still some improvement are translations. So that's your chance to contribute.

Translation status

If there won't be any blocking issue, Weblate 1.8 will be released during next week.

Filed under: English SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 24, 2013 04:00 PM

October 11, 2013

Michal Čihař

Hackweek is over

10th hackweek is over and I think it has been again great chance to hack on something. This year we even had better food supplies so interruptions from hacking were even less frequent.

As you've might have already noticed, I was working on Weblate whole week and I think it worked pretty well and I've implemented all what I wanted.

First of all, Weblate now supports login using lot of third party services (like GitHub, Facebook, Google, ...). This was achieved by using python-social-auth for that. It is quite new module for this, so hopefully it's API will stay stable enough to be usable in the long term. It was surprisingly easy to implement, though I've spent quite a lot of tweaking of the login and registration process to make it work according to my expectations.

After doing this quite big change, I thought it's about time to restructure the documentation and document new features in it. I think it now covers all important things, but if you can't find something or some parts are hard to understand, just let me know, I'll fix it.

Another quite big feature (though it won't be much visible in upcoming 1.8 release) is source string tracking. This is prerequisite for many features people have requested in Weblate's issue tracker, but these will have to wait for next releases. If you want to see some feature earlier, you can support it by money on Bountysource :-).

Weblate can now also search in all strings, which might become handy if grepping over dozen of Git repositories is not your favorite game.

And last but not least, I've implemented simple Captcha protection for new registrations as the demo server is full of bots who register there and do nothing afterward.

Basically I think this makes Weblate 1.8 feature complete and I'd like to stabilize it in upcoming weeks to release. Right now it is deployed on the demo server, where you can play with it and discover bugs :-). Also it's now time to work on Weblate translations!

Filed under: English SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 11, 2013 02:00 PM

October 07, 2013

Michal Čihař

First day of Hackweek

First day of hackweek did not really go as planned. I had to spend too much time on tasks which I did not now I will have to do in advance.

I've started with releasing Weblate 1.7. As a part of that I update SUSE Studio images with Weblate. Unfortunately this turned out to be more challenging than usual as with new version the build script always failed but without any obvious error. After some time, I've realized that it just does not show whole output, so the last (and most important) lines are missing.

Then it was easy to spot that the problem is in Whoosh version and it's just matter of providing newer version.

After fixing the image, I could finally focus on Weblate's issue tracker and resolved few issues and questions. I've also improved some of the in application documentation and links to documentation or other resources.

Meanwhile I could also setup translation hosting for monkeysign, happy translating!

Filed under: English SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 07, 2013 02:45 PM

Weblate 1.7

Weblate 1.7 has been released today. It comes with lot of improvements, especially in translation speed and many new features.

Full list of changes for 1.7:

  • Please check manual for upgrade instructions.
  • Support for checking Python brace format string.
  • Per subproject customization of quality checks.
  • Detailed per translation stats.
  • Changed way of linking suggestions, checks and comments to units.
  • Users can now add text to commit message.
  • Support for subscribing on new language requests.
  • Support for adding new translations.
  • Widgets and charts are now rendered using Pillow instead of Pango + Cairo.
  • Add status badge widget.
  • Dropped invalid text direction check.
  • Changes in dictionary are now logged in history.
  • Performance improvements for translating view.

You can find more information about Weblate on it's website, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Ready to run appliances will be soon available in SUSE Studio Gallery.

Weblate is also being used https://l10n.cihar.com/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

Filed under: English SUSE Weblate | 1 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 07, 2013 08:30 AM

October 03, 2013

Michal Čihař

Call for Weblate translations

Weblate, a free web-based translation management system, of course also needs to be translated. Now it's right time to complete translation into your language before Weblate 1.7 will be released.

The release is currently planned on Monday, to have clean table before hacking on Weblate during Hackweek. There is not much time left so jump in right now and start translating :-).

Translation status

Filed under: English SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 03, 2013 04:00 PM

Hiking in Slovenia

Continuing in photo blog posts, here is our last vacation - in the beginning of September we've traveled around Slovenia, mostly for hiking, but we've enjoyed other things as well.

Our first short hike was around lake Bled, which is nice lake placed in between mountains:

Afternoon we had some time left, so we've walked around Peričnik waterfall, which was close to Mojstrana where we were accommodated (if you will be looking for accommodation there, check River Cottage):

Then it came time for some serious hiking and we went up to the mountains, in the end we did not make it to Triglav because of weather, but we've gone on Cmir:

After that we had to relax a bit and visited Ljubljana and ended up near Škocjan Caves which we've visited on next day:

After relaxing evening in Saksida winery, it was time to go back to mountains. We've started visiting Tolmin gorges, which is nice natural area worth short detour:

Last days we've spent near Bovec and hiked around a bit, one of the things we've enjoyed most is trip to Krnsko lake:

This was definitely not our last trip to Slovenia as there are still some places we want to visit :-).

Filed under: English Photography Travelling | 2 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 03, 2013 10:00 AM

October 01, 2013

Michal Čihař

Trip to Switzerland

After I was at DebConf 13, we took opportunity and made short trip through Switzerland.

Even the DebConf itself brought some nice opportunities to take pictures, especially in the morning:

Then there was a day trip to Creux du Van, which is a wonderful location:

After DebConf, we've traveled to visit our friend and made some trips. The one I really enjoyed was around Luzerne and to mount Pilatus:

An while being in north of Switzerland, we simply had to see Rheinfall:

Filed under: English Photography Travelling | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 01, 2013 10:00 AM

September 30, 2013

Michal Čihař

Enca 1.15

Enca 1.15 has been just released. It does not bring any new features, just a little of cleanup and officially moves it's code to GitHub.

If you don't know Enca, it is an Extremely Naive Charset Analyser. It detects character set and encoding of text files and can also convert them to other encodings using either a built-in converter or external libraries and tools like libiconv, librecode, or cstocs.

Full list of changes for 1.15 release:

  • Documentation improvement
  • Development moved to GitHub
  • Do not use deprecated autoconf macros

Still enca is in maintenance mode only and I have no intentions to write new features. However there is no limitation to other contributors :-).

You can download from http://cihar.com/software/enca/.

Filed under: Enca English | 2 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at September 30, 2013 10:00 AM

September 23, 2013

Ayush Chaudhary

Fifteenth Week / GSoC 2013

This week, GSoC 2013 officially came to an end. Although I have not had much to do over the last week or two, it has been a memorable experience. Its been a few months since I have been associated with the phpMyAdmin team and I must say that this is one great team, always willing to help. It was my first experience with open source contribution, and GSoC's motive was certainly achieved. I am now more keen than ever to contribute more to phpMyAdmin and to open source projects in general. I would like to thank my mentor Madhura Jayaratne and co-mentor Michal Čihař. They've been very supportive and helpful throughout my summer of code.

by Ayush Chaudhary at September 23, 2013 08:30 PM

Supun Nakandala

GSoC Final Update

First of all I must say that doing GSoC with phpMyAdmin is one of the best experience that I ever had in my life. My project was to refactor the sql executor and column structure manipulation code in phpMyAdmin. I am extremely happy to say that I achieved almost all the expected deliverables of the project, namely

  • A new class called sql.lib.php will be created which contains the functionality to cater the required functionality when executing a sql query.
  • sql.php will not contain html tags but calls the functions in sql.lib.php to generate the required html strings.
  • Parsing and analyzing of the sql query will be transferred to the parser.
  • Table structure manipulation scripts will not have html tags but call library functions to create the required html strings.
This was my first opensource contribution and I am grateful for phpMyAdmin and Google for giving me this opportunity and specially my mentor Marc Delisle for the support and guidance he gave to me during the summer of code program.

By working on this project I learned lot of good coding practices and learned how to avoid and eliminate complexities in code in terms of readability and maintainability. I think this learning experience will help me to become a highly effective in my coding in future.

With this I conclude my contributions for phpMyAdmin under the Google Summer of Code program. But I will be contributing to phpMyAdmin in the future by fixing bugs and adding new functionality where appropriate at the best of my capacity.

by Supun Nakandala (noreply@blogger.com) at September 23, 2013 06:10 PM

September 22, 2013

Mohamed Ashraf

Weekly update #15 [16-22/9] FINAL UPDATE

This has been a great GSoC. This was the final week I was working on the project within the GSoC program. I will be doing my evaluations soon. My code in phpMyAdmin has not been merged yet. However the server side code is complete with tests. I am hoping I will be merging the phpMA branch very soon.

This week I have done a major change to the way stacktraces are marked as different among the different incidents, to make it more versatile when reports are grouped. I have also corrected whatever few comments were given on the phpma code.

For the future work, I am going to change the way a part of the phpma code works. I want to output js in the ajax requests rather than json. js gets automatically executed and would simplify the client side js code a lot. However the current implementation of PMA_Response class does not allow js as far as I can tell. I am either going to use ‘echo’ statements or I will have to augment the response class to allow for js responses. I will also talk with my mentor about the best way for me to do this.

I hope that I will do well in my evaluations. I will definitely apply here again next year and hopefully they would have liked my previous work and accept me. This project was very appealing and interesting and allowed me to hone a lot of my web development abilities. It also taught me about designing a good architecture and about the intricacies of cakePHP. I was given freedom in many design choices and I learned from my mistakes. I also created a lot of unit tests. This was my first experience with PHPunit and I learned a lot.

This was my first work in opensource projects but hopefully it wouldn’t be the last. I am going to release at least one of the authentication components I have created as a cakePHP plugin so that no one else needs to reinvent the wheel. I will expand on them a bit and then add some unit tests and release them as a separate plugin. Hopefully this will be the first of many opensource projects that I will create.


by m0hamedashraf at September 22, 2013 10:02 PM

Adam Kang

Week 16 (0916-0922) Weekly Report

Key accomplishments last week
  • add Unit test case for PMA_tbl_chart
  • add Unit test case for PMA_tbl_indexes and PMA_tbl_printview

  • add Unit test cases for PMA_tbl_indexes

  • Key tasks that stalled
none

  • Tasks in the upcoming week
I will focus on the remaining UT and Selenium test case for PMA.

by Adam Kang (noreply@blogger.com) at September 22, 2013 02:25 PM

September 21, 2013

Bin Zu

Week 17 report (Sept 23~Sept 29)

  • Key accomplishments last week

In the last week, I finished most of the scheduled tasks.

  • Tasks in the upcoming week

As scheduled,  there are still some works left on this week

1.  multi_submit
2.  other refactor
3.  add more UT for them.

by xmujay at September 21, 2013 03:19 PM

September 16, 2013

Ayush Chaudhary

Fourteenth Week / GSoC 2013

This week too I couldn't contribute as I had my exams. However, I did find some time to partially update the Selenium wiki and I also fixed some tests that were failing as reported by Michal. I will be updating the wiki and doing other tasks and fixes as and if they come up.

by Ayush Chaudhary at September 16, 2013 08:30 PM

Adam Kang

Week 15 (0909-0915) Weekly Report

Key accomplishments last week
  • add UT for PMA_tbl_gis_visualization
  • add Unit test case for import sharp files


  • Key tasks that stalled
none

  • Tasks in the upcoming week
I will focus on the remaining UT and Selenium test case for PMA.

by Adam Kang (noreply@blogger.com) at September 16, 2013 01:45 AM

September 15, 2013

Mohamed Ashraf

Weekly update #14 [9/9-15/9]

I would have loved to say that this week I did alot but to say the truth I havent done much. It didnt help that I didnt find anything important to do, but it was mostly because I was swamped with preparations to my travel to Germany. I am writing this report in Germany right now.

As for the current state of the error reporting project. I believe it is ready to be released. I dont have any more clear ideas about how to make the system better. I have created alot of documentation and the server tests cover almost all of the code. I was actually able to do some refactoring relying on those tests safely.

I am creating another pull request with the latest changes. They are not much as stated earlier. I am going to ask the mailing list about what they think one last time. According to google next week is for docs since the soft deadline is tonight. I already created most of the docs but I think I have a little bit of undocumented code that may need some explanation.

I will be talking to my mentors on where to go from here and whether they think I should be doing something important at this time. But till then I will be getting a care free couple of days to enjoy Berlin. Hopefully I will also get the component merged into phpma/master soon.


by m0hamedashraf at September 15, 2013 04:04 PM

Bin Zu

Week 16 report (Sept 16~Sept 22)

  • Key accomplishments last week

In the last week, I finished most of the scheduled tasks.

1. investigation of refactor libraries/mult_submits.lib.php

https://github.com/phpmyadmin/phpmyadmin/pull/603/files

2. more UTs for PMA_server_privileges

https://github.com/phpmyadmin/phpmyadmin/pull/697

https://github.com/phpmyadmin/phpmyadmin/pull/680

3. add more UTs for PMA_server_status_monitor

https://github.com/phpmyadmin/phpmyadmin/pull/682

4. UTs for PMA_server_engines and PMA_server_status

 

https://github.com/phpmyadmin/phpmyadmin/pull/687

 

  • Tasks in the upcoming week

As scheduled,  there are still some works left on this week

1.  multi_submit
2.  other refactor
3.  add more UT for them.

by xmujay at September 15, 2013 03:45 PM

September 10, 2013

Mohamed Ashraf

Weekly update #13 [2/9-8/9]

This is technically my final update. I have finished with the testing and docs. I have also done some refactoring efforts of the phpma code as well as the server code. I still have some things to do but not much. I want the phpma branch to get merged soon.

I refactored the access control in the server. I also refactored the phpma code into a library and fixed failing tests. I added the documentation to all models and components. I left the controllers out for now since most of the functions are very simple. I may add some after the soft deadline. 

As for the error reporting server a few things are left like the server is not currently strong enough against a hostile attacker. I sanitize everything. and cakephp has a good security model but I believe I can make it stronger against hostile input.

I created 2 pull requests but they still haven’t been merged. I will try to have them merged this week. Next week I will be in Germany so I am not sure how much work will I be able to do there at first.

It has been a great summer working on this project. I am happy its almost complete :)


by m0hamedashraf at September 10, 2013 09:10 PM

Ayush Chaudhary

Thirteenth Week / GSoC 2013

I have been busy with my exams lately and haven't been able to contribute anything last week. I will be resuming and finishing things up after my exams, that is over the coming weekend.

by Ayush Chaudhary at September 10, 2013 04:30 PM

September 09, 2013

Supun Nakandala

GSoC week 12

This week I completed refactoring browse_foreigners.php. When refactoring that script I introduced a new library file called browse_foreigners.lib.php and extracted methods to it, which then are called by the browse_foreigners.php file.
My plan for next week is to refactor tbl_change.php and tbl_addfield.php.

by Supun Nakandala (noreply@blogger.com) at September 09, 2013 05:43 PM

Adam Kang

Week 14 (0902-0908) Weekly Report

Key accomplishments last week
  • add Unit test cases for PMA_tbl_relation

  • add Unit test case for DBIDrizzle


  • Key tasks that stalled
none

  • Tasks in the upcoming week
I will focus on the remaining UT and Selnium test case for PMA.

by Adam Kang (noreply@blogger.com) at September 09, 2013 01:41 AM

Kasun Chathuranga

Twelfth week report - Unit testing and improvements

By the start of the last week most of the scheduled developments were over as planned initially. What I planned for the last week was adding new unit tests for the code written in the second half of GSoC. With the experience of writing unit tests from the first half adding new unit tests were not very hard and I submitted a pull request with new unit tests.

While adding a new table level tab for table specific privileges I realized a limitation in the was I implemented configurable menus. In the system table that stores the allowed menus I had a column for each menu to indicate whether that tab is allowed. However this resulted in the need to change table structure whenever a new tab is added to phpMyAdmin. Hence I went on to change the table structure and submitted a pull request for that too.

With the last weeks work my planned tasks for GSoC come to an end. I've asked my mentor whether there is anything else I need to do before the deadline and would attend to any work he might pointed out. All in all it has been a very good experience and I learned a lot.  :)

by Chathuranga Jayaneththi (noreply@blogger.com) at September 09, 2013 01:04 AM

September 08, 2013

Bin Zu

Week 15 report (Sept 9~Sept 15)

  • Key accomplishments last week

In the last week, I finished most of the scheduled tasks.

1. Refactor tbl print view

https://github.com/phpmyadmin/phpmyadmin/pull/666

2. UTs for PMA_tbl_printview

https://github.com/phpmyadmin/phpmyadmin/pull/670

3. Ut for server database, privileges and other server pages

 

https://github.com/phpmyadmin/phpmyadmin/pull/672

  • Tasks in the upcoming week

As scheduled,  there are still some works left on this week

1.  multi_submit
2.  other refactor
3.  add more UT for them.

by xmujay at September 08, 2013 01:59 PM

September 03, 2013

Supun Nakandala

GSoC week 11

This week I refactored tbl_relation.php and tbl_indexes.php. For the tbl_relation.php file I intoroduced a new library file called tbl_relation.lib.php which contains the methods which are used by tbl_relation.php. For tbl_indexes.php also I introduced a new library file which contains the methods used by the tbl_indexes.php.

My Plans for this week is to complete refactoring tbl_addfield.php and start refactoring browse_foreigners.php

by Supun Nakandala (noreply@blogger.com) at September 03, 2013 05:21 PM

September 02, 2013

Ayush Chaudhary

Twelfth Week / GSoC 2013

This was pretty much my last week of work as I will be having my exams now. So I and my mentors identified a list of tasks I needed to finish before I started preparations for my exams. Some of them were: Selenium tests for tracking, import and export.

by Ayush Chaudhary at September 02, 2013 01:15 PM

Adam Kang

Week 13 (0826-0901) Weekly Report

Key accomplishments last week
  • - UT for table*
more test cases for PMA_tbl_tracking
add test for PMA_tbl_relation and PMA_tbl_tracking
add Unit test cases for PMA_tbl_*




  • Key tasks that stalled
none

  • Tasks in the upcoming week
I will focus on the remaining UT and Selnium test case for PMA.

by Adam Kang (noreply@blogger.com) at September 02, 2013 02:01 AM

September 01, 2013

Mohamed Ashraf

Weekly update #12 [26/8-1/9]

This week I have finished writing tests for the error reporting server. I have done tests for controllers and models. I am not going to test views or helpers because it would make the tests very fragile if we change a few html tags or classes. I have 100% coverage on almost all the covered files.

As for the phpmyadmin component. I refactored the functions I wrote into a library that I include. I also renamed functions to follow conventions and wrote the doc blocks for those functions.

For next week I should be documenting the error reporting server codebase. I will probably also add the copyright notice to the required files. There are some refactoring I wanted to do in the access control module. Also I am planning to do something useful to the state like add other states and provide a way to change state.


by m0hamedashraf at September 01, 2013 08:18 PM

Kasun Chathuranga

Eleventh week report - Navigation panel improvements and table specific privileges

First half of the eleventh week of GSoC was spent on followup work on the 'Navigation panel and current table' feature request. By the time I submitted the pull request for the above feature request another developer has implemented a feature that would open the corresponding database in the navigation panel when a database is selected. I previously had this implemented as a part of the pull request and I had to merge the two implementations. Further I was asked to port the merged changes to the QA4 branch so it would be released sooner than the other features.

With these changes
1. Database node is opened and highlighted when the user goes to a database. Database groups created based on the defined separator is handled.
2. Table/view is highlighted in the navigation when the user goes to a table/view. Table and view containers are handled. Table groups created base on the defined separator is also handled.

Second half of the week was spent on creating a privileges tab for table level. This feature is in lieu of 'reCAPTCHA support on login panel' feature which has already been implemented. Borrowing the idea form database level privilege tab, this tab displays all the granted privileges related the current table. While implementing I was able to reuse some of the code between database level and new table level privileges tabs.

During the next week I plan to add documentation and write unit tests for the features implemented in the second half of GSoC.

by Chathuranga Jayaneththi (noreply@blogger.com) at September 01, 2013 05:19 PM

Bin Zu

Week 14 report (Sept 2~Sept 8)

 

  • Key accomplishments last week

In the last week, I finished most of the scheduled tasks.

1. refactor server_databases: add function PMA_getListForSortDatabase

https://github.com/phpmyadmin/phpmyadmin/pull/643

2. Refactor server privileges

https://github.com/phpmyadmin/phpmyadmin/pull/652

3. refactor server_databases: add function for drop multiple databases

https://github.com/phpmyadmin/phpmyadmin/pull/655

4. UTs for PMA_server_databases and PMA_server_privileges

https://github.com/phpmyadmin/phpmyadmin/pull/661

5. Refactor table print view

https://github.com/phpmyadmin/phpmyadmin/pull/664

 

  • Tasks in the upcoming week

As scheduled,  there are still some works left on this week

1.  multi_submit
2.  other refactor
3.  add more UT for them.
 

by xmujay at September 01, 2013 04:51 PM

August 27, 2013

Kasun Chathuranga

Tenth week report - Navigation panel and current table

During the tenth week of coding I implemented the feature request '#1398 - Navigation panel and current table'. Even though I personally loved the navigation tree improvement it seems that people find it not so user friendly due to some of its shortcomings. One of them is that it does not indicate the current database or table/view when navigation was done without using it.

When implementing the feature request I used PMA_commonParams.get() function which makes the current database and table available for JavaScript level. With these variables the navigation decides where the user had navigated and open the database or table/view appropriately.

What this feature request does is,
1. When  the user is in the database level, current database is highlighted in the navigation panel. If the database is grouped under a database group the groups is opened to highlight the database.
2. When the user is in the table/view level, current table/view is highlighted in the navigation panel. Following situations are handled here.
    a. Tables/views could be directly under the database or inside 'Tables'/'Views' containers.
    b. Tables/views could be grouped based on their names.
    c. A combination of the above two.


The last two feature requests I planned to implement have already been implemented and I plan to write to the developers' mailing list to get approval for some feature requests I'm going to implement in place of them.

by Chathuranga Jayaneththi (noreply@blogger.com) at August 27, 2013 01:51 AM

August 26, 2013

Supun Nakandala

GSOC week 10

This week I completed refactoring tbl_structure.php, tbl_tracking.php and tbl_chart.php. When refactoring the tbl_chart.php I introduced a new library file called tbl_chart.lib.php and extracted methods from tbl_chart.php into it.

My Plan for this week is to refactor tbl_addfield.php, tbl_indexes.php and tbl_relation.php.

by Supun Nakandala (noreply@blogger.com) at August 26, 2013 06:36 PM

August 25, 2013

Ayush Chaudhary

Eleventh Week / GSoC 2013

It was a pretty busy last week. As the GSoC last date is approaching closer, so are my mid semester exams. Naturally, I'll not be able to do much work during and sometime before my exams. So it was important to speed up and get a good chunk of the work done.

by Ayush Chaudhary at August 25, 2013 08:20 PM

Mohamed Ashraf

Weekly update #11 [19/8-25/8]

This week is the second week for the graphs and stats task. This week was the final week of writing new functionality. Next week is docs and tests. This week I added global stats about the different summarizable facts about incidents as well as an incident chart to track incidents. I also corrected some bugs from last week and added some of the recommended functionality by some of the phpmyadmin developers

I started researching unit testing in cakephp. I have written tests before but that was for ruby on rails. Its the same concept but the available facilities are different. I shall start with writing the tests and I hope to finish all the model functions this week but I am not sure yet.

There is no major changes to the database so the old seed file should still work and no major changes to reports.phpmyadmin.net. I refactored a few parts of the codebase since I didn’t feel them elegant enough. There is probably going to be more refactoring in the coming weeks as well.

I will do some refactoring in the phpmyadmin code I wrote. Since the project is nearly over we shall be merging this code soon so it would be good to be prepared for it.


by m0hamedashraf at August 25, 2013 08:04 PM

Adam Kang

Week 11 (0812-0818) Weekly Report

Key accomplishments last week
  • - DBI runkit testing
  • Refactor the DBI mocking for Pdf_Relation_Schema_test

  • Key tasks that stalled
none

  • Tasks in the upcoming week
I will focus on the remaining UT.

by Adam Kang (noreply@blogger.com) at August 25, 2013 12:49 PM