Subscribe to the RSS feed: RSS feed icon

Thinking of developing some new apps

So I’m going to be working on a couple of apps as homework (senior project: you’ve got to prove you can actually do stuff!). We – my senior project team – haven’t yet decided which platforms our apps will run on, but Android is a good bet. We have to develop one app together as a team plus one app each personally.

One app idea I’ve recently rejected as homework (due to it not being original enough) is a podcast app for Ubuntu phones. I have decided I am going to write this app anyway during my free time. It would be very useful to me, and Podbird (the only other podcast app I can find for Ubuntu phones) needs a competitor.

One app idea I’m still considering as homework is a Usenet client for mobile devices. I haven’t decided yet whether I will target Android or Ubuntu. The advantage of Ubuntu is I have a physical phone. The advantage of Android is that Ubuntu’s SDK is buggy. I’ve already set up my Raspberry Pi to serve as a single-user NNTP server for testing the app.

My final idea for a personal homework project is a screenwriting app, something akin to the abandonware Celtx desktop software but more closely aligned to my vision for how it should work.

Note to self: Buy a faster Pi.

No progress this week, but I tried

I haven’t made any progress on open source projects this week, but it’s not for lack of trying.

Part of the problem this week has been indecisiveness. There are so many things I want to do, so many programs I want to contribute to. I want to write plugins for Firefox, GIMP, Guayadeque, and Thunderbird.

I tried working on a couple¬†of Firefox extensions. For Edit Tab Titles, I’ve been trying to figure out how to right-click on a tab and then have the extension figure out which tab got right-clicked on. No progress there.¬†I found another idea which I may incorporate into Edit Tab Titles soon: scrolling the title’s text as a marquee.

I created and then almost immediately deleted a new extension for manually resizing individual tabs in Firefox. I think that if a tab’s title is really short, one should be able to shrink just that tab. The reason I deleted it is because there is no documented way for an extension to access or edit a tab’s size. Not much point in keeping an extension that does nothing.

I read on Mozilla’s Add-ons Blog that they’re now, as of the 26th of February, recommending the use of a tool called jpm for creating new extensions. I’ve been using the previously recommended tool, cfx. Installing JPM was a pain: first, because the recommended way to get it is using NPM, which I’d never heard of before. Found NPM in Ubuntu’s repositories, installed it, then used it to install jpm. Headed over to¬† for instructions on how to create a new extension using jpm. Instructions say to run the command “jpm init”. Instructions incorrect; no error message given but nothing gets done either.¬†Uninstalled jpm, reinstalled jpm with sudo privileges. Tried again, nothing. Uninstalled jpm again, reinstalled again without sudo privileges. Tried again, nothing. Lather, rinse, repeat. Until at one point I discovered by way of a typo that “npm init” works. Now I know that whenever that page says to use the jpm command, I should use the npm command instead.

I also want to create an extension for the GIMP: a feature it lacks, which I think woud greatly improve the program, is adjustment layers. Google “Photoshop adjustment layers” to see what I’m talking about. In basic terms, what an adjustment layer is is a layer that thinks “Whatever happens to me, I’ll make it look like it happened to all the layers beneath me.”. So if you want to darken a bunch of layers in an image, just create an adjustment layer and darken that. Simple, right? Apparently not: the GIMP’s developers are well aware of the need for this feature but, according to their wiki, implementing it would require a massive amount of work to be done first.

Fine, I thought. I still want to learn to write GIMP extensions. Here comes another problem: they can be written in either of two scripting languages, neither of which I’m particularly familiar with. Script-Fu is GIMP’s own language. Python is the other option. I look into using Python because I want to learn that anyway, only to find that I can’t use my favorite Python IDE because there’s a module called gimp that apparently can only be loaded when the script is run from within GIMP itself. Not convenient at all.

As for Guayadeque and Thunderbird, I haven’t even gotten around to looking at Guayadeque and I don’t know what I would want to create for Thunderbird.

Various stuff

I’m working on Firefox extensions as I write this. This blog entry is kind of a stream-of-consciousness thing.

First, here’s some stats for my Edit Tab Titles extension:¬†Edit Tab Titles graphs

On the one hand, I’m kind of pleasantly surprised to see so many downloads and users, considering that I’m doing nothing at all to get the word out about this extension. On the other hand, I’m not sure I trust these numbers. I mean look at the data underneath the Top Applications graph. Zero users counts as 11%? How does that work?

