We will be meeting at Pumping Station: One (3519 N. Elston, Chicago) this coming Saturday, December 14th, at 12 pm.We're back to our earlier start time and will be hanging around and celebrating the holidays until 5 pm. Jeff Schoeder (The Graphite Project and a GNOMEr) will be doing a talk on Graphite. Graphite stores numeric time-series data, and renders graphs of the data on demand. Bonnie King (Fermilab) will be presenting on Red Hat Software Collections, and how they are packaged and used in Scientific Linux. Afterward we'll have a christmas cookie exchange (just kidding) and generally celebrate. You can RSVP on meetup.com.
Jim Campbell has said something about having a potluck, with details being worked out on the mailing list. There isn't going to be hacking at the meeting this time, but it's been so long since I've had any hacking time that I might sneak into a quiet corner and hack anyway :)
Erik Johnson's talk on SaltStack from last month is posted now. Thanks again to Erik for speaking, and to Carl Karsten of Next Day Video for donating his time :)
Hope to see you all Saturday :)
Sunday, December 8, 2013
Saturday, November 30, 2013
Unbricking the OLPC XO-1.75 B1
A really long time ago I went to the X.Org conference in Chicago. It was actually the first tech conference I went to. At one point I nervously poured cream into the coffee tray instead of my cup; at a different point I signed up for a list to receive a developer version of the XO 1.75. The OLPC did actually send me one, but it was bricked...and having just started with Linux I was pretty intimidated by the idea of disassembling a laptop and using a terminal emulator to fix the firmware.
It's the holiday weekend in Chicago and I needed some distraction from studying for finals, so I decided to see if I could finally follow through and unbrick the XO. Somehow I always manage to misplace all of my Phillips-head screwdrivers, but after a while I found one \o/ (it was in the pencil holder :/). Soon the laptop looked like this:
I connected the serial adapter to the XO. The directions said to use a USB type A to type B connector to connect the serial adapter to the host computer. Unfortunately that was vague. I spent some time Googling and looking at pictures before I gave up, wandered over to my desktop computer, and started unplugging anything that looked promising. It turned out that the printer to USB cable was the right one.
I installed the Screen package on Fedora, changed some permissions so Screen could access the new firmware that I had on a USB drive, installed the new firmware via the terminal emulator, and then I was done :)
It's the holiday weekend in Chicago and I needed some distraction from studying for finals, so I decided to see if I could finally follow through and unbrick the XO. Somehow I always manage to misplace all of my Phillips-head screwdrivers, but after a while I found one \o/ (it was in the pencil holder :/). Soon the laptop looked like this:
I installed the Screen package on Fedora, changed some permissions so Screen could access the new firmware that I had on a USB drive, installed the new firmware via the terminal emulator, and then I was done :)
Sunday, November 24, 2013
The last month in Chicago...
Aaron Swartz Memorial Hackathon
The first weekend of November I went to the local edition of the Aaron Swartz Memorial Hackathon. I had class in the morning so I got there around 3 pm. I grabbed some cold coffee from the table and wandered around looking for something to hack on. Peter Harkins was working on a web ui for email archives that include some of archives of Aaron Swartz's email lists, old Linux Kernel archives, etc. He was re-writing the app using Riak and Ruby. After a few hours of installing packages and working through errors I got it running. Peter was using an older version of Ruby so I found a nice hack to get RMail working on my computer.
Sheila Miguez gave a talk at Chipy this month on what happened at the Hackathon. If you'd like to hear details about the whole hackathon or follow the progress of the various projects, watch her talk for more info or check out the hackpad. Thanks again to Doejo for sponsoring :)
Last weekend we had our LUG meeting. Erik Johnson from the SaltStack community gave a talk. In order to prepare he set up a four server demo environment on Rackspace and made a clone for each person attending. Throughout the talk he showed us how to switch between the various servers by using the Grains interface as well as make changes to all the servers at once. He walked us through using Pillars to set up user-defined variables, and how to use States to create modules. One thing that I found to be particularly nice about States is that Salt maintains a repo with definitions for packages across supported distros, so installing a package does not usually require the user to know the specific name a distro defines for a package. This feature is something I've often wished we had for JHBuild.
If you want to learn more about using Salt you can find links from Erik's talk on Github. Thanks again to Erik for coming into the city to give the talk. Thanks also to Rackspace for donating our server space, and to Carl Karston for taping the talk.
Our next meeting is scheduled for Saturday, December 14th at 12 pm. Note that we are changing back to our regular time this month (because I'll be done with Saturday classes \o/). More news (and a link to the SaltStack talk) when we have it.
See you next time, and happy hacking :)
Sheila Miguez gave a talk at Chipy this month on what happened at the Hackathon. If you'd like to hear details about the whole hackathon or follow the progress of the various projects, watch her talk for more info or check out the hackpad. Thanks again to Doejo for sponsoring :)
Chicago LUG
Erik Johnson demoing SaltStack at the Chicago GNU/Linux User Group |
If you want to learn more about using Salt you can find links from Erik's talk on Github. Thanks again to Erik for coming into the city to give the talk. Thanks also to Rackspace for donating our server space, and to Carl Karston for taping the talk.
Our next meeting is scheduled for Saturday, December 14th at 12 pm. Note that we are changing back to our regular time this month (because I'll be done with Saturday classes \o/). More news (and a link to the SaltStack talk) when we have it.
See you next time, and happy hacking :)
Sunday, November 3, 2013
GNOME Sound Recorder Preview Release for 3.12
I've been really busy the past two months with a full time course load at school, thesis work, and working a full time web development job. Since the job requires me to work at the office, I haven't had much time to contribute to GNOME or hang out on irc.
So...if you have been looking for something to hack on, I am looking for help :) I'm planning to do a preview release of the Sound Recorder I wrote during this past summer's GSoC. The app is in JHBuild gnome-apps-3.12-modulesets and has a brand new Bugzilla product (thanks to Matthias Clasen and Andre Klapper for adding these for me).
Today I started filing bugs with details of what needs to be changed or improved before 3.12. I haven't finished this task yet, so if you see something that needs work please file it :) If you would like to contribute to the app you can choose a task from bugzilla to work on or file a bug with a task you think should be done.
Thanks to everyone who has helped so far, and happy hacking :)
So...if you have been looking for something to hack on, I am looking for help :) I'm planning to do a preview release of the Sound Recorder I wrote during this past summer's GSoC. The app is in JHBuild gnome-apps-3.12-modulesets and has a brand new Bugzilla product (thanks to Matthias Clasen and Andre Klapper for adding these for me).
Today I started filing bugs with details of what needs to be changed or improved before 3.12. I haven't finished this task yet, so if you see something that needs work please file it :) If you would like to contribute to the app you can choose a task from bugzilla to work on or file a bug with a task you think should be done.
Thanks to everyone who has helped so far, and happy hacking :)
Saturday, November 2, 2013
Aaron Swartz Memorial Hackathon November 9th, and Chicago LUG Meeting November 16th
Brian Rey from Chipy is organizing an Aaron Swartz Memorial Hackathon. It will take place this coming Saturday, November 9th, from 10 am to 10 pm, at Doejo, located at 3128 N. Broadway in Chicago. You can RSVP here. Please note that they are still seeking sponsors for food for the event, so if you would like to donate, or know of a person/company that does, you can donate via the buttons on the event page.
The Chicago LUG is having a meeting and hackfest the following Saturday, at Pumping Station: One at 2:30 pm. Erik Johnson will be giving an introduction to SaltStack, a server orchestration and configuration tool. We'll learn how to use SaltStack on CentOS to configure and manage Ubuntu, OpenSUSE and FreeBSD servers. Erik is a Python Engineer with SaltStack, and also organizes the Fox Valley Linux User Group in Aurora. We will just be having one talk this time, and plan to spend the rest of the time hacking on our website.
Hope to see you around in the next few weeks, and happy hacking :)
The Chicago LUG is having a meeting and hackfest the following Saturday, at Pumping Station: One at 2:30 pm. Erik Johnson will be giving an introduction to SaltStack, a server orchestration and configuration tool. We'll learn how to use SaltStack on CentOS to configure and manage Ubuntu, OpenSUSE and FreeBSD servers. Erik is a Python Engineer with SaltStack, and also organizes the Fox Valley Linux User Group in Aurora. We will just be having one talk this time, and plan to spend the rest of the time hacking on our website.
Hope to see you around in the next few weeks, and happy hacking :)
Sunday, September 22, 2013
GSoC Final Report: GNOME Sound Recorder
State of the Sound Recorder
As I reported last week, I finished my scheduled tasks for the Sound Recorder project. I spent last weekend doing code cleanup and fixing a few bugs before Pencils Down happened on Monday. Earlier this week I tagged a release and pushed my codebase to git.gnome.org.What I learned about coding...
I spent a lot of the term getting to know GNOME's codebase. Yesterday on irc I heard someone mention that they had added a new feature to an app, and my internal reaction was not to go and try it out, but to read the code and see how it had been implemented. I definitely reached a new level of language agnosticism, and generally find that it no longer occurs to me that I have switched languages when I go from one codebase to another. The speed at which I pick up API usage has also increased. As I've become familiar with examples, I am able to move from reading other people's implementations of functionality to just looking up what I need in the API and using it. The learning curve has been a little steep for some APIs -- GStreamer in particular took some time to understand -- but as I've learned I've also become faster.In many ways I feel like I gained a basis for understanding complex code that solves real problems. I don't feel like all of the information has sunk in yet, but in general I've learned a lot about functional programming.
This past week I've been experiencing a little of the Linux trial-by-fire wrt implementing dbus application launching in my app. I've spent a good few hours staring cross-eyed at makefiles, autogen files, .in files, .service files...plus a lot of weird launch/start calls. Everyone told me that no one knows how autotools really works, but honestly I don't believe it any more. It seems like everyone really does know, they just aren't 'fessing up. Luckily I found a wiki page that Ryan Lortie wrote that explains the whole app launching thing. Thanks very much to Sebastian and Giovanni for answering my questions.
I also got to be a lot more familiar with git in the past few weeks. I used to just do super-basic branching, pushing, etc. What I know now is still really basic, but I've learned to resolve rebase conflicts in remote branches, use interactive mode, check through reflogs, etc. My vocabulary has become a lot more functional just through investing a small amount of time upfront in reading the manuals.
Future...
The plan is to start testing, bug fixing, polishing, and adding features. Before I start I'm going to take some time off to work on my thesis. Thanks to everyone in the community for answering my questions, pointing me in the right direction, writing awesome code for me to read, and generally being great to work and hang out with. Thanks especially to my mentor, Sebastian Dröge, for doing an amazing job this summer. Happy hacking :)Tuesday, September 17, 2013
Chicago LUG/Hack Meeting at Sofware Freedom Day, and Open Source Comes to Campus
Chicago LUG/Hack meeting this weekend
We'll be meeting up at Software Freedom Day at FreeGeek Chicago this Saturday, September 21. The event is from 10 am to 5 pm. You can R.S.V.P. here. I'll be doing a short presentation at 4 pm on getting involved in Free Software. There will be a lot a neat talks, some hacking, and a CryptoParty. Next month we'll resume our regularly scheduled programming :)
And OpenHatch Event for Women next week
I've also been working with OpenHatch and University of Illinois at Chicago's Women in Computer Science group to plan an Open Source comes to Campus event for Women. It is going to be a beginner-level immersion event to teach Chicago area women students to contribute to Open Source projects. It will be happening at UIC on Wednesday, September 23rd and Thursday, September 24th, from 5 pm to 9 pm. You can sign up for the event here.
Cheers, and hope to see you all around in the next few weeks :)
We'll be meeting up at Software Freedom Day at FreeGeek Chicago this Saturday, September 21. The event is from 10 am to 5 pm. You can R.S.V.P. here. I'll be doing a short presentation at 4 pm on getting involved in Free Software. There will be a lot a neat talks, some hacking, and a CryptoParty. Next month we'll resume our regularly scheduled programming :)
And OpenHatch Event for Women next week
I've also been working with OpenHatch and University of Illinois at Chicago's Women in Computer Science group to plan an Open Source comes to Campus event for Women. It is going to be a beginner-level immersion event to teach Chicago area women students to contribute to Open Source projects. It will be happening at UIC on Wednesday, September 23rd and Thursday, September 24th, from 5 pm to 9 pm. You can sign up for the event here.
Cheers, and hope to see you all around in the next few weeks :)
Saturday, September 14, 2013
Sound Recorder Update 9
I'm finished with the first complete iteration of the Sound Recorder.
You can watch a video of it on YouTube. There is no sound in the screencast since it was done with GNOME's screencast tool, which is actually a good thing because you really don't want to hear a recording of my ThinkPad fan. It's unpleasant.
The next few days I'll be testing it out and fixing bugs, so I'll post one more update before the end of GSoC \o/
Happy hacking :)
You can watch a video of it on YouTube. There is no sound in the screencast since it was done with GNOME's screencast tool, which is actually a good thing because you really don't want to hear a recording of my ThinkPad fan. It's unpleasant.
The next few days I'll be testing it out and fixing bugs, so I'll post one more update before the end of GSoC \o/
Happy hacking :)
Sunday, September 1, 2013
Sound Recorder Update 8
This week I planned to work only on UI but got sidetracked by a bunch of stuff relating to autotools, unmerged GJS branches I was relying on, and the fact that I started classes again. So I didn't get as far as I wanted to in my UI implementation. Anyway, here are the results:
I have several bugs to fix next week and some features to re-implement, and some code clean-up, but in general I've finished everything except refreshing the UI when a file is added or deleted. I'm planning to just watch the directory with Gio.FileMonitor and just refresh the UI on changed, which shouldn't be too hard to implement.
I'm hoping to push the code to git.gnome.org as soon as it's cleaned-up - in a couple weeks - and release a preview of the app for unstable 3.11.
Happy hacking :)
I'm hoping to push the code to git.gnome.org as soon as it's cleaned-up - in a couple weeks - and release a preview of the app for unstable 3.11.
Happy hacking :)
Tuesday, August 20, 2013
GUADEC 2013, and GSoC Update Number Seven
GUADEC
I got back from GUADEC a week ago...While I was there I met a lot of new people and also saw friends :) Some things I did:I attended fewer talks than last year, but spent more time volunteering :) Still, I enjoyed the keynote on Endless Mobile, "Rich custom user interfaces with Glade and CSS", "Gtk+ for Application Developers" (which had some very nice code examples!), "What's Cooking with GStreamer"...and I'm looking forward to watching videos of the talks I missed.
There were a lot of vegetarian restaurants in Brno! I shared a lot of meals, long walks through town, and late night beers with fellow GNOMErs.
Worked on a new plan for the Developer Documentation with Marta Maria Cassetti. I've relied on Marta's Python Gtk+ docs a lot in the past. I won't have much time in the coming months to contribute to these efforts, but I'll to do what I can to help out with her plan for GJS.
Worked with Hylke Bons and Garrett LaSage on refining the mockups for the Sound Recorder. It was really awesome to see some of the interactions fleshed out and to talk through the design in person.
Gave two talks: one lightning talk and one mainline talk.
Got advice from my mentor, Sebastian Dröge, on completing the Sound Recorder. I think I will be able to finish adding the basic functionality so it has feature parity with the current GRecord.
Talked to Florian Müllner about GJS development, writing applications, Cairo, design issues...
It was nice to see everyone! Thanks to the foundation for sponsoring my trip, and see you all next year :)
GSoC Update Seven
Since returning to Chicago I have been working on waveform code using Cairo and a Gtk.DrawingArea. What I am doing is really, really simple but it took me some time to be able to grok the code at all (somehow using grok in that sentence makes my slowness seem more forgivable, right :p). The other thing I ended up reading a lot about was multi-threading, in order to better decide to not use it. I read through a lot of code before I was able to wrap my mind around it. At this point my simple code for a basic implementation for a playback waveform is working -- except there is a weird bug that causes a "draw" signal to be emitted whenever any part of the recorder interface is clicked or moused-over. I discovered the bug at around 2 am last night and I haven't figured it out yet. There are some other things I need to finish as well - making sure that the recording and the waveform are synced exactly, adding a linear gradient fill, interrupting playback if the user clicks on a different row in the listview, etc. I'm also working on adding the rest of the UI elements to the window. By next week I should have some actual screenshots or maybe a video (even) to show.
I'm basically on schedule even though I spent most of last week jet lagged and confused by Cairo. Reading list:
Pitivi renderer.c and previewers.py (thanks to Jeff Fortin Tam for showing me the code and spending some time explaining it at GUADEC)
Thread Safety (thanks to Asheesh Laroia for the recommendation)
Cairo GJS Modules (thanks to Cosimo Cecchi for recommending these)
Cairo's Test Suite (I highly recommend these! I really like to read tests, but honestly these are really extra nice :)
Next time, screenshots :) Cheers!
Friday, July 26, 2013
Sound Recorder: Week Six
Last week I moved on to frontend coding. I finished a first iteration of the listview:
Maybe it's just me, but I spent a lot of time trying to figure out how to display the Gtk.StackSwitcher before I discovered that it needed to be added to the headerbar using, e.g. headerbar.custom_title = stackSwitcher; Maybe there are other ways to display the buttons, but this was kind of an opaque point in the widget's documentation.
I implemented the actions for all of the buttons shown except for sharing. I would actually like to hide one of the buttons so the play functionality can only be launched from the listview, but I haven't implemented that yet. I still have a little work left on the info dialog (moving the close button to the top, finalizing what info to display about the file). Reda made some very nice hi-res mockups that I'm using, for example, for the info dialog:
Anyway, I have a million things to do today to get ready for GUADEC, so that's all I'm going to write. See you there :)
I implemented the actions for all of the buttons shown except for sharing. I would actually like to hide one of the buttons so the play functionality can only be launched from the listview, but I haven't implemented that yet. I still have a little work left on the info dialog (moving the close button to the top, finalizing what info to display about the file). Reda made some very nice hi-res mockups that I'm using, for example, for the info dialog:
Anyway, I have a million things to do today to get ready for GUADEC, so that's all I'm going to write. See you there :)
Friday, July 19, 2013
Sound Recorder, Update Five
Since it's been a week since I blogged here is my reluctantly-written update... Somehow blogging once a week about coding feels like microblogging. I spent last week as I intended, in cleaning up my code, fixing bugs, etc. I think I fixed all the bugs I knew about, so that's good. I'm sure plenty more will show up now that I'm writing the UI, since the functions will be called in different orders and threads will probably start canceling each other out or something. I don't know. It should be exciting for me, yet very boring for you to read about :)
Anyway, Reda Lazri says that he will give me some feedback on the UI as we go along, so I will post some screenshots as soon as we have something presentable. Now that I am working on Gtk code, I also need to refer less to other people's code. This week I've been working on the listview: I have it puling all the info I need from the files and displaying it in a Gtk.ListBox. Honestly I wrote the listview using a Gtk.ListBox because some older mockups had the play button in the listview, but a couple days ago Reda redesigned it so that there is a menu with text for play/edit/delete:
Honestly I think a Gtk.TreeView would be just as good for this, so I might re-write it.
Other than coding, I have been spending the week getting ready for GUADEC. I'm going to be giving a talk there on the monthly GNOME-related gatherings that Jim Campbell and I have been organizing at our local hackerspace, and I'm also giving a lightning talk on my GSoC project.
Thanks to the GNOME Foundation for the travel sponsorship! See you all at GUADEC :)
Anyway, Reda Lazri says that he will give me some feedback on the UI as we go along, so I will post some screenshots as soon as we have something presentable. Now that I am working on Gtk code, I also need to refer less to other people's code. This week I've been working on the listview: I have it puling all the info I need from the files and displaying it in a Gtk.ListBox. Honestly I wrote the listview using a Gtk.ListBox because some older mockups had the play button in the listview, but a couple days ago Reda redesigned it so that there is a menu with text for play/edit/delete:
Honestly I think a Gtk.TreeView would be just as good for this, so I might re-write it.
Other than coding, I have been spending the week getting ready for GUADEC. I'm going to be giving a talk there on the monthly GNOME-related gatherings that Jim Campbell and I have been organizing at our local hackerspace, and I'm also giving a lightning talk on my GSoC project.
Thanks to the GNOME Foundation for the travel sponsorship! See you all at GUADEC :)
Wednesday, July 10, 2013
Sound Recorder
So this is my last backend update. I'm finished with everything I think I need (which is never really all, but is probably close, anyway). I'm planning to spend the rest of this week on code cleanup, and then move on to frontend code on Monday. This is a week ahead of schedule, sort of: I moved a few backend tasks (like renaming files, because it's helpful to be able to choose a file via a gui to test renaming) to later in my schedule. So next week I plan to start with the listview/listbox frontend. I'm going to be using some nice new Gtk widgets, like Gtk.Overlay, Gtk.Listbox, and friends, so it should be fun :)
Last week was a short week because of the 4th of July Holiday, so I just read Vogue Paris instead of code:
GStreamer
Sushi
Transmageddon
Banshee
GNOME Media
and Stereolab :)
Last week was a short week because of the 4th of July Holiday, so I just read Vogue Paris instead of code:
GStreamer
Sushi
Transmageddon
Banshee
GNOME Media
and Stereolab :)
Tuesday, July 2, 2013
Sound Recorder Weekly Update: Three
Last week I finished the main items on my agenda -- those being the functions that populated the listview with information from the files in the appropriate directory. Today I moved on to writing the backend code for the minor widgets: the label which shows time progress, the volume element, etc. I have to say that my brain is kind of in a knot over the volume element. I think this is mainly because I was reading the source code from Empathy, which I think is a lot more complicated than what I need to write.
I think I'm mainly on track to finish this phase of coding on time. I have two more weeks in my calendar before I start on frontend code. I haven't been sticking to my schedule exactly, but instead have been transposing tasks based on interdependencies in the code. As usual, my solutions seem to me to be more circuitous than necessary, but I think I'm starting to get a better understanding of the language, which I am pleased about. I think I spend around two thirds of my coding time trying to understand what I am doing, one sixth writing functional code, and one sixth correcting what I wrote. The understanding part feels pretty frustrating sometimes, but luckily (I guess) I find that not understanding how to do something, or not knowing how something works, or just having no idea at all what a piece of code is saying is motivating rather than discouraging. Anyway, I don't have much else to report, so I'll close with my code reading list from this past week:
1. Empathy audiosrc.c
2. Sushi sushi-file-loader.c (for glib print formatting, which I couldn't find docs for)
3. Rhythmbox rb-encoder-gst.c (Gstreamer time queries)
4. Music player.js (formatting nanoseconds as seconds)
5. Gstreamer Plugins Bad id3tag.c (because it doesn't support the tag I want to set, and I wanted to know why)
and etc :)
I think I'm mainly on track to finish this phase of coding on time. I have two more weeks in my calendar before I start on frontend code. I haven't been sticking to my schedule exactly, but instead have been transposing tasks based on interdependencies in the code. As usual, my solutions seem to me to be more circuitous than necessary, but I think I'm starting to get a better understanding of the language, which I am pleased about. I think I spend around two thirds of my coding time trying to understand what I am doing, one sixth writing functional code, and one sixth correcting what I wrote. The understanding part feels pretty frustrating sometimes, but luckily (I guess) I find that not understanding how to do something, or not knowing how something works, or just having no idea at all what a piece of code is saying is motivating rather than discouraging. Anyway, I don't have much else to report, so I'll close with my code reading list from this past week:
1. Empathy audiosrc.c
2. Sushi sushi-file-loader.c (for glib print formatting, which I couldn't find docs for)
3. Rhythmbox rb-encoder-gst.c (Gstreamer time queries)
4. Music player.js (formatting nanoseconds as seconds)
5. Gstreamer Plugins Bad id3tag.c (because it doesn't support the tag I want to set, and I wanted to know why)
and etc :)
Sunday, June 23, 2013
Sound Recorder: Update Two
I spent the past week working mainly on backend code for the listview. I found that most of my effort this week went to figuring out how the necessary classes functioned.
To start with, last week I stole some code from GNOME Shell and tried to dissect it so I could see how it dealt with things like scope within closures, and callbacks. When I code in Java, I generally use an IDE. When I was first learning concepts (like loops, which were difficult to understand at first, and recursion) I generally put the code into the IDE, inserted a break point, and stepped through the code so I could see how the variables changed values. Replicating that process with the terminal, with GJS, has been interesting: I end up inserting logging into my code so I can easily match my debug output to my code, and then read them side by side to determine how execution is happening.This is not quite as user-friendly as an IDE GUI: a single run of the application with debug set to 6 yields ~33,000 lines of output. So, yeah. Usually I set debug to 3 :)
After reading some code over and over (mainly selections.js from Documents, but also random blog posts on the internet, Stack Overflow, and whatever else I could find), I could understand the Shell code enough to be able to re-write it. After that I moved on to writing the gstreamer code.
Last week Bastien pointed me to some Gst.Discoverer code in Totem. Again, what I accomplished was getting the basic structure set up and functioning so I can fill in details (such as which tags to discover) as I go along.
I also started to add a basic playback functionality and spent some time being driven insane by a bug. It turned out that I had a bug in the "Record" toggle button which was setting the pipeline state to paused when the button was inactive (that is, when I pressed "Stop"), so I never received eos messages on the Gst.Bus and consequently never set the pipeline state to null.
This coming week I am planning to work on an object that stores the uris and dates that I retrieve from the GFileEnumerator. Since I only want to load fifty files at a time into the listview, I also need to implement a sensible sorting algorithm to sort by most recent before I store the information (although I think GFileEnumerator does this already). I'm planning to read the code for Rhythmbox in tomorrow to see if it is helpful; so far most of the applications I've read through seem to use database queries for this, rather than implementing it by hand. Anyway, I think it will be an interesting problem, and hopefully I can write a decent solution :) After it is finished, I will add a "load file" object to play.js and a "load more" object to listview.js.
To start with, last week I stole some code from GNOME Shell and tried to dissect it so I could see how it dealt with things like scope within closures, and callbacks. When I code in Java, I generally use an IDE. When I was first learning concepts (like loops, which were difficult to understand at first, and recursion) I generally put the code into the IDE, inserted a break point, and stepped through the code so I could see how the variables changed values. Replicating that process with the terminal, with GJS, has been interesting: I end up inserting logging into my code so I can easily match my debug output to my code, and then read them side by side to determine how execution is happening.This is not quite as user-friendly as an IDE GUI: a single run of the application with debug set to 6 yields ~33,000 lines of output. So, yeah. Usually I set debug to 3 :)
After reading some code over and over (mainly selections.js from Documents, but also random blog posts on the internet, Stack Overflow, and whatever else I could find), I could understand the Shell code enough to be able to re-write it. After that I moved on to writing the gstreamer code.
Last week Bastien pointed me to some Gst.Discoverer code in Totem. Again, what I accomplished was getting the basic structure set up and functioning so I can fill in details (such as which tags to discover) as I go along.
I also started to add a basic playback functionality and spent some time being driven insane by a bug. It turned out that I had a bug in the "Record" toggle button which was setting the pipeline state to paused when the button was inactive (that is, when I pressed "Stop"), so I never received eos messages on the Gst.Bus and consequently never set the pipeline state to null.
This coming week I am planning to work on an object that stores the uris and dates that I retrieve from the GFileEnumerator. Since I only want to load fifty files at a time into the listview, I also need to implement a sensible sorting algorithm to sort by most recent before I store the information (although I think GFileEnumerator does this already). I'm planning to read the code for Rhythmbox in tomorrow to see if it is helpful; so far most of the applications I've read through seem to use database queries for this, rather than implementing it by hand. Anyway, I think it will be an interesting problem, and hopefully I can write a decent solution :) After it is finished, I will add a "load file" object to play.js and a "load more" object to listview.js.
Saturday, June 15, 2013
Sound Recorder, Update One
When I wrote out my initial plan for the sound recorder, I decided to start with the backend. I haven't used GStreamer before. I generally prefer to put the steepest part of the learning curve first, since I find that the bast way to learn any coding skill is to spend some time drowning in deep water (well... or even shallow water. I'm pretty sure I could manage the drowning at first part no matter what coding skill I'm learning).
So I have indeed been coding the backend functions. I've been reading a lot of code, and monkey-copying a little too much. So far I have some code that I stole from:
Transmageddon - it has some handy methods for defining encoding container types, encoding audio profiles, and file extensions.
Sound Juicer - I spent some time the other day stealing error handling from Sound Juicer. It puts a bus on encodebin and listens for errors missing plugin errors emitted by the encodebin. Today my mentor told me that I'm supposed to be listening for errors on the pipeline's bus. You wouldn't think that would be difficult to understand, but I ended up getting confused. When I looked at documentation for adding a bus to a pipeline, there were two ways that buses were handled: either they were connected using add_watch() or by popping messages of the bus and handling them if they are the correct type. Sebastian told me to use add_watch, but I wasn't able to return any errors because I asked the bus to listen before I set the pipeline to Gst.State.PLAYING.
GNOME Shell - I stole an interesting while loop from GNOME Shell a few days ago and I've been trying to work out exactly how to handle callbacks in it. I'm using it to gather metadata about the files in the Recordings directory so I can populate a listview. I'm interested in having an asynchronous callback that passes the data to the code that populates the listview after it's returned data about 50 files, and then continues gathering data.
So in general I'm having a lot of fun trying to understand and learn from the code base. I never learn as quickly or as well as I would like, and I tend to destroy more code than I create, but there you have it: my weekly update :)
So I have indeed been coding the backend functions. I've been reading a lot of code, and monkey-copying a little too much. So far I have some code that I stole from:
Transmageddon - it has some handy methods for defining encoding container types, encoding audio profiles, and file extensions.
Sound Juicer - I spent some time the other day stealing error handling from Sound Juicer. It puts a bus on encodebin and listens for errors missing plugin errors emitted by the encodebin. Today my mentor told me that I'm supposed to be listening for errors on the pipeline's bus. You wouldn't think that would be difficult to understand, but I ended up getting confused. When I looked at documentation for adding a bus to a pipeline, there were two ways that buses were handled: either they were connected using add_watch() or by popping messages of the bus and handling them if they are the correct type. Sebastian told me to use add_watch, but I wasn't able to return any errors because I asked the bus to listen before I set the pipeline to Gst.State.PLAYING.
GNOME Shell - I stole an interesting while loop from GNOME Shell a few days ago and I've been trying to work out exactly how to handle callbacks in it. I'm using it to gather metadata about the files in the Recordings directory so I can populate a listview. I'm interested in having an asynchronous callback that passes the data to the code that populates the listview after it's returned data about 50 files, and then continues gathering data.
So in general I'm having a lot of fun trying to understand and learn from the code base. I never learn as quickly or as well as I would like, and I tend to destroy more code than I create, but there you have it: my weekly update :)
Wednesday, June 5, 2013
Google Summer of Code 2013
I'm going to be spending the summer writing a new sound recorder for GNOME. I finished up my graduate assistantship duties last Friday. The motherboard on my laptop died early last week (after blackscreening on and off while I was writing my C/C++ final, yay). I bought a new laptop on ebay so I could swap the hard drive into a similar machine, and when I tried to pull out the drive on the new laptop I discovered that it was hot glued in place. Anyway, hopefully the rest of the laptop is fine, since it's what I'm using now, but I'm kind of scared to open it up and look.
Reda Lazri has been working on some pretty cool mockups for the sound recorder, and I've been bikeshedding them :) We are keeping them in the gnome-sound-recorder mockups folder on github. I keep meaning to ask Allan, Jon, and Jakub for feedback but so far I haven't. Partly that is due to trepidation, and partly it's because I'm still figuring out what is and isn't possible in GStreamer.
I've been battling a little with GJS, mainly because there are a lot of functions in GNOME libraries that simply don't work in GJS, and there is no documentation. In the past I thought things were failing because I didn't understand what I was coding, but in fact it was often the case that I was trying to use functions which didn't have GObject bindings. Sometimes GJS will helpfully announce that something is "not a function", which is not exactly useful, since it's listed as a function in the documentation. This always lead me to believe that I was writing code with syntax errors. When I started working on the sound recorder, I asked Jasper St Pierre how to generate GJS docs with g-ir doc tool, and it's been really nice to be able to look up the syntax of functions when I get stuck.
While I'm fairly comfortable with GJS because of working on some stuff for Documents, I still don't know it nearly as well as Java. I did an independent study last semester so I could learn C (the instructor threw in C++ as well, which honestly was a lot like Java with .h files). So far it's been really useful. Some of the GNOME codebase is still a bit difficult for me to understand in places, but being able to steal code snippets and translate them into GJS makes coding with an unfamiliar API a lot more reasonable. GStreamer seems pretty user friendly but it's pretty huge and complex. I have already gotten a lot of help from my mentor, Sebastian Dröge. Indeed, I almost think I'll finish by the end of the summer, if I can sneak it past the Design Team :)
Reda Lazri has been working on some pretty cool mockups for the sound recorder, and I've been bikeshedding them :) We are keeping them in the gnome-sound-recorder mockups folder on github. I keep meaning to ask Allan, Jon, and Jakub for feedback but so far I haven't. Partly that is due to trepidation, and partly it's because I'm still figuring out what is and isn't possible in GStreamer.
I've been battling a little with GJS, mainly because there are a lot of functions in GNOME libraries that simply don't work in GJS, and there is no documentation. In the past I thought things were failing because I didn't understand what I was coding, but in fact it was often the case that I was trying to use functions which didn't have GObject bindings. Sometimes GJS will helpfully announce that something is "not a function", which is not exactly useful, since it's listed as a function in the documentation. This always lead me to believe that I was writing code with syntax errors. When I started working on the sound recorder, I asked Jasper St Pierre how to generate GJS docs with g-ir doc tool, and it's been really nice to be able to look up the syntax of functions when I get stuck.
While I'm fairly comfortable with GJS because of working on some stuff for Documents, I still don't know it nearly as well as Java. I did an independent study last semester so I could learn C (the instructor threw in C++ as well, which honestly was a lot like Java with .h files). So far it's been really useful. Some of the GNOME codebase is still a bit difficult for me to understand in places, but being able to steal code snippets and translate them into GJS makes coding with an unfamiliar API a lot more reasonable. GStreamer seems pretty user friendly but it's pretty huge and complex. I have already gotten a lot of help from my mentor, Sebastian Dröge. Indeed, I almost think I'll finish by the end of the summer, if I can sneak it past the Design Team :)
Sunday, February 3, 2013
Developer Experience Hackfest
I arrived back in Chicago today after attending the Developer Experience hackfest. While I was there I worked with the developer documentation group. As Allan Day mentioned in his post, he and I drafted some basic tutorial pages and worked with Federico Mena Quintero to make a new outline of the platform overview.
The first tutorial Allan and I worked on outlines the process of creating a GNOME application, and the second introduces new developers to GNOME APIs. Rather than presenting all of the APIs we tried to list what new developers were likely to use, and to list those in according to importance. After the initial drafts of those were finished, Allan worked on editing the API overview while I added some content to the "Writing Your First GNOME Application" page.
While Jakub and Allan worked on making the site responsive, I wrote some new Beginner's Tutorials for JavaScript. The JavaScript beginner pages were lacking eight tutorials that are available in Python and Vala, so I decided to start by writing those. I finished six of the eight, and I will work on getting the other two done, and all of them properly formatted and annotated when we have our next Chicago GNOME hackfest on February 16th.
Our whole group also worked together on the mockups for the GNOME Developer Center. We had several new ideas which I think will really improve the resources for coding, including making all of the API documentation available as a single download (perhaps available in the SDK download). Another idea that I thought was particularly good is adding code search to the online API documentation so developers can easily find existing code in git.gnome.org to use as a reference. The idea here is to possibly use the re2 library, which Google open sourced after it shut down Google Code Search.
Overall I felt that the hackfest was very productive. It was clear that there were a lot of different opinions on various topics, but still there was great focus and a determination to compromise in order to get things done.
Thanks to the GNOME Foundation for sponsoring me and to BetaGroup Coworking for providing the space. It was fantastic to see everyone -- see you all at GUADEC :)
The first tutorial Allan and I worked on outlines the process of creating a GNOME application, and the second introduces new developers to GNOME APIs. Rather than presenting all of the APIs we tried to list what new developers were likely to use, and to list those in according to importance. After the initial drafts of those were finished, Allan worked on editing the API overview while I added some content to the "Writing Your First GNOME Application" page.
While Jakub and Allan worked on making the site responsive, I wrote some new Beginner's Tutorials for JavaScript. The JavaScript beginner pages were lacking eight tutorials that are available in Python and Vala, so I decided to start by writing those. I finished six of the eight, and I will work on getting the other two done, and all of them properly formatted and annotated when we have our next Chicago GNOME hackfest on February 16th.
Our whole group also worked together on the mockups for the GNOME Developer Center. We had several new ideas which I think will really improve the resources for coding, including making all of the API documentation available as a single download (perhaps available in the SDK download). Another idea that I thought was particularly good is adding code search to the online API documentation so developers can easily find existing code in git.gnome.org to use as a reference. The idea here is to possibly use the re2 library, which Google open sourced after it shut down Google Code Search.
Overall I felt that the hackfest was very productive. It was clear that there were a lot of different opinions on various topics, but still there was great focus and a determination to compromise in order to get things done.
Thanks to the GNOME Foundation for sponsoring me and to BetaGroup Coworking for providing the space. It was fantastic to see everyone -- see you all at GUADEC :)
Subscribe to:
Posts (Atom)