Older blog entries for etbe (starting at number 1045)

iPhone vs Android

A friend who’s a long-time iPhone user just asked for my advice about whether to get a Samsung Galaxy S3, a Samsung Galaxy Note 2, or a iPhone 5.

Advantages for Android

I think that liberty should be the first consideration, I’ve previously written about how Android phones won’t necessarily give you as much freedom as you desire if you buy on the basis of price and features [1]. But even the least free Android options are way better than the iOS (iPhone and iPad) environment. This isn’t necessarily a big deal for my friend, like most of the population he usually just wants things to work – being able to hack them isn’t such an issue. However unlike most of the population he does make a reasonable portion of his income from software development and it could be that he will have a contract for developing an app on a mobile device – in which case the freedom to tinker on Android will help him. He could use an iPhone for his personal use and develop on an Android platform for his clients, but generally it’s more efficient if your personal use of technology is similar to that of your clients. The Nexus devices are very good for liberty and they also have nice hardware at a low price, I’ve just got a Nexus 4 for my wife and it’s very nice.

The next issue is that of hardware standards, I’ve previously written about the potential for developing a standard form factor for Android phones [2] although this doesn’t seem likely to be implemented in the near future. The wide range of Android hardware means that the range of cases etc on the market is rather small. But the advantage of the wide range is that with an Android phone you can have a device that’s bigger, smaller, cheaper, cuter, or faster than an iPhone. There are Android devices which have a higher resolution, more RAM, more storage (if you include SD storage), or has other benefits over an iPhone. For whatever reasonable range of specs appeal to you you can probably find a device to match. I’ve previously written about the way the ideal size for devices depends on your hand size and your preferred manner of gripping the device [3], so the lack of size range in Apple devices is not just a limitation on personal choice but also a failure to properly support people with different size hands. Depending on the preferred manner of gripping a phone the iPhone 5 is either too big for an average woman or too small for a tall man.

The Google Play store apparently has more applications than the iPhone/iPad App Market. This difference can be expected to increase now that the Samsung Galaxy S3 is outselling the iPhone 5. Comparing the number of unit sales of the iPhone vs Android phones is no longer interesting, comparing Samsung to Apple is the interesting thing.

Advantages for the iPhone

By all accounts it’s quite an easy process to backup and restore all iPhone settings. You can expect that after losing an iPhone you can just connect the new one to your PC and have it work in exactly the same way after all the data is transferred. Trying to do such things on Android is merely difficult if you have root access to your phone and the source and destination phones are of exactly the same make and model. But if you have different versions of the phone or if you don’t have root access then it may be impossible. I welcome comments from anyone who knows of good solutions to this problem.

The iPhone achieved a reasonable share of the smart-phone market before Android really started going well so there are a lot of people who are used to the iPhone. Simply by being unfamiliar Android will be a more difficult option for people who have used the iPhone – such as my friend. But it is possible to learn other systems. Generally I think that this may be a big issue for people who use Macs for all their other computing. But if the only Apple product you use is an iPhone then switching to Android shouldn’t be a big deal.

Conclusion

It seems to me that Android devices are better in every way apart from backup, restore, and general management. If I was about to buy 100 phones then I’d probably consider the iPhone (not necessarily buy but definitely consider). But for a single user I definitely recommend Android devices.

The Android devices which seem good at the moment are the Galaxy S3 (which I’m using now), the Nexus 4 (which is really good apart from being unable to change the battery or add more storage), and the Galaxy Note 2 (which is about the biggest phone available).

One of the things that my friend wants to do is to use a phone instead of a tablet or laptop. I think that the Galaxy Note 2 is the only option for him.

Related posts:

  1. My Prediction for the iPhone I have previously written about how I refused an offer...
  2. Standardising Android Don Marti wrote an amusing post about the lack of...
  3. Galaxy S vs Xperia X10 and Android Network Access Galaxy S Review I’ve just been given an indefinite loan...

Syndicated 2013-02-22 06:27:01 from etbe - Russell Coker

Conversion of Video Files

To convert video files between formats I use Makefiles, this means I can run “make -j2″ on my dual-core server to get both cores going at once. avconv uses 8 threads for it’s computation and I’ve seen it take up to 190% CPU time for brief periods of time, but overall it seems to average a lot less, if nothing else then running two copies at once allows one to calculate while the other is waiting for disk IO.

Here is a basic Makefile to generate a subdirectory full of mp4 files from a directory full of flv files. I used to use this to convert my Youtube music archive for my Android devices until I installed MX Player which can play every type of video file you can imagine [1]. I’ll probably encounter some situation where this script becomes necessary again so I keep it around. It’s also a very simple example of how to run a batch conversion of video files.