In other news, I found that another extension I was working on is unneeded. Last¬†week I began work on an addon for open Firefox’s back/forward history in new tabs. Today I found that the same functionality is built into the browser. Just hold the ctrl key (to open a new tab) or shift (for a new window) when clicking the back or forward button. So, that’s one git repository I get to delete from GitHub.

I helped a friend not in this class to get rid of an unwanted, accidentally-created submodule in git the other day. I’d never heard of git submodules before. I think I could use this. Edit Tab Titles depends on a couple of other git repositories not under my control. Previously what I had done is simply clone those repos into a subdirectory of my own repo, add that subdirectory to my repo’s .gitignore file, and put instructions into the readme saying that’s what needs to be done. Thus I ensured that anyone downloading my code for the first time will download up-to-date copies of those two repos, but¬†only if they read and comprehend the readme. Now that I’ve converted them to submodules, if I’m understanding the man page correctly, they should get cloned automatically whenever my repo is cloned.

I’ve also been working on an art piece lately (here‘s a nearly finished work in progress). There’s one feature I’ve heard of in Photoshop that I’m really starting to wish GIMP had too: adjustment layers. I may have to add that feature myself. Created an empty repo on GitHub as a reminder.

Did more than last week, open source wise

So I’ve actually been working on some open source stuff this week.

First, I continue working on my first Firefox extension, Edit Tab Titles. I’ve figured out how to add an item to the context menu that opens when you right-click on a tab. What I can’t figure out is how to identify which tab got right-clicked on. Ideally what I’d like is for users to be able to right-click on any tab and edit that tab’s title. Here’s the extension on GitHub and Mozilla.

Second, I’ve started work on a second extension. Like the first, this one scratches an itch.¬†Every once in a while, I will realize only after navigating away from a page that I actually wanted to keep that page open, and yet I also want to keep the current page open. So I’m writing an extension that will (ideally) let you right-click on the browser’s Back or Forward button and select “Open in new tab” or “Open in new window”. Here‘s the GitHub repository.

One of the reasons I haven’t done much in the way of open source this week is because I’m feeling really artistically inspired. Here‘s a dragon image I’m working on.¬†I saw the latest batch of photos from Unsplash, and for every one, the first thing that entered my mind was how I would insert a dragon into it.

Insert Creative Title Here

As you can tell from my previous blog posts, lately I’ve been working on Mines-Perfect. This is because the original Mines-Perfect project is dead, and I don’t like that. It only ever had one developer, and that developer stopped working on it years ago. I like Mines-Perfect and I want the project to live again.

This is contrary to one of our goals in the OSS Development class I’m taking, the goal being to contribute to live projects. I want to make it clear that I have not forgotten about Firefox. I’ve been building of a list of extension ideas. I’m looking forward to developing them. Two of them seem like they could be based on my existing extension, Edit Tab Titles, so I’m waiting for that to undergo a full review by Mozilla before forking its code. I am reluctant to work on my other ideas because they seem both less useful and harder to implement. So, I’m just now googling (does that word apply when not using Google? Because I use DuckDuckGo) for “features firefox should have” to find more ideas.

I choose to focus on extensions rather than working on the browser itself because I like the idea of extensibility. It enables end users to essentially build their own browser to fit their needs. Also because I like being able to mess with long-established features (such as tab titles) and know that I won’t break the program for people who don’t install my extensions.

In no particular order, here are the extension ideas I have so far:

  • -Edit window titles, prevent them from changing when tabs are changed. Idea source
  • -Custom tab favicons (already implemented in other extensions?)
  • -Replaceable Tabs. Idea source
  • -Sync to custom location: Make it convenient, preferably automatic, to sync/backup one’s profile to a user-defined location
  • -Change Bookmarks folder icon: If, like me, you tend to sort bookmarks by domain (e.g. all bookmarks for go into a “gog” folder), wouldn’t it be convenient to use that site’s favicon? If you organize your bookmarks by purpose instead (e.g. “work stuff”, “personal”, etc.), maybe you could designate a custom image to use as icon?

At some point in the future, I’d like to add CD support to the Guayadeque music player. Scratching another itch.

Got Mines-Perfect working, mostly

Like I said in my previous blog post, I’ve been working on getting Mines-Perfect working on Linux. Still no response from the original creator.

The game works now, as in it compiles and runs. Not everything has been tested, but the only bug I’m aware of at the moment is that the timer – which is supposed to count the number of seconds you’ve been playing – runs about 1,000 times as fast as it should. It’s the red -99 in the screenshot below.

Mines-Perfect screenshot with bad timer

Now porting Mines-Perfect to Linux

