When I first applied to Google Summer of Code (GSoC) , I didn’t know how to write a proposal and what it should look like , I did some research here and there and managed to work something out , so I decided to put them online to help would-be GSoC students , My proposals are considerably long compared to other proposals I have seen online, also proposals are usually written with minimal formatting or even in plain text , no fancy formatting is required (Unless your mentoring organization mandates it)
Bear in mind that different mentoring organizations have different requirements for their proposals , this should be your #1 priority, but almost every organization will require you to have a list of deliverable and a plan with timeline.
These proposal were both submitted to Joomla! in GSoC 2008 and 2009 and were accepted
Both documents are under CC Attribution (Just mention the source in references)
GSoC 2009 Proposal (PDF)
GSoC 2008 Proposal (Plain Text)
Hope this helps someone.
While playing with strings one should be VERY VERY VERY cautious when trying to check for a “null” value
PHP has the bad habit of considering empty strings to be “null” and “false” , for instance
1 2 3 4 | $foo = ''; if( $foo == null && $foo == false ){ echo "So PHP actually considers empty strings to be null and false"; } |
Accessing the first element in a php array can be done as easy as this
$myArray[0] = 'foo';
and you can also use “list” to access more than one index in one call
list( $first, $second, $third ) = $myArray;
This approach , however, doesn’t work with associative arrays or arrays that have non-standard integer index like
$stringIndexedArray = array('first' => 'data','second' => 'data'); $nonStandardIntegerIndexedArray = array(5 => 'foo', 7=>'bar');
I have found two methods to access the first element in such arrays, one using “reset” and the other using “array_values”
$stringIndexedArray= array( 'first' => 'Data 1', 'second' => 'Data 2', 'third' => 'Data 3', 'forth' => 'Data 4', 'fifth' => 'Data 5' ); //reset method //Average execution time : 2.8123000000003E-6 $firstElement = reset($stringIndexedArray); //array_values method //Average execution time : 3.8123000000001E-6 list($firstElement) = array_values( $stringIndexedArray );
I’ve done some profiling and turns out that “reset” method is slightly faster than “array_values” ( as seen in code comments )
For some reason my Firefox default search engine has been set to “Microsoft’s Bing” search engine, I wanted to set it back to the default “Google”, so this is what I did after some research
I accessed the config url “about:config” from Firefox and modified the following values