MP4S:=$(shell for n in *.flv ; do echo $$n | sed -e s/^/mp4\\// -e s/flv$$/mp4/ ; done)

all: $(MP4S)

mp4/%.mp4: %.flv
        avconv -i $< -strict experimental -b $$(~/bin/video-encoding-rate $<) $@ > /dev/null

Here is a more complex Makefile. I use it on my directory of big videos (more than 1280*720 resolution) and scales them down for my favorite Android devices (Samsung Galaxy S3, Samsung Galaxy S, and Sony Ericsson Xperia X10). My Galaxy S3 can’t play a FullHD version of Gangnam Style without going slow so I need to do this even for the fastest phones. This makefile generates three subdirectories of mp4 files for the three devices.

S3MP4S:=$(shell for n in *.mp4 ; do echo $$n | sed -e s/^/s3\\// -e s/.mp4$$/-s3.mp4/ -e s/.flv$$/-s3.mp4/; done)
XPERIAMP4S:=$(shell for n in *.mp4 ; do echo $$n | sed -e s/^/xperiax10\\// -e s/.mp4$$/-xperiax10.mp4/ -e s/.flv$$/-xperiax10.mp4/; done)
SMP4S:=$(shell for n in *.mp4 ; do echo $$n | sed -e s/^/galaxys\\// -e s/.mp4$$/-galaxys.mp4/ -e s/.flv$$/-galaxys.mp4/; done)

all: $(S3MP4S) $(XPERIAMP4S) $(SMP4S)

s3/%-s3.mp4: %.mp4
        avconv -i $< -strict experimental -s $(shell ~/bin/video-scale-resolution 1280 720 $<) $@ > /dev/null

galaxys/%-galaxys.mp4: %.mp4
        echo avconv -i $< -strict experimental -s $(shell ~/bin/video-scale-resolution 800 480 $<) $@ > /dev/null

xperiax10/%-xperiax10.mp4: %.mp4
        echo avconv -i $< -strict experimental -s $(shell ~/bin/video-scale-resolution 854 480 $<) $@ > /dev/null

The following script is used by the above Makefile to determine the resolution to use. Some Youtube videos have unusual combinations of width and height (Linkin Park seems to like doing this) so I scale them down so it fits the phone in one dimension and the other dimension is scaled appropriately. This requires a script from the Mplayer package and expects it to be in the location that it’s used in the Debian package, for distributions other than Debian a minor change will be required.

#!/bin/bash
set -e
OUT_VIDEO_WIDTH=$1
OUT_VIDEO_HEIGHT=$2

eval $(/usr/share/mplayer/midentify.sh $3)
XMULT=$(echo $ID_VIDEO_WIDTH*100/$OUT_VIDEO_WIDTH | bc)
YMULT=$(echo $ID_VIDEO_HEIGHT*100/$OUT_VIDEO_HEIGHT | bc)
if [ $XMULT -gt $YMULT ]; then
  NEWX=$OUT_VIDEO_WIDTH
  NEWY=$(echo $OUT_VIDEO_WIDTH*$ID_VIDEO_HEIGHT/$ID_VIDEO_WIDTH/2*2|bc)
else
  NEWX=$(echo $OUT_VIDEO_HEIGHT*$ID_VIDEO_WIDTH/$ID_VIDEO_HEIGHT/2*2|bc)
  NEWY=$OUT_VIDEO_HEIGHT
fi
echo ${NEWX}x${NEWY}

Note that I can’t preserve TAB characters in a blog post. So those Makefiles won’t work until you replace strings of 8 spaces with a TAB character.

Related posts:

  1. Ffmpeg and Video on a Viewty Phone I recently decided to copy some of my FLV (Flash...
  2. ATI ES1000 Video on Debian/Squeeze The Problem I’ve just upgraded my Dell PowerEdge T105 [1]...
  3. Digital Video Cameras I’ve just done some quick research on Digital Video Cameras...

Syndicated 2013-02-14 23:34:15 from etbe - Russell Coker

Phone/Tablet Sizes

Galaxy S3 vs Xperia X10 1/2 Galaxy S3 vs Xperia X10 2/2

The above two pictures show me holding a Samsung Galaxy S3 which has a 4.8″ display in my left hand and a Sony Ericsson Xperia X10 which has a 4.0″ display in my right hand. I am holding both phones in a manner that allows me to touch the top opposite corner with my thumb – the position I need for one-handed phone use. The Xperia X10 can be completely enclosed by my hand, when I have a bottom corner resting in my palm it won’t slide down while the Galaxy S3 can slide.

Also one thing I didn’t realise before having the pictures taken is that my posture is quite different when using the two phones. With the Galaxy S3 my wrist is clearly bent and this seems more likely to cause me to have more problems with Carpal Tunnel Syndrome [1]. I haven’t had any serious problems with CTS for the last 2.5 years but I have had minor problems that suggest that I will have to be careful about my posture for the rest of my life.

So it seems that a 4.8″ phone is just too big for ideal one-handed use (grasping the vertical phone from the bottom). As I had CTS problems with my left hand I will try to use my new phone with my right hand as much as possible. Also I can reach further than the width of the phone screen when I grasp it from the side, so for me a size of about 5.2″ would be better than the 4.8″ of the Galaxy S3. It’s quite likely that the Samsung Galaxy Note with it’s 5.3″ screen would be a better device for me to grasp from the side. But the Galaxy Note 2 might be a little too large for me.

Note that I am only considering ways of holding the device that permit full operation. Anything that involves changing position for different uses or occasionally using two hands for a mostly one-hand operation doesn’t count.

7 inch tablet

The above picture is of me holding a 7″ Android tablet (which I have just returned to Aldi [2]). When holding it from the sides I can reach more than half the screen with one hand so it seems that the ideal size for a tablet to be held in two hands for me would be 8″ or even a little larger. A tablet larger than that could only be properly used if resting on my lap or a desk – so for me 8″ is the size that differentiates things which can be strictly used as tablets (holding with two hands and using thumbs for input) and things which are more like Netbooks (on desk typing).

Ideal Device Sizes for people based on Height

I am about 190cm tall. If we assume that height and hand size are strongly correlated then we can look at median heights of various age groups and determine what might be a good device size. I am also assuming that everyone wants to have the largest possible device, but some people have other criteria such as the size of their pockets.

For me it’s 8″ tablet, 5.2″ side-grip phone, and 4″ bottom-grip phone. I used data from a chart of the average heights of American boys [3] and a chart of the average heights of American girls [4] to determine what size devices might suit children of various ages. Note that before the age of 12 the height of boys and girls is near enough to identical.

Device Two Hand Tablet Use Phone Grasp from Side Phone Grasp from Below
7″ tablet 14yo boy or 17yo girl noone noone
Galaxy Note 5.3″ 10yo 95th percentile 17yo boy noone
Galaxy S3 4.8″ 6yo 17yo boy or 95th percentile 17yo girl almost noone
Galaxy S and iPhone 5 4.0″ 3yo 10yo 95th percentile 17yo boy
iPhone 4 3.5″ noone 8yo 14yo boy or 16yo girl

One thing that particularly interests me is the educational use of Android devices for children. As few people buy new phones and tablets for young children that largely means that children borrow devices from their parents or are given older phones when relatives no longer need them. So it seems that if all other things are equal then an adult might choose a phone with a 4.8″ display to allow it to be used as a tablet by children in the 6-10 age range.

Conclusion

It seems that the iPhone 4 is a good size for one-handed use by women of average height. By the standards of the people who don’t regard gripping a phone from below as a significant feature the iPhone 4 would be designed for the hand of an 8yo. By any standards all iPhones other than the iPhone 5 were not the ideal size for most adults to use – maybe they are well designed to fit in a pocket while unused. Charles Stross criticised the iPhone because it’s too small to be seen well by people with poor vision [5], he also makes many other interesting points about the use of phones and I recommend reading his article (and the rest of his blog).

The common tablet size of 7″ seems like it might be ideal for women to hold with both hands, but for men of average height a 7.5″ tablet might be better suited, it sounds like a small difference but it changes button size (good for people with thicker fingers) and allows displaying more data at once (15% greater screen area). Of course if you want to use a tablet on a desk then something much bigger would be better, maybe 12″ or 14″. I think that there is a real market for 14″ tablets that are designed to be carried around the home or office and then used on a table or lap which differs from the tablets that are designed to be more portable.

There is also the use case of holding the phone in one hand while typing with the other which I haven’t considered in this post. I don’t think it’s interesting because in that case almost everyone will find that the limitation is the size of their pockets and the size of an object that can be held to one’s face for a phone call not the size of their hands. I’ve previously written about my search for Geeky jeans and the ability to put a 7″ tablet in my jeans pocket [6]. So I think that pocket size isn’t a phone selection issue for men. The fact that women’s clothing tends to have tiny pockets is another issue, if someone knows of a good analysis of phone size vs pockets in women’s clothes then please let me know.

Related posts:

  1. Returning the Aldi Tablet I have decided to return the 7″ Android tablet I...
  2. Cheap Android Tablet from Aldi I’ve just bought a 7″ Onix tablet from Aldi....
  3. Changing Phone Prices in Australia 18 months ago when I signed up with Virgin Mobile...

Syndicated 2013-02-11 09:45:58 from etbe - Russell Coker

Links February 2013

Aaron on Software wrote an interesting series of blog posts about psychology and personal development collectively Titled “Raw Nerve”, here’s a link to part 2 [1]. The best sections IMHO are 2, 3, and 7.

The Atlantic has an insightful article by Thomas E. Ricks about the failures in leadership in the US military that made the problems in Afghanistan and Iraq a lot worse than they needed to be [2]

Kent Larson gave an interesting TED talk about how to fit more people in cities [3]. He covers issues of power use, transport, space use, and sharing. I particularly liked the apartments that transform and the design for autonomous vehicles that make eye contact with pedestrians.

Andrew McAfee gave an interesting TED talk titled “Are Droids Taking Our Jobs” [4]. I don’t think he adequately supported his conclusion that computers and robots are making things better for everyone (he also presented evidence that things are getting worse for many people), but it was an interesting talk anyway.

I Psychopath is an interesting documentary about Sam Vaknin who is the world’s most famous narcissist [5]. The entire documentary is available from Youtube and it’s really worth watching.

The movie Toy Story has been recreated in live action by a couple of teenagers [6]. That’s a huge amount of work.

Rory Stewart gave an interesting TED talk about how to rebuild democracy [7]. I think that his arguments against using the consequences to argue for democracy and freedom (he suggests not using the “torture doesn’t work” and “women’s equality doubles the workforce” arguments) are weak, but he made interesting points all through his talk.

Ernesto Sirolli gave an interesting TED talk about aid work and development work which had a theme of “Want to help someone? Shut up and listen!” [8]. That made me think of Mary Gardiner’s much quoted line from the comments section of her Wikimania talk which was also “shut up and listen”.

Waterloo Labs has some really good engineering Youtube videos [9]. The real life Mario Kart game has just gone viral but there are lots of other good things like the iPhone controlled car and eye controlled Mario Brothers.

Robin Chase of Zipcar gave an interesting TED talk about various car sharing systems (Zipcar among others), congestion taxes, the environmental damage that’s caused by cars, mesh networks, and other things [10]. She has a vision of a future where most cars are shared and act as nodes in a giant mesh network.

Madeleine Albright gave an interesting TED talk about being a female diplomat [11]. She’s an amazing speaker.

Ron Englash gave an interesting TED talk about the traditional African use of fractals [12]. Among the many interesting anecdotes concerning his research in Africa he was initiated as a priest after explaining Georg Cantor’s set theories.

Racialicious has an insightful article about the low expectations that members of marginalised groups have of members of the privileged groups [13].

Rick Falkvinge has a radical proposal for reforming copyrights with a declared value system [14]. I don’t think that this will ever get legislative support, but if it did I think it would work well for books and songs. I think that some thought should be given to how this would work for Blogs and other sources of periodical content. Obviously filing for every blog post would be an unreasonable burden. Maybe aggregating a year of posts into one copyright assignment block would work.

Scott Fraser gave an interesting TED talk about the problem with eyewitness testimony [15]. He gave a real-world example of what had to be done to get an innocent man acquitted, it’s quite amazing.

Sarah Kendzior wrote an interesting article for al Jazeera about the common practice in American universities to pay Adjunct Professors wages that are below the poverty line [16]. That’s just crazy, when students pay record tuition fees there’s more than enough money to pay academics decent wages, where does all the money go to anyway?

Related posts:

  1. Links January 2013 AreWomenHuman has an interesting article about ViolentAcrez and the wide...
  2. Links February 2012 Sociological Images has an interesting article about the attempts to...
  3. Links February 2009 Michael Anissimov writes about the theft of computers from the...

Syndicated 2013-02-07 13:48:35 from etbe - Russell Coker

Speaking Stacks

Brianna Laugher wrote a blog post about the speaking stack used in the free software activism BoF at LCA 2013 [1].

Occupy Wall St uses what they call a progressive speaking stack – this means that white men step back in the queue and people from marginalised groups step forward [2].

During the free software activism BoF the speaking queue that was used was that people who hadn’t already spoken had priority over those who had spoken before. This was a really good idea and could be used a lot more in LCA and other conferences. It is fairly common that a small number of delegates take up the vast majority of question time.

I suggest that all white men watch the questions and observe how many are asked by white men and how many are asked by everyone else. Also note the way that questions are asked, who shouts a question, who wins when two delegates ask at the same time, and who waits until the end of the talk.

The Reasons for a Speaking Stack

In Occupy Wall St there is a real benefit in giving priority to members of minority groups. The political needs of white men are generally reasonably well publicised due to disparities in media coverage. As the aim of the occupy movement is not to replace one group of white men with another there is an obvious need to get opinions from members of minority groups.

Bugs in software generally affect members of all groups equally (with the exception of bugs related to accessibility features). But even so I think it is important to encourage diversity among people who ask questions. When someone is in the audience sees that no-one who is in their minority group is asking questions they will get the impression that they are just watching someone else’s conference. We should aim to have a conference for everyone.

How to Implement it

When taking questions for one of my talks I generally try to give priority to people who find it difficult to be heard. But doing that requires some concentration and I often don’t have any to spare when giving a demanding technical talk. I think that this needs to be managed by the moderator/MC/microphone holder. Someone who doesn’t need to think much about the content of the talk can concentrate on choosing the best people to ask questions.

Also a significant issue is questions that are called out during a talk. Some speakers insist that questions are only asked at the end of their talk. But I prefer some degree of interaction with the audience so my talks often end up being more about having a conversation with the audience than reading from a script. The difficulty with an interactive talk is that it strongly favors those who are prepared to shout a question over those who wait their turn. I think I’ll try to make a strict policy of having people raise their hand to ask a question in future to address this issue, but I will need assistance from someone who’s not concentrating on the technical issues.

For a conference I think it would make sense for the people who hold the microphones to keep a mental list of who’s asked questions. If someone asks their share of questions on the first day of the conference then they would deserve a lower priority for questions on later days. This would also encourage delegates to consider whether their question is really worth asking during the lecture or whether they should save their question quota and talk to the speaker afterwards.

Also we could ask delegates to exercise restraint. One suggestion I heard was that people should set themselves a quota of 3 questions per conference or 1 per day. In a conference with ~600 delegates and ~33 sessions per day if everyone asked a question each day that would be about 18 questions per session – more than is typical. So it seems that anyone who asks a single question per day is still likely to be asking more than 1/600 of all questions.

Exceptions

There are occasions when multiple questions and comments make sense. One example is where a member of the audience has significant expertise in the topic in question. Another is when a speaker completes significantly before the end of their allotted time and some questions from the MC or an experienced member of the audience can help them spend all their time educating the audience.

But I think there needs to be a compelling reason that has a clear benefit for the audience.

General Benefits

How many of the repeat questions are useful to the audience? It seems to me that there is a correlation between multiple questions and questions that are more about the person asking than about clarifying issues that are likely to matter to the audience.

Would such limits improve the quality of the discussion even for people who don’t care about diversity?

Also I have asked a disproportionate number of questions in the past. I am reducing the number of questions that I ask although I think I asked more than 3 at this conference.

Related posts:

  1. Questions During Lectures An issue that causes some discussion and debate is the...
  2. Advice for speakers I am not an expert at public speaking. Attending Toastmasters...
  3. what is a BOF? BOF stands for Birds Of a Feather, it’s an informal...

Syndicated 2013-02-01 04:11:54 from etbe - Russell Coker

SE Linux Things To Do

At the end of my talk on Monday about the status of SE Linux [1] I described some of the things that I want to do with SE Linux in Debian (and general SE Linux stuff). Here is a brief summary of some of them:

One thing I’ve wanted to do for years is to get X Access Controls working in Debian. This means that two X applications could have windows on the same desktop but be unable to communicate with each other by any of the X methods (this includes screen capture and clipboard). It seems that the Fedora people are moving to sandbox processes with Xephyr for X access (see Dan Walsh’s blog post about sandbox -X [2]). But XAce will take a lot of work and time is always an issue.

An ongoing problem with SE Linux (and most security systems) is the difficulty in running applications with minimum privilege. One example of this is utility programs which can be run by multiple programs, if a utility is usually run by a process that is privileged then we probably won’t notice that it requires excess privileges until it’s run in a different context. This is a particular problem when trying to restrict programs that may be run as part of a user session. A common example is programs that open files read-write when they only need to read them, if the program then aborts when it can’t open the file in question then we will have a problem when it’s run from a context that doesn’t grant it write access. To deal with such latent problems I am considering ways of analysing the operation of systems to try and determine which programs request more access than they really need.

During my talk I discussed the possibility of using a shared object to log file open/read/write to find such latent problems. A member of the audience suggested static code analysis which seems useful for some languages but doesn’t seem likely to cover all necessary languages. Of course the benefit of static code analysis is that it will catch operations that the program doesn’t perform in a test environment – error handling is one particularly important corner case in this regard.

Related posts:

  1. Debian SSH and SE Linux I have just filed Debian bug report #556644 against the...
  2. /run and SE Linux Policy Currently Debian/Unstable is going through a transition to using /run...
  3. New SE Linux Policy for Wheezy I’ve just uploaded a new SE Linux policy for Debian/Wheezy....

Syndicated 2013-01-30 21:16:33 from etbe - Russell Coker

My SE Linux Status Report – LCA 2013

This morning I gave a status report on SE Linux. The talk initially didn’t go too well, I wasn’t in the right mental state for it and I moved through the material too fast. Fortunately Casey Schaufler asked some really good questions which helped me to get back on track. The end result seemed reasonably good. Here’s a summary of the things I discussed:

Transaction hooks for RPM to support SE Linux operations. This supports signing packages to indicate their security status and preventing packages from overwriting other packages or executing scripts in the wrong context. There is also work to incorporate some of the features of that into “dpkg” for Debian.

Some changes to libraries to allow faster booting. Systems with sysvinit and a HDD won’t be affected but with systemd and SSD it makes a real difference. Mostly Red Hat’s work.

Filename transition rules to allow the initial context to be assigned based on file name were created in 2011 but are not starting to get used.

When systemd is used for starting/stopping daemons some hacks such as run_init can be avoided. Fedora is making the best progress in this regard due to only supporting systemd while the support for other init systems will limit what we can do for Debian. This improves security by stopping terminal buffer insertion attacks while also improving reliability by giving the daemon the same inherited settings each time it’s executed.

Labelled NFS has been accepted as part of the NFSv4.2 specification. This is a big deal as labelled NFS work has been going for many years without hitting such a milestone in the past.

ZFS and BTRFS support but we still need to consider management issues for such snapshot based filesystems. Filesystem snapshots have the potential to interact badly with relabelling if we don’t develop code and sysadmin practices to deal with it properly.

The most significant upstream focus of SE Linux development over the last year is SE Android. I hope that will result in more work on the X Access Controls for use on the desktop.

During question time I also gave a 3 minute “lightning talk” description of SE Linux.

Related posts:

  1. SE Linux Status in Debian 2012-01 Since my last SE Linux in Debian status report [1]...
  2. Debian SE Linux Status June 2012 It’s almost the Wheezy freeze time and I’ve been working...
  3. Status of SE Linux in Debian LCA 2009 This morning I gave a talk at the Security mini-conf...

Syndicated 2013-01-28 02:56:30 from etbe - Russell Coker

LCA 2012

LCA 2013 [1] is starting so it seems like time to finish my write-up of LCA 2012.

As usual it was a great conference, although I got sick immediately after getting there which reduced my ability to attend.

Android

A major unofficial theme of the conference was Android. Most delegates seemed to have Android phones, the Samsung Galaxy S and Galaxy Nexus seemed to be the most popular phones. Many delegates had two or more phones for development purposes. A large portion of the casual conversation at the conference concerned Android.

There were a couple of really interesting talks about the Serval mesh networking project [2] which involves Android phones running in ad-hoc Wifi mode for long range communication without any official base station. Serval allows transferring messages, pictures, and voice calls. If you need to get longer range you can mount one phone in a convenient place and other phones will decide to use it as a relay – there is no need to have a dedicated relay device (such as a mobile phone tower or Wifi access point). Serval is supposed to work with Wifi access points but due to Java not exposing some networking details to the higher levels of software the code that was available at the time of the conference didn’t support networks other than a /24, which meant that the conference Wifi network didn’t work with Serval. As an aside most people at the conference who installed Serval were using a development version that was newer than the version on the Android market. I can’t remember what the extra features were though.

Serval was designed for emergency situations, it can be installed on phones (and pushed to other phones via Wifi) in the field and allow communications when the infrastructure is broken. Also it’s designed with some aim of circumventing censorship which among other things means that there are no facilities for tracking use. I think it would be really handy to be able to in some way track viewing of or interest in images that are transported via the mesh (maybe by something similar in concept to Google +1). Then in a crowd sourced environment people who take photos would be encouraged in their work by audience appreciation.

One thing that interests me is the possibility of using Serval on a cruise ship. A cruise ship is an environment where mobile phone calls are unreasonably expensive, cabin phones aren’t much use (who pays for a cruise and hangs out in their cabin?), and where there is usually a Wifi network installed. If a ship has a single bridged Wifi network that allows connecting to Wifi before authenticating for Internet access (which is probably the common case) then you could transport VOIP over that network without paying – and without incurring any expense on the cruise company. One of the Serval developers assured me that this should be possible, of course a cruise ship with 3,000 passengers probably doesn’t use a /24 for their Wifi so the current versions of Serval won’t work…

At the “geek my dinner” event (a party where everyone brought $20 of food/drink which was cooked by volunteers) an artist showed me some art work that she created on her Samsung Galaxy Note (which was the biggest phone on sale at the time), it was very impressive. She recommended Picasso Mirror Draw, Sketch Free, Sketch Book Mobile Express, and Freenote as free graphical programs for Android. Samsung has a Noteworthy Project advertising campaign based on the artistic uses of the Galaxy Note which has some good videos of artists [3].

Chris Neugebauer and Paris Buttfield-Addison gave an informative and amusing talk about Android UI development (this link has the video) [4]. It’s a pity that I missed seeing that one live but fortunately the video is of high quality.

Accommodation

picture of women cleaning

As I’ve become interested in Sociology I couldn’t help but notice the pictures that accompanied the rules about cleaning the dormitory (which were displayed over the kitchen sink), it seems to imply that cleaning is only women’s work. I wonder whether the people who created that poster deliberately chose pictures of women or whether they just chose the first available pictures from a collection of stock photos.

Someone who was near my dorm room seemed to not realise how their alarm impacts other people. For the first two mornings I was woken repeatedly after 6AM by someone who was pressing the snooze button on their alarm. When sleeping in close proximity to other people the reasonable options involve some combination of having no loud alarm, immediately turning the alarm off and getting up (not pressing snooze to have it go off repeatedly), and setting the alarm for a time when almost everyone wants to get up (EG 1 hour before the first session).

Networking

Chris Neugebauer organised the Unprofessional Delegates Networking Session which was a great event. It was an event held at the same time as the Professional Delegates Networking Session with the difference being that you had to pay $5 for food and there was no free drink. A lot of great people attended the UPDNS so I’m glad I don’t pay for the PDNS. It seems that we won’t have a UPDNS this year unfortunately.

Conclusion

LCA is always great fun and very educational. I recommend attending every year.

Related posts:

  1. Back to the Xperia X10 10 months ago I was given a Samsung Galaxy S...
  2. A Computer Conference on a Cruise Ship After LCA [1] there was a discussion about possible locations...
  3. CyanogenMod and the Galaxy S Thanks to some advice from Philipp Kern I have now...

Syndicated 2013-01-27 12:09:04 from etbe - Russell Coker

Power Supplies and Wires

For some time I’ve been wondering how the wire size for power supplies limits the power. So I’ve done some quick calculations to determine if it’s a problem.

The first type that is of interest are the “Inverters” that are used to convert 12VDC to 240VAC (mains power) to allow electric devices to be operated in a car. I’ve seen some reports from dissatisfied user about Inverters not supplying as much power as expected and I’ve had problems with my 150W Inverter not always supplying my Thinkpad (which definitely doesn’t draw 150W). The second type is phone chargers as charging a phone in a reasonable amount of time is always a problem.

Inverter Rating Fine Print vs Laptop PSU

My Thinkpad Power Supply claims “Efficiency Level IV” which according to the US EPA document describing the efficiency marking protocol for external power supplies [1] means that it is at least 85% efficient when supplying 50W+. The peak output of the PSU is 4.5A at 20V which is 90W peak output, 90/0.85 == 106W power drawn. One would hope that wouldn’t be a problem from a 150W PSU.

But the fine print on the PSU says that it can provide 110W continuously and 150W for 10 minutes. So according to my calculations I’m within 4W of overloading the PSU if my Thinkpad uses full power. It also says that it is designed for 13.8V input. I have no idea how the performance of the Inverter changes as the supply Voltage changes between the 12.6V that a 6 cell lead-acid battery is designed to provide and the 13.8V charge from the car alternator. But I have had occasions when my Inverter stopped working correctly presumably due to being unable to supply as much current as my Thinkpad draws.

As an aside I measured the Voltage in my car (with the engine off) at 12.85V from the cigarette lighter socket and 13.02V directly from the battery. I wonder if there is some sort of overload protection on the cigarette lighter which has a side effect of reducing the Voltage. Resistance in wires reduces the Voltage, but all Voltage meters are designed to have a high resistance to prevent that from being an issue. If anyone has an explanation for the 0.17Volt drop then please write a comment!

Can a Car Provide 130W from the Cigarette Lighter socket?

If the Inverter is also 85% efficient (and it might be less as it has no indication of efficiency on the box) then when supplying 110W it would draw 110/0.85 == 129.4W (I’ll round it up to 130W).

The power in Watts is equal to the Voltage multiplied by the current in Amps (W=V*I). Therefore I=W/V so if the car battery was at 12.85V then 130W/12.85V == 10.12A will flow.

The current that goes through a circuit is equal to the Voltage divided by the resistance (see the Wikipedia page on Ohm’s law for more information). This also means that the resistance equals the Voltage divided by the current. 12.85V/10.12A == 1.27 Ohms. Note that this is the resistance of the entire circuit, all the wires going to the battery, the circuitry inside the Inverter, and the internal resistance of the battery.

The Inverter’s cable is 1M long (2 meters of wire) and each wire is about 3.5mm in diameter including the insulation which means that the copper wire is probably equivalent to a single core conductor that is about 1mm in diameter. According to one of the online guides to resistance [2] wire that is 1.02mm in diameter will have a resistance of 0.02 Ohms per meter which gives a resistance of 0.04 Ohms. 0.04 Ohms is 3% of the total resistance of the circuit which doesn’t seem like it will be a real problem.

In practice I’ve noticed that the connector gets extremely hot when it’s in use while the cable doesn’t get warm enough to notice. I suspect that the quality of the connector limits the power that is available but I don’t have an easy way of measuring this.

Inverters that are rated at 300W are designed to attach directly to the battery. An Inverter that is rated at 300W would draw 300W/0.85 == 352W from the battery. That needs 352W/13.02V == 27.04A and therefore a circuit resistance of 13.02V/27.04A == 0.48 Ohms total resistance. I wonder whether dirt on the battery terminals would give a significant portion of that.

Phone Charging

I’ve also been wondering about why mobile phones take so long to charge, and now I’ve finally done the calculations.

The latest standard for mobile phones is to use USB for charging. The Wikipedia page about USB says that the standard is for USB 2.0 to supply up to 500mA at 5V +-5%. That means 0.5A*5V == 2.5W +- 5%. If we assume that the internal power supply in a phone is also 85% efficient then that means 2.5*0.85 == 2.125W going to the battery.

My Samsung Galaxy S3 has a battery which is rated at 7.98Wh. According to the Wikipedia page about Lithium Ion batteries the charge/discharge efficiency is 80% to 90% – I’ll assume that it’s 85% for further calculations. If the battery in the phone is 85% efficient and the phone is doing nothing but charging then the charge time for a regular USB port would be 7.98Wh/0.85/2.125W == 4.42 hours (4 hours 25 minutes) of charge time. That probably means something closer to 5 hours to totally charge the phone while it’s running. There are dedicated “charging ports” for USB which can supply up to 1.5A. The 3rd party charger which came with my phone was rated at 1A and would hopefully be capable of completely charging the phone in less than 3 hours (but in practice isn’t). It’s interesting to note that MacBooks expose the amount of current drawn from a USB port with a GUI, so it should be possible to measure a phone charge rate by connecting it to a MacBook (which is cheaper than cutting up a phone cable).

My old Samsung Galaxy S has a battery which is rated at 5.55Wh, by the same calculations it would take slightly more than 3 hours to charge on a standard USB port or 1.5 hours on my newest USB charger. In practice it has never got anywhere close to that, I presume that the phone is designed to draw less than 500mA.

Phone Cable Resistance

The charger that came with my Galaxy S has a cable that is about 1.75M long, the cable is flat and measures just over 1mm thick and about 2mm wide. Presumably the wire is equivalent to a single core that’s about 0.4mm in diameter thus giving it a resistance of about 0.134 Ohm per meter, or 1.75*2*0.134 == 0.469 Ohm for the cable. The charger is rated at 0.7A. To supply 0.7A at 5V the resistance would be 5V/0.7A == 7.143 Ohm – so about 6.6% of the total resistance of the circuit would be in the wire from the charger to the phone.

The charger that came with my Galaxy S3 has a round cable that’s just over 3mm thick and about 90cm long. If each wire in the cable is equivalent to a solid wire that is 0.912mm in diameter then it would be 0.0264 Ohm per meter of wire or 0.9*2*0.0264 == 0.0475 Ohm. The total circuit resistance would be 5V/1A == 5 Ohm. So 0.0475 Ohm is less than 1% of the circuit resistance.

Voltage Drop

The Voltage across a part of a circuit is proportional to the resistance (see the Wikipedia page on Series and Parallel Circuits for a good explanation).

Basically this means that if 1% of the resistance of a circuit is in the wire then 1% of the Voltage drop will also be in the wire, so if we have a 5V supply with my Galaxy S3 cable then each of the two wires in the cable will have a difference of about 0.025V between the ends and the phone will receive a supply of 4.95V, the difference isn’t something that is worth worrying about. But the cable from my Galaxy S has a resistance equivalent to 6.6% of the circuit resistance which means that the theoretical charge time will be 6% longer than it might be – or 6% more current will be drawn from the mains than should be needed.

Conclusion

The charger that came with my Samsung Galaxy S isn’t much good. Wasting 6.6% of the power in the wire is unreasonable.

Phones keep getting more power hungry and batteries keep getting larger. There are third party phone batteries and external batteries that are charged by USB which have more than twice the capacity of the stock phone batteries – this means more than twice the charge time. This problem will keep getting worse.

The problem of a phone in active use drawing more power than the charger can provide (and running out of battery while on the charger) seems likely to stay with us. So while an Android phone has the potential to be a great little embedded server it seems that hacking the power supply is going to be a required first step for realising that potential.

The decision to make 5V the USB power standard was reasonable at the time as it was the voltage used for most things on the motherboard. The decision to use USB as the phone charging standard was also reasonable, it allows phones to be charged anywhere. The combination of those two decisions isn’t good for the user. If a higher Voltage such as 12V was used then 5* the power could be supplied through the same wires at the same level of efficiency.

It would be really good if cars came with built in Inverters and supplied 240VAC or 110VAC depending on the region they were manufactured for. It’s becoming a fairly common feature to have a “cigarette lighter” port in the car boot as well as at least two ports inside the car. When a car has three sockets and only one device to actually light cigarettes (which I suspect is only provided to fill an empty socket) it’s very obvious that people want to connect random devices. Also having USB charging ports inside the car would be a really good idea (one for each seat would be good for Ingress).

Related posts:

  1. Samsung Galaxy S3 First Review with Power Case My new Samsung Galaxy S3 arrived a couple of days...
  2. CyanogenMod and the Galaxy S Thanks to some advice from Philipp Kern I have now...
  3. Cooling Phones According to the bureau of meteorology today is 39C. But...

Syndicated 2013-01-24 11:47:16 from etbe - Russell Coker

Phone Calls and Other Distractions

Harald Welte has written about the distraction of phone calls and how it impacts engineering work [1]. He asks why people feel that they are entitled to interrupt him given the cost to his work.

Some years ago while working as a programmer I was discussing such things with a colleague who worked for the consulting part of the same company. He was really surprised when I told him that a phone call at the wrong time would cost me at least 30 minutes work and possibly an hour or more. His work was also quite technical and demanding but the difference between software development (where you need to think about a lot of program state to consider where the problem might be) and consulting (where you have to deal with a smaller number of configuration file options and sometimes getting debugging information to someone like me) is considerable. So the attitudes towards receiving calls also tends to be quite different.

Computer work requires more concentration, thought, and knowledge of system state than many (most?) career choices. If someone finds that an unexpected phone call costs them no more than a few minutes work then it’s quite reasonable of them to phone other people whenever they feel like it – generally by default people think that everyone else is just like them.

In terms of managing interruptions to my work, I generally encourage people to email me and that works reasonably well. So I don’t have too many problems with distracting phone calls. I used Jabber for a while a few years ago but I didn’t reinstall my Jabber server after it became corrupt because of the distraction. I believe that was due to using Jabber in the wrong way. I should have just started a Jabber client when I wasn’t doing anything important and then killed it when I started doing some serious coding. Having a Jabber message interrupt me when I’m watching a TED talk or reading blogs is no big deal. In fact I could tell everyone who has my phone number that if they see me on Jabber then they can just phone me if they wish while knowing that it won’t distract me from anything serious. I wonder if I could configure a Jabber client to only receive messages when a program such as mplayer is running.

I have configured my laptop and workstation to never alert me for new mail. If I’m not concentrating then I’ll be checking my email frequently and if I am concentrating I don’t want a distraction. I have configured my phone to give one brief vibration when it gets mail and not make any sound, I will only notice that if I’m not concentrating on anything. It’s a standard Android feature to associate ring tones with phone numbers, it’s a pity that the K9 MUA doesn’t allow associating email addresses with notifications. There are some people who’s email could usefully trigger an audible alert. There is an K9 feature request from 2009 to allow notifications only when the IMAP flag “Flagged” is set which would allow the mail server to determine which users are important, but there’s no sign that it will be implemented soon.

I’ve started playing with Google+ recently due to Ingress team interaction being managed through it. Google+ seems quite poor in this regard, it defaults to making a ring tone for lots of different events. Turning that off is easy enough but getting notifications only about things that are important to me seems impossible. I would like to get an audible alert when someone makes a Google+ post with an Ingress code (because they expire quickly and because they only seem to be posted at times when I’m not busy) but not get audible alerts about anything else. I’m sure that most people who use Google+ would like to have different notifications for various types of event. But the Android client has options for whether there should be vibration and/or noise and for which events get the notifications. No options for different notifications for different events and for treating some community posts differently from others.

It seems that the default settings for most programs suit people who never need to spend much time concentrating on a task. It also seems that most programs don’t offer configuration options that suit the needs of people who do concentrate a lot but who also sometimes receive important phone calls and email. It’s ironic that so many applications are designed in the least optimal way for the type of people who develop applications. The Google+ developers have an excuse as doing what I desire would be quite complex. But there are other programs which should deal with such things in a user friendly manner.

Related posts:

  1. Globalisation and Phone Calls I just watched an interesting TED talk by Pankaj Ghemawat...
  2. A Mobile Phone for Sysadmin Use My telco Three have just offered me a deal on...
  3. Health and Status Monitoring via Smart Phone Health Monitoring Eric Topol gave an interesting TED talk about...

Syndicated 2013-01-18 12:15:22 from etbe - Russell Coker

1036 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!