So I decided to go ahead to port Mines-Perfect, the game mentioned in my previous post, to Linux.

I have spent the day trying to get it to compile on my computer. What surprises me is that most of the changes I’ve had to make stem not from the fact that I’m compiling it on a new operating system but from the fact that it’s 2015 now and I have to use a newer version of wxWidgets (the library that the game uses most). I would have thought that the library’s API would have changed little relative to the imagined massive differences between operating systems.

Imagined effort:
Updating to new libraries 10%
Porting to Linux 90%

Real effort so far:
Updating to new libraries 99%
Porting to Linux 1%

Firefox addon preliminarily reviewed

I’ve been working on Firefox lately. I don’t have time to do a whole lot due to homework, but I’m doing what I can.

I created this extension called Edit Tab Titles. It really surprised me that I could not find any other extension, or feature built in to the browser, that lets users edit the titles of open tabs. The idea seems really obvious to me: As one opens more and more tabs in Firefox, one finds that a smaller and smaller part of the tab’s full title gets displayed. Wouldn’t it be nice if you could put useful information in the beginning of the title, where you can see it?

My mentor at Mozilla, Benjamin, was impressed that I got this submitted so quickly. He said he wanted to blog about it for Planet Mozilla and “throw this into the project wide monday meeting call so all contributors and staff can check it out”.

I also submitted my first code patch for Firefox itself. Again, keeping it simple, the patch fixes one small bug. The patch has been reviewed, now I’m told I need to get it checked in by adding the “checkin-needed” keyword. Not a problem; I just haven’t gotten around to that yet.

I think I’ll continue working on Firefox like this for the remainder of the term. After the term is over – or sooner if my workload gets lighter – there’s this open source game I’d like to fork and work on called Mines-Perfect. It’s a significantly improved Minesweeper copy. The problems are that its documentation is written in broken English (good enough that you can understand it with some effort), it’s Windows-only (works fine on Linux using WINE but I want it to run natively), and there’s one minor feature I’d like to add.

Out-of-class in-class assignment

This was supposed to be done as an in-class assignment. The instruction page says to post it as a blog post, so here it is.

Part 1 – Bug Reports

1. Open a browser and go to the OpenMRS. (Check.)
Define the purpose of the column names below. Include the range of possible values for 4, 5, and 8 below. Feel free to explore beyond the page to find more information.
1. Issue Type: Like the name says, this identifies what type of issue is being addressed.
2. Key: I don’t see this.
3. Summary: I don’t see anything labeled “Summary”, but I do see two similar things: a very short description (akin to an email’s subject line) and a longer, multi-paragraph description. Both, obviously, are used to describe the bug in question.
4. Priority: Possible values are Blocker, Must, Should, Could, Non-Essential, and TBD.
5. Status: Possible values are Open, In Progress, Reopened, Resolved, Closed, Under Review, Under Assessment, Awaiting Approval, Implementing Change, Monitoring Change, Reviewing Change, Waiting on Information, ready for Work, Code Review (Pre-Commit), Code Review (Initial), Approved, Code Review (Post-Commit), Design, Accepted, Reviewed, Needs Assessment, In Backlog, Waiting for Analysis, In Analysis, Waiting for Dev, In Development, Waiting for Test, In Test, Waiting for Showcase, and Cancelled.
6. Assignee: The person to whom the bug is assigned.
7. Updated: The time the bug was last changed in the tracker.
8. Resolution: Possible values are Unresolved, Fixed, Won’t Fix, Duplicate, Cannot Reproduce, Information Provided, Incomplete, Change Request Denied, Change Request Cancelled, and Chagne Implemented.
9. Due: Presumably, this refers to when a bug should be fixed by. Most bugs do not appear to have due dates.
10. Reporter: The person who entered the bug into the tracker.
11. Created: The time at which the bug was entered into the tracker.

Describe how you discovered the definitions and How did you find the information from above?
I examined a few different bugs and inferred the definitions from what I saw. For those things where I was told to provide the range of possible values, I used the site’s filter ability which let me select those values from a list; I just retyped the list here.

Identify the order in which the bugs are initially displayed?
They appear to be displayed in order of creation, with the most recent at the top.

What is the meaning of the symbols under priority?
Each symbol corresponds to a different priority: TBD is represented by a ?, non-essential is a short downward-pointing green arrow, could is a longer downward-pointing green arrow, should is an upward-pointing red arrow, must is a cross between an upward-pointing red arrow and an exclamation point, and blocker is a red ‚ćČ