browser.search.defaultenginename : Google
browser.search.defaulturl : http://www.google.com/search?hl=en&q=
keyword.URL : http://www.google.com/search?hl=en&q=
My proposal for Google Summer of code 2009 has been accepted, I’ll be working for Joomla! this summer , My project will be “Workflow extension” for Joomla! 1.6
I’ll try to describe what I’m trying to accomplish to get as much feedback as possible before starting.
The workflow extension I’ll be working on will support the core content component and have the capacity to support other components.
Document workflow will be broken down into a set of “stations” ,An item will be passed from one station to another in a particular order until reaching its final station after which an arbitrary operation will be preformed “e.g. Publish article”.
MVC based, the core will act as a central controller for the whole extension, it is composed of two parts:
1. A conventional component
2. Core plugin: A system plugin that captures J! Triggers related to content saving and passes them down to “Component handlers” (See below)
Hooks will be implemented to allow developers to perform arbitrary actions when certain events occur, initially one hook will be implemented, this hook will be invoked upon transition from one station to the next.
They handle the rendering and storage of the “station” fields (e.g. comment fields, file attachments, etc…)
All component specific code will be placed here, these handlers act as a layer between the extension and the component whose content is being workflowed (e.g. com_content),
Each handler is composed of 2 files
1. An XML file that contains Meta data about the handler and a other parameters, among which is the “onSaveItem trigger name” which defines the name of the “J! Event” that is triggered when an item of the handler type is saved. (E.g. onAfterSave in com_content), the file also contains a list of supported “Final Actions”, which are the actions that can be taken when the item reaches its final destination (e.g. publish, delete, archive, etc…)
2. A php file containing implementation of the handler, it must implement the following methods ( Subject to change as needed )
• lockElement (id)
• unlockElement (id, gid)
• onItemEdit ()
• getItemRevision(id, rev)
More on getItemRevision()
If the component in question (e.g. com_content) does support version control, the method returns the requested version, if it doesn’t, then the method simply ignores the $rev parameter and returns whatever stored in the DB.
The above list of methods is a preliminary list and is subject to change as development progresses
When the workflow is saved, the component’s onSaveItem trigger is registered with core plugin so that when the event is triggered the core plugin captures it and loads the correct component handler.
When working with workflows content is likely to be edited several times before reaching its final form, which raises the question of “versioning” , This extension will NOT handle version control of content elements that are being workflowed but will have internal support for version control should it be included in future versions of the content management.
This internal support will be provided through “component handler” plugins which allows each component to have its own way of dealing with version control if it supports it, and to ignore it if it doesn’t support it.
The Administrator wants to create a new workflow for publishing content in a particular set of categories.
The Administrator will use a backend screen to create that workflow; he can specify the categories/sections he wants to be workflowed.
The Administrator defines the “stations” and the custom fields for each station and saves the workflow.
User xyz posted an article, the onAfterSave event is triggered, the core plugin captures this event and loads the component handler that corresponds to the content type (com_content handler in this case)
The component handler for “com_content” locks the article for all groups of users and unlocks it for the ACL group of station 2.
In the process of transition between two stations, A hook is invoked, calling all registered handlers, One of these handlers will send an E-mail to station users about the item that waits processing.
Station 2 user logs into J! And accesses the “pending items” view (Accessible via frontend or backend), station 2 fills the custom fields assigned to the station (comment and file attachment) and passes the article up to station 3.
The core locks the article for everybody except station 3, the article proceeds in similar manner until it reaches its final destination where the “final action” will be decided, supported final actions will be “component handler” dependent, for com_content, I cannot think of anything aside from “publish, delete, move to category/section”.
The component will have several views, but nothing out of the ordinary,except for the view that allows the administrator to create the workflow, This view will feature some javascript magic to increase usability, I’ll borrow some code from JForms :) .
Today I’m launching a dedicated website for my GSoC Project “JForms” support , I’ll be publishing news and documentation of the component there, also there’s a forum for support questions and similar stuff.
My project for GSoC 2008 was to create a WYSIWYG forms component (Web form editor) that runs on Joomla! 1.5 , This video shows a simple usage scenario ( including an encounter with a bug! )
Links:
Development trunk(SVN): http://joomlacode.org/svn/gsoc2008/JForms/trunk/
JForms blog on J! Developer website
P.S : I used CamStudio to create this video.
It’s been almost 5 month since my proposal for GSoC was accepted, I’ve learned alot in these concentrated 5 months about Mootools and J! 1.5 , I was introduced to many interesting people, Coping with College and GSoC was a bit challenging specially that I have classes during summer but things worked out well.
Final evaluation results has been announced a few hours ago, and I passed! , Which means I’ll be getting *The* T-shirt and the certificate Insha’Allah , Yaaay!
hmmm.. that’s all, I’ll go get some sleep :)
الاختراع ده ببساطة هو العدو الطبيعي للكاميرات
عبارة عن Projector بس مش بيشتغل غير لما يلقط فلاش كاميرا بتصور.
محتاج توضيح , نضرب مثال , دلوقتي شخص واقف بيصور الأهرامات مثلا , وتصادف وجود هذا الجهاز على الهرم , أول ما الشخص هيدوس على زرار النصوير الفلاش بينور , يقوم الجهاز “الصايع” ياخد باله من الفلاش و يروح عامل Projection لصورة مسبقة الاعداد , الصورة ديه هيتم اسقاطها على الكاميرا بتاعت الضحية في نفس اللحظة اللي الكاميرا بتلقط فيها الصورة , والنتيجة هتكون ان الضحية لما يشوف الصور اللي صورها يلاقي الصورة بتاعته و عليها الصورة اللي الاختراع ده عملها Projection
http://blog.wired.com/gadgets/2008/06/gun-camera-adds.html
http://blog.wired.com/gadgets/2008/06/exclusive-inter.html
الفكرة ببساطة تعتمد على جوجل و موقع Answers.com , لاحظت أن صفحة التعريف بأي كلمة بموقع Answers.com تحوي قائمة بمعنى تلك الكلمة بلغات متعددة , فيمكن استعمال هذه الخاصية كالآتي
Google Query:
site:answers.com كلمة عربية
سيقوم جوجل بالبحث في موقع Answers.com عن “كلمة عربية” وسيعيد قائمة بالصفحات التي تحوي تلك الكلمة و التي ستكون في الأغلب الصفحة التي تخص هذه الكلمة بالموقع و تحوي معنى الكلمة بالانجليزية
استخدمت هذه الخاصية للتوصل لمعنى كلمة “كوسى” في اللغة الانجليزية
site:answers.com كوسى