Select a bug that you think that you might be able to fix and look at it more closely (click on the bug number).
I chose bug UIFR-124
1. Identify when the bug was submitted: 2013-07-28 22:42:00 GMT+0000
2. Identify if there has been recent discussion about the bug?: I see no discussion about it at all.
3. Is the bug current?: If by ‘current’ you ean ‘not fixed yet’, then yes; the bug’s status is listed as ‘in progress’
4. Is the bug assigned? To whom?: Yes, to Kamil Prochazka.
5. Describe what you would need to do to fix the bug: Not being familiar with OpenMRS, I don’t know how hard this would be (the bug is listed as low-complexity), but it sounds like all I would need to do is modify one or two files so that error messages be recorded in a log file.

Repeat the previous step with a different kind of bug.
I chose bug TRUNK-4564
1. Identify when the bug was submitted: 2014-12-23 21:44:00 GMT+0000
2. Identify if there has been recent discussion about the bug?: Yes
3. Is the bug current?: If by ‘current’ you ean ‘not fixed yet’, then yes; the bug’s status is listed as ‘in progress’
4. Is the bug assigned? To whom?: Yes, to Radoslaw Puzdrowski.
5. Describe what you would need to do to fix the bug: The bug’s description pretty much states what needs to be done: “We need to fix the wizard not to ask the user for the username and password when they choose to add demo data… [O]n the summary page before running the wizard, we need to inform the user of the username and password.”

Part 2 ‚Äď Project Information
1. Click on the ‚ÄúProjects‚ÄĚ link on the top of the page. In the drop down menu choose ‚ÄúView All Projects‚ÄĚ
2. Choose ‚ÄúOpenMRS Trunk‚ÄĚ.
3. Looking through the nine links on the left answer the following questions:
1. Who is the lead on the project?: Burke Mamlin
2. In the last 30 days, how many issues have been created and how many have been resolved?: 15 created, 16 resolved.
3. Copy and paste the status summary.

Status Summary
Status | Issues| Percentage
In Progress | 60 | 1%
Reopened | 5 |
Closed | 3591 | 84%
Waiting on Information | 10 |
Ready for Work | 412 | 10%
Code Review (Pre-Commit) | 6 |
Code Review (Initial) | 28 | 1%
Code Review (Post-Commit) | 48 | 1%
Design | 86 | 2%
Needs Assessment | 14 |

4. Pick a version and note the version, the total number of issues, and the number of issues resolved.: I could only find a count of the number of unresolved issues associated with each version. For OpenMRS 1.8.5, the number of unresolved issues is 16.
5. What is the most popular issue?: for the version I chose, the most popular issue (counting by votes) was TRUNK-3051, which had 2 votes. The most popular issue among all versions was TRUNK-1, which had 14 votes.
6. What is the most popular label?: Of the 16 issues I looked at (associated with OpenMRS 1.8.5), ‘curated’ is the most popular label.
7. When was the most recent build, why was it run, what was the duration, and how many tests passed?: The most recent build was run 2 hours ago as I type this. Its duration was 1 minute. It says “No tests found”, so obviously it didn’t pass any tests.

Getting Firefox for Android running

I’m working right now on getting Firefox for Android, a.k.a. Fennec, running in an Android emulator.

Having now gotten an Android emulator running, I’m compiling Fennec for the first time right now. Fingers crossed, hoping it won’t give some obscure error message.

I have a couple of old Android tablets I could try to get Fennec running on. Problem is they have old versions of Android. My emulator is currently set up with the latest Android.

Some stats get displayed at the end of running “./mach build”:
469 compiler warnings present.
Overall system resources – Wall time: 931s; CPU: 87%; Read bytes: 1284149248; Write bytes: 4371410944; Read time: 118292; Write time: 5547612

“./mach package” displays one stat when it’s done:
Total time: 22 seconds.

“./mach install” displays no stats, just a success message. The Fennec app quietly appeared on my virtual tablet. Now to see if it runs…

…It works! First time! It’s a bit slow due to being emulated.

The only trouble I had was that the first time I tried this (everything above is sort of stream-of-consciousness written during my second try) was that I ran out of hard drive space. I have a very large music collection (about 190 GiB) which I prefer to keep on my main hard drive; I’ve decided to move it to external storage for now. I know from past experience that running out of hard drive space can cause unpredictable behavior in programs, especially downloaders and installers, so to be safe I decided to delete everything that got downloaded on my first try: every line of Firefox source code, every Android-related development tool, everything. I did not need any additional resources to solve this problem aside from a USB hard disk for my music collection.