If Amazon’s Alexa got a boob-job…

…would you have sex with her?

This post is not safe for work.

Note: I encourage comments. If you’re reading this from a phone, I haven’t found a way to enable commenting from the the mobile format. If you switch to desktop mode in your browser, you should get a form at the bottom of the post.

One of my objectives to living here in Germany is to improve my German. I’m a citizen. I should be able to speak the language. As part of that, I’ve been reading articles in the newspaper 1 as well as magazine articles. There are some things about the tone and coverage of what I’ve read that strike me as different from what you’d read in American publications. I’ve thought about doing some posts on this blog of the theme, “The things I’ve read in Germany”. I guess this is the first of these.

The future of sex

The other day, I was at the drinkshop and an issue of Focus magazine caught my eye.2 The headline article is about how robots/cyborgs, possibly with artificial intelligence (AI), may affect our future sex lives:

The future of sex How we will love

In this post, I’ll need to go on a tangent or two 3 as background to my perspective on the topic. First, I’ll list some of the ideas that the article gives 4. Next, I’ll describe some thoughts I’ve had around another sex topic – plastic surgery. I’ll go a little into prostitution, and finally, I hope it’ll come together in a coherent way.

My main point is this: Be careful what you judge others for. We all want to draw lines elevating ourselves, but there usually isn’t some fundamental difference. It’s usually just a matter of extent.

The sex-toy industry has evolved

In all technologies, the sex industry is at the leading edge. If a young engineer wants to do truly new stuff, skype, facebook, microsoft… are perhaps not the right places to work. Porn was probably well ahead in all things that those companies pride themselves on. Video sex lines were surely in place well before skype. In the 90s, Intel had a product called pro-share. Inside of Intel, on Intel owned and supported hardware, in Intel conference rooms,… it never worked. I’d bet money that sex services had working telepresence.

Years ago, there were plastic blow up dolls

By reading the focus article, I learned about the RealDoll:

Cost is $5973 according to their website.

Looking at the pictures, things have evolved a bit since the days of the blowup doll.

No, focus.de is not a porn magazine

The magazine went into a lot of the psychology of sex toys. As these robots become more convincing, what will that do to real sex? For the really introverted types, unable to find love, can these dolls be fulfilling? For those with certain unacceptable fetishes, pedophilia or violence, can these be an outlet? 5

Many modern dolls are fitted with artificial intelligence, similar to Alexa/Siri. You can have basic conversations with them. There are AI psychologists out there, do they have to be limited to a computer screen?

There are EU politicians working on policy around sex dolls. There’s a member of the European Parliment who is fighting for human rights for robots. All robots, not just sex robots. Here’s a random English language article on the topic.

One interesting quote came from the author of the book Love and Sex with Robots 6 “by the year 2050 it’ll be normal to have sex with robots”

In the mainstream media, the movie “Her” got very positive reviews. It was awarded an Oscar for best screenplay in addition to four other nominations.

This is not fringe stuff.

So, would you sleep with a robot?

Sex is one of the most illogical things about being a modern human7. Big boobs/little boobs, why do we care? Big butt/little butt, why do we care? Red hair, blond, fair skinned or dark, petite or fleshy… why do any of these things matter? 8 These things shouldn’t matter, but they do.

Is it a big deal to have plastic surgery?

Most of the people I know would consider plastic surgery to be extreme. They feel that it crosses a line and is somehow fundamentally beyond what others do.

I don’t agree that plastic surgery is fundamentally different. It is merely further down a road that all of us have traveled. Here’s one of my tangents.

All of us do something to improve our looks for ourselves, for others, usually both. If this weren’t true, we’d all shave our heads 9 and wear comfortable sweats. You don’t have to be a Barbie type to get hilights in your hair. Most guys have spent time in the weight room in their youth trying to buff up. Women will wear a slinky dress, push up bras and heals. Under Armour fitted shirts are a popular way for dudes to look more muscular.

But plastic surgery is different. It’s a permanent body modification.

Is it different? Lots of people get tattoos. Lots of people gets lots of tattoos. Those are permanent. Just about all of us have pierced ears.

But plastic surgery is way more extreme!

Is it? Says who? Who gets to decide what’s extreme and what isn’t.

If a woman has breast cancer, would we expect her to live the rest of her life without breasts? Would anyone begrudge a double-mastectomy’d woman of her replacements?

But that’s only because of the cancer!

The cancer leads us to remove the breasts. Putting something in their place is a purely psychological thing. That psychology didn’t just appear with the cancer.

Many women feel that motherhood has partially destroyed their bodies. Nursing takes it’s toll. Is it unreasonable for a woman to want to have her old body back?

TV shows like Extreme Makeover 10 make it look easy. Talk to a doctor, pay some money, stay at home for a day, all done. So wrong. The recovery is not easy. I once helped nurse someone back to health and it was almost a week before she could walk around the block.

The arguments I’m making here all center on the female form. Society does put more emphasis on female beauty. While that is true, I don’t think it is a relevant part of an argument about whether plastic surgery is different from other forms of beauty enhancement.

We all do things for purely cosmetic reasons. The line we draw between what we consider to be everyday things and what is “extreme”, is an arbitrary one. There is no clear line, it’s just opinion.

The sex industry of real people

Most people have paged through a nudey magazine. Playboy, Penthouse,… My college fraternity, like most (all?) frat houses, had a porn tape or two floating around. We had a special cable box for a bunch of years that got all the channels. It was always on and it was always on the Playboy channel. College is an environment soaked in sex, probably too much sex. Is it more than the intense hormonal activity of that age? Usually not. 11

Most guys have been to a strip club.12 It’s a stereotypical part of a bachelor party. Here you are, about to get married, and your best friends are paying some random women, who you don’t know, who you don’t want to know, to wiggle around naked in front of you. She bounces around on your lap. Depending on where you are, she’s rubbing her tits against your face. This is not seen as perverse by most people. A friend here in Germany has promised to take my wife to a Chippendale’s show. 13

Prostitution is legal in many parts of the world. Even in Iran, there are some religious loopholes that enable it. Most people probably view it as taboo, but probably not perverse.

All of these cases are highly sexual. All of these cases are without any “human” connection. The couple “gettin jiggy with it” on the TV. You don’t know them. The girl up on the stage, she probably doesn’t want to know you. The woman that’s paid to escort you to dinner followed by some “evening entertainment”… You’re not getting to know each other.

They all might as well be robots.

Back to sex toys

So would you have sex with a sufficiently lifelike cyborg?14

What’s a bachelorette party without the dildo?15

How about the massaging shower head? Is the massage setting ever used for actual showering?

Mainstream movies have sex toys, no big deal

If you’re in a long distance relationship, perhaps you might consider one of these, available on amazon.de16

Where’s the line?

It’s easy for us to refer to the other guy’s actions as crazy, extreme, perverse, as fundamentally different. Some people walk around in frumpy clothes, others get dolled up occasionally, some go under the knife. It’s a continuum. Some won’t look at another woman/man walking down the street, many will visit the occasional strip bar, some will get it on with a robot.

With all of these topics, there are no fundamental lines. Everyone draws their own lines. It’s their own choice to make. It’s not our place to pass judgement on where someone draws their own.

So again, would you have sex with Alexa incarnated in a machine body?


  1. our downstairs neighbor subscribes to the Sunday edition of the FAZ and is nice enough to leave it on our stairs when they’re done.

  2. I would compare it to Scientific American Mind, though there’s a bit of politics type stuff in there too.

  3. as my posts always do

  4. The article was remarkably balanced. Of course it’s a sensational topic, but it was written fairly matter of factly.

  5. Research says that they can be helpful or they can make things worse.

  6. 3.8 on Amazon with 36 reviews

  7. of course, it made lots of sense before

  8. As a guy, I recognize that these are attributes of women but one could make an equivalent list about men

  9. Or at least a buzz cut. Funny enough, I shave my head cause I think I look goofy with hair

  10. which were very popular

  11. sadly, the adults in some universities don’t assert responsibility when needed

  12. I don’t have a source to back this up. Leave a comment if you don’t think this is true

  13. I’m guessing neither of them will end up with a penis rubbing their faces, but it’s only a guess. I know a guy who’s told me of a time that he ended up with his nose in one of the dancer’s vagina. Not something I would have wanted, but I don’t think it’s different from boobs in the face (which I have experienced and which I did enjoy)

  14. The focus article mentions that current models intentionally have eyes that are not quite human. Apparently it freaks people out.

  15. my wife disputes this. They did have penis shaped bunny ears though. Still, there’s a lot of dildos out there

  16. but not on Amazon.com

What’s your electricity usage?

In my post about apartments in Germany, I wrote a bit about energy efficiency. This post expands on that with our actual electricity usage and some thoughts around that.

When you move into an apartment in Germany, there’s a standard procedure you go through. Part of that is writing down all of the meter numbers. There are a bunch of them. Many apartment buildings, including this one have shared boilers for heating and hot water, so a bit of extra measurement/math is needed.

161111-img_20161111_155750
The boiler that heats water for heating and bathing in our building. It is shared between two apartments.

Here’s a list of the meters that concern me:

  • water
  • cold water (not really sure the difference)
  • hotwater upstairs (we’re in a 2 story flat)
  • hotwater downstairs
  • heating
  • natural gas
  • electricity

A couple weeks ago, I got an email from my landlord requesting updated readings. I knew to expect this because I’d already learned about the concept of cold and warm rent.

What’s warm rent?

In the US, your rent and utilities are separate. Here, they’re separate too, but the accounting is different. When you pay rent, you pay an additional amount to the landlord to cover heating, water, garbage. The amount you pay is initially a guess, based on the previous occupant 1. At the end of the year, you read the meters and adjust2 Kinda like taxes.

Electricity is the same, except it’s all between you and the electric company. I didn’t realize the end of year accounting is the same until I got the adjustment sheet a week or two ago. That explained why on the one hand they were deducting from my bank account but on the other, “…why haven’t I been getting a bill?”

So the bill. It’s unclear how much the adjustment was, but it’s about 100euros. More interesting is the actual numbers involved.

What’s a kilowatt hour?

How many of you know how many kilowatt hours you use? Do you know what a kilowatt hour is? Most of my friends are engineers, so perhaps some of them do. When you hear about Megawatt generators, Gigawatt… does that mean anything to you? When you see a modern wind turbine, how much do those produce?

According to wikipedia:

Typical modern wind turbines have diameters of 40 to 90 metres (130 to 300 ft) and are rated between 500 kW and 2 MW. As of 2014 the most powerful turbine, the Vestas V-164, is rated at 8 MW and has a rotor diameter of 164m.

3

According to the readings at my apartment, we used 1779kWh of electricity in 255 days. This trends to 2756kWh for a year. The paper from the electric company also gave some statistics for typical usage and our usage lies between the typical 1 person (1960) and 2 person (3523) household. I don’t see how our usage could be below typical.

  • Someone’s always home
  • We cook everyday (electric oven/cooktop)
  • 2 kids generate LOTS of laundry

It did get me to thinking. Some time ago, I got a electricity meter

x4inspector

Similar to the one I have in Portland:

killawatt

Our usage is just over 7kWh/day. The break down as I’ve computed it so far:

  • My Skylake computer is always on and idles at 38W. Just under a kWh. Pretty significant. 4
  • To wash a load of clothes at 30 degrees C (warm) uses .6kWh.
  • To dry a load of clothes is 1.1kWh. We probably do one a day on average. Perhaps a little more.
  • I can’t use my plug-in meter on the stove/oven, but googling tells me an oven can use 2400 watt/average. I bake something probably twice a week. One of those times is for pizza when it’s on max for one to two hours. I’ll call it .5kWh/day
  • The cooktop probably uses 1500 watts. Takes an hour to cook dinner?
  • Dishwasher 1.5kWh? we use it everyday.

Adding it up: (.9+.6+1.1+.5+1.5+1.5) = 6.1

The rest includes things like lighting 5, an hour or two of TV, the water kettle.

Comparing it to our usage in Portland

Portland electricity costs about $0.08/kWh. (2756kWh/365day*31days/month*$0.08/kWh)= $18/month. Add $10 for taxes and other stuff and that computation is still way less than what I remember the bill to be. I currently have our house listed on vrbo.com. This time of year, there’s not much going on. Summer is where the money is. We’re happy to have 50% occupancy. This month’s bill is $52.

  • The house is heated with gas
  • The stove is gas
  • The dryer is gas

Where’s the electricity go?

  • We have a freezer and and old fridge in the basement
  • Everything is lighted with CFLs
  • It is about twice the size of our apartment here

Whenever we return, I’ll definitely need to do some work to understand where the higher usage is coming from.

I hope to do another post related to this topic. Our garbage production is also way lower here. I’d say that the one nighttime diaper we put on our son each day constitutes half of our garbage.

Follow up

In my post about German apartments, I talked about how you have to provide your own lighting fixtures. I also learned this summer that Lithuania goes to the other extreme. Not only do they have light fixtures, most apartments are furnished. Here’s a post that mentions this fact. The way I learned it was when a friend from Portland, Chris, was passing through Frankfurt. I told him about the fixtures thing and he recounted a story where a Lithuanian friend, upon seeing a friend’s new apartment said, “so,…. where’s the furniture?”

That’s all the follow up I can think of at the moment. I need to start writing them down.


  1. one housing agent I talked to says she ups the amount a little if there are kids involved. More baths, warmer, more time spent at home

  2. I think this is insane. What if you spring a water leak (for example the toilet flap gets old). This can make your bill jump to $1000. Imagine if the meter were only read once a year! In Portland most of the electric meters are read by radio by a truck driving through the neighborhood. Portland water is read once a quarter. They tried electronic water meters, but being in the ground, they’re not reliable.

  3. As an aside. Modern windmills are a thing of beauty. Compared to the old ones, I’d call them majestic. My mom and I were once driving through the German countryside and saw one right off the side of the road. So we stopped the car and walked up to it. The base had a larger footprint than most people’s Tuffsheds. Closer to the size of a normal kitchen. It was very quiet. When one of the rotors came by I just hear a soft “wump”. Maybe one a second, one would come by. In parts of the US, people resist the installation of more of these. I don’t understand why.

  4. I’ve been meaning to have it auto sleep when not in use. Since I run Plex on it, that’s a little complicated, though we really only watch TV during certain hours. I also want it to be available for auto-photo upload from my phone. I need to get on it.

  5. We have LED everywhere.

Most Android Apps can easily be decompiled to remove the ads

Trying to reach even non-computer people

This is a long post. Most of it is instructions for modifying Android apps for your own purposes. In the first portion, in which I talk about motivations, I will attempt to make it interesting even for non-computer people:

  • I was surprised how easily and well java sources can be recovered from any Android app
  • It’s easy to customize apps. You can easily change the pictures and the sound clips.
  • Banner ads in kids apps are surprisingly easy to remove
  • Some commentary on kids apps in general

The second part is a how to:

Android apps for little kids

As a parent, I’ve looked around for some good games for my two kids, aged 3 and 6. 1 There are some good ones out there. For example, all of the apps produced by Lego are excellent2. We look for educational ones. Endless Alphabet is a good one.3 Wonster Words.4 Beck and Bo is excellent…. There are some companies out there making great games for kids.

A step down from these, but still pretty good are games like FireFightersFireRescue. It’s a fun app and it appeals to little boys who are enamored with fire fighter related stuff. 5 The downside is that it’s got a big banner along to bottom for ads, and for adult users, that’s not a problem. This game involves moving a firetruck ladder to rescue people stuck in the building. It’s easy for little fingers to get dangerously close to the ads area. Even my 6 year old daughter doesn’t have perfect tablet swiping fingers6. So my son often clicks ads; ads that he has no chance of being interested in. Looking at the screenshot below, I don’t think he’s looking for a free ebook from resources.office.com.

Banner ads don’t really make sense for kids games

App developers need to make a living. As device users, we’ve voted that we don’t want to pay for anything. So instead of the apps being the product, we users have become the product; developers sell their users to advertisers. Ads is the main game in town. 7

Still, it doesn’t seem that ads make sense for little kids. Surely Google has thought about this and I imagine they’re in a bind. They want ad revenue, but they also don’t want the perception that they’re not friendly to kids. They have to know that some of their ads are served to an entirely inappropriate audience.

Anyway, my son enjoys playing the game. As parents, my wife and I don’t enjoy helping him get back to it after he clicks the ad. So I went to the playstore to find a paid version of the firefighter game without ads.

They don’t offer an ad free one. Bummer.

Looking for adblocking led to the rabbithole

Kids games like the firefighter game are pretty common, otherwise, I’d have just moved onto the next game. As a computer guy, I figured I’d look for a way to make these games more playable. As happens so often, I was led down a rabbithole.

I started by trying an adblocker. That didn’t work. The ads were just replaced with offers about their other apps, however, in the process, I stumbled on the youtube video below. They make it look so easy. More important, it made me curious about how apps are put together.8

In the end, I was successfully able to remove ads from the firefighter app. How I did this, is next in this post.

Finally the instructions

I am writing these instructions based on running in a fresh virtualbox install of ubuntu 16.04. The only prior thing I’ve installed is emacs24. I mention it because maybe other stuff gets installed with it. I’ve split this section into four parts:

  • installation of the needed tools
  • setting up your android device
  • using the tools to unpackage and decompile
  • selective recompile and repackage

Installing the tools

The instructions later in this post will want an env var APK_TOOLS that points to an area of installed tools.

In these install instructions, I’m attempting to enable you to simply cut/paste the commands. Things will be installed in groups. The main exception to this is Oracle’s java and Google sdk manager. The reason for this, is that the installers insist on you typing y to agree to their terms and conditions.

Java 1.8

Oracle doesn’t make it convenient to install java on ubuntu. So we get it from an alternate place. I’m usually wary of such alternates, but I found a couple sites that directed me here. In particular, this askubuntu answer:
http://askubuntu.com/questions/464755/how-to-install-openjdk-8-on-14-04-lts

The installer will ask you to accept some license conditions.

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get -y install oracle-java8-installer

android buildtools

At the end of the process to put an app back on your device, you will need to sign it. If you have android studion ide installed, the signer comes with the buildtools package which will probably end up in your home dir $HOME/Android/Sdk/build-tools/25.0.2/apksigner. This is the way to go if you think you might want to do android development.

Here I’m going to describe a less heavy handed way. First we need the sdkmanager https://developer.android.com/studio/index.html#downloads. We’ll then use the sdkmanager to install buildtools.

cd $APK_TOOLS
mkdir android_tools
cd android_tools
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip tools_r25.2.3-linux.zip

# tools/bin/sdkmanager --list
# --> build-tools;25.0.2 | 25.0.2 | Android SDK Build-Tools 25.0.2

mkdir sdks
tools/bin/sdkmanager --sdk_root=sdks 'build-tools;25.0.2'

32 bit support, apktools, dex2jar, luyten, jdgui, adb, zipalign

adb, in this context, is used to copy apk files from/to your device. apk files are what you’re downloading from the playstore when installing apps.

Apktool is used to package/unpackage apk files. It can be installed using the normal Ubuntu package system, but that version gives me errors. Instead, these instructions download apktool directly from the website.

Compiled Java code is normally stored in jar files. In android apk files, the are in dex files. dex2java is used to convert between the two.

Luyten and JDGui are two java decompilers. They seem pretty good. My main gripe with them is that they both insist on you using the GUI.

zipalign is part of the apk signing process. signing is important for security reasons. We don’t want people accidentally installing fake Chase or Bank of America apps. The android OS requires signing before it will allow you to install an app.

From a small comment in the apktool instal instructions: https://ibotpeaches.github.io/Apktool/install

Make sure you have the 32bit libraries (ia32-libs) downloaded and installed by your linux package manager, if you are on a 64bit unix system.

(This helps provide support for the 32bit native binary aapt, which is required by apktool)

To fulfill this requirement, we’ll follow these instructions: https://blog.teststation.org/ubuntu/2016/05/12/installing-32-bit-software-on-ubuntu-16.04/

Because sudo asks for your password, I find it useful to do “sudo ls” right before cut/pasting these.

# 32 bit stuff
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get -y install libc6:i386 libstdc++6:i386

sudo apt-get -y install zlib1g:i386

# adb git zipalign. (I think I don't really need git anymore)
sudo apt -y install adb git zipalign

# Apktool
# APK_TOOLS is a directory where you want these to be installed.
cd $APK_TOOLS
mkdir Apktool
cd Apktool
wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.2.2.jar
ln -s apktool_2.2.2.jar apktool.jar
wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
chmod ugo+x apktool

# This package works in windows and linux. Since I use linux, I want all of the sh files. Let's make them executable.
cd $APK_TOOLS
mkdir dex2jar
cd dex2jar
wget https://downloads.sourceforge.net/project/dex2jar/dex2jar-2.0.zip
unzip dex2jar-2.0.zip
chmod ugo+x dex2jar-2.0/*.sh

# luyten
cd $APK_TOOLS
mkdir luyten
cd luyten 
wget https://github.com/deathmarine/Luyten/releases/download/v0.5.0/luyten-0.5.0.jar

# jdgui
cd $APK_TOOLS
mkdir jdgui
cd jdgui
wget https://github.com/java-decompiler/jd-gui/releases/download/v1.4.0/jd-gui-1.4.0.jar

generating a keystore for apk signing

Before you can install a new apk file on an android device, it has to be signed. To sign, you need a signature. Because keystore generation is a one time thing, I’m including it here in the instructions. Let’s generate that now with the keytool command. My system has keytool without doing anything extra. I imagine adb added it for me.

It will ask for a password followed 6 questions. I just use the default of unknown. I’m not trying to put these apps on the playstore. I just want different versions on my device. Finally, it’ll ask for confirmation that everything’s correct:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes

mkdir ${APK_TOOLS}/keystore
keytool -genkey -v -keystore ${APK_TOOLS}/keystore/my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias

building apktool yourself (optional)

In case you want to build apktool yourself from latest code. https://ibotpeaches.github.io/Apktool/install/

cd $APK_TOOLS
git clone https://github.com/iBotPeaches/Apktool.git 
./gradlew build fatJar

# get wrapper script
wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
chmod ugo+x apktool
ln -s ./brut.apktool/apktool-cli/build/libs/apktool-cli.jar apktool.jar

 

Developer mode and unknown apk sources

On your phone you’ll need to activate developer mode.

  • Settings->about device
  • Tap on ‘build number’ 7 times and a new menu will appear on the top
    menu.
  • Tell your phone it’s ok for a computer to try to talk to it via adb:
    Settings->developer options->Android debugging
  • Tell your phone it’s ok to install apks from unknown sources. You’ll need this later, after you’ve modified the game. You’ll be the unknown source
    Security -> unknown sources to on

At this point, connect your device to your computer with its usb cable. Let’s check that you can connect to it. When you run the next command, your phone will ask if it’s ok for your specific computer to connect. You’ll want to say yes and that it should remember.

adb shell

Retreive, unpack and decompile

Again, I’m attempting to give bigger blocks of cut/pasteable commands. Here’s an overview of what we need to do:

  • use adb to find and retrieve the original app package (this needs to be it’s own step)
  • use apktool to unpackage it.
  • use dex2jar to… convert the dex containing the compiled into a jar file (still compiled)
  • use luyten or jdgui to get java sources.9

Some interesting things to look at

After you unpackage an apk with apktool, you’ll have a directory with something like an android project in it. Take a look around. In particular, you’ll find an assets directory. The assets directory contains all of the pictures and sound files of the game. Feel free to customize the app. Change character pictures. Put in some gangsta rap. Make sure the file names stay the same. When we rebuild from that area, any assets changes will come along for the ride.

In the instructions below, I use a environment variable to hold a base name for the stuff we’re processing. In this example it’s


export APK_NAME=firefightersFireRescue

Getting the package location

This step is not really automatable unless you’ll trying to get everything.10

adb shell pm list packages

Will give you a bunch of lines, including one like this:

package:com.bestopgames.firefightersFireRescue

Now you want to find out where the apk for that app is on your device

adb shell pm path com.bestopgames.firefightersFireRescue

gives me:

package:/data/app/com.bestopgames.firefightersFireRescue-1/base.apk

Now that we know where it is, copy from the device to your local unix disk

cd <some path where you'll be doing this experiment>
export APK_NAME=firefightersFireRescue
mkdir apk
cd apk
adb pull /data/app/com.bestopgames.firefightersFireRescue-1/base.apk ${APK_NAME}.apk
cd ..

The other steps for unpackage to decompile

mkdir unpack
${APK_TOOLS}/Apktool/apktool d -s apk/${APK_NAME}.apk -o unpack/${APK_NAME}

${APK_TOOLS}/dex2jar/dex2jar-2.0/d2j-dex2jar.sh unpack/$APK_NAME/classes.dex -o dex2jar/${APK_NAME}.jar

java -jar ${APK_TOOLS}/luyten/luyten-0.5.0.jar dex2jar/firefightersFireRescue.jar 
 

Additional notes:

  • One note about the -s flag to apktool. This flag is also called the –no-src flag if you don’t give this flag, you won’t get the classes.dex file which you’ll need in the next step.
  • luyten doesn’t have a command line interface beyond telling it what jar to read. To save the javas you’ll need to use the gui.

Modify java, repackage, sign and upload.

In this section, I explain the steps I follow to get new java into an android app. Similar to the install section, I’ll have a cut/pasteable snippet at the end of this one.

Using both the luyten and jdgui decompilation tools I did not get a set of javas that just compiled. Trying to do this did not work:


javac `find . -name "*.java"

In both cases, I get syntax errors, though not the same errors. Perhaps files from the two could be combined to get a clean full compile. For the purposes of what I’m showing here, you don’t need a clean compile. More on that later.

Turning off ads in the code

Here’s where things get really interesting (I think). Most games are pretty genericly written. They use a limited number of game engines. They use a limited number of in app advertising platforms. Poking around the firefighter game, I find two libraries in particular.

The first of these is cocos2dx: http://www.cocos2d-x.org/ Inside of it, I found the AISActivity class, which has the method “hideAd()”. That told me there’s a way to turn off ads with a switch. hmm. When I look some more, I find that the class ais.constants:Config.class has this:

package com.ais.constants;
  public class Config {
    public static void init() {
      org.cocos2dx.lib.AISCommon.enableAdmob = true; 
      org.cocos2dx.lib.AISCommon.enableInterstitial = true; 
      org.cocos2dx.lib.AISCommon.enableInApp = false; 
      org.cocos2dx.lib.AISCommon.enableLocalNotification = false; 
    } 
  }

Can it really be this easy? Now the trick is changing this file and recompiling. But how?

Again, if I do this:

javac `find . -name "*.java"`

I get a ton of errors; recompiling everything would be a pain. Can I recompile just this one class?

javac com/ais/constants/Config.java

Doing that, yields a bunch of android related errors. missing symbols. I tried a couple things. I downloaded the cocos2dx library, but there the problem is which version? I need to compile against something. Then I realized, I have a jar file!

So, here’s what you do. Change the two falses to trues and save it, along with any other files you want to change. You only need to compile modified files. For the commands below, place them under a “newjava” directory. It’s important to retain the intermediate paths to the files. In this example, that’s the com/ais/constants part.11

mkdir -p newjava/com/ais/con<code>tants/
cp <modified Config.java> newjava/com/ais/constants/
cd newjava
javac -cp ../dex2jar/${APK_NAME}.jar `find . -name "*java"`
jar uvf ../dex2jar/${APK_NAME}.jar `find . -name "*class"`

You can use the following line to verify that you didn’t duplicate the file

jar tf ../dex2jar/firefighter.jar | grep '/Config'

Here’s an important note. Unlike other compilers that I’ve worked with, java really pays attention to your directory structure. When running the javac and jar commands, it’s important to run the command from the directory that contains the com directory.

repackaging complete

Ok, now you have a new java file and I’ve showed how it can be easy to recompile it. There are several steps to get to something you can install.

apksigner has a nice feature that you can put your signing password into an environment varible instead of embedding into a script. In the commands below, I’m using SIGNPASS as the env var.

  • compile java to class files
  • add class files to jar
  • convert jar to dex
  • rebuild apk file
  • zipalign the apk file
  • sign the apk file
  • copy it to your device

export APK_NAME=firefightersFireRescue
export APK_TOOLS=../../tools/

# this assumes you've already dont the commented keytool step below.
# export SIGNPASS=YOUR_SIGNING_PASSWORD

cd newjava
javac -cp ../dex2jar/${APK_NAME}.jar `find . -name "*java"`
jar uvf ../dex2jar/${APK_NAME}.jar `find . -name "*java"`
cd ..

${APK_TOOLS}/dex2jar/dex2jar-2.0/d2j-jar2dex.sh -f dex2jar/${APK_NAME}.jar -o unpack/${APK_NAME}/classes.dex

mkdir rebuilt
${APK_TOOLS}/Apktool/apktool build unpack/${APK_NAME} -o rebuilt/${APK_NAME}_rebuilt.apk

zipalign -v -p 4 rebuilt/${APK_NAME}_rebuilt.apk rebuilt/${APK_NAME}_rebuilt_aligned.apk

${APK_TOOLS}/android_tools/sdks/build-tools/25.0.2/apksigner sign --ks-pass env:SIGNPASS --key-pass env:SIGNPASS --ks ${APK_TOOLS}/keystore/my-release-key.jks --out rebuilt/${APK_NAME}_rebuilt_signed.apk rebuilt/${APK_NAME}_rebuilt_aligned.apk


# now push to your device
adb push rebuilt/${APK_NAME}_rebuilt_signed.apk /storage/self/primary/Download
 

Extra stuff that may be helpful

If you get an error like this one,

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec: [/tmp/brut_util_Jar_5394410189585563704.tmp, p, --forced-package-id, 127, --min-sdk-ver

it’s because of a small comment in the apktool install instructions:
https://ibotpeaches.github.io/Apktool/install/

Make sure you have the 32bit libraries (ia32-libs) downloaded and installed by your linux package manager, if you are on a 64bit unix system.
(This helps provide support for the 32bit native binary aapt, which is required by apktool)

To fulfill this requirement, make sure you’ve done the 32 bit stuff in the install section above.

To solve errors like this one:

 W: /tmp/brut_util_Jar_3065852416515877270.tmp: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
 Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException:

You need this

sudo apt-get install zlib1g:i386

Install it on your device

Now you just need to install it. Using the adb push command from your xterm, it’ll be in your downloads fold. On your phone, navigate to it in the file manager and click it. If you get a popup about unknown apks, you want to change the setting in settings->developer options->allow unknow sources. Make sure you copy over the signed apk otherwise you’ll get “an unknown error occurred”


adb push firefighter_noads_signed.apk /storage/self/primary/Download

Please comment

This post took a lot of time to put together. It took more time than I really should have spent on it. The only way for me to justify it, is to know that others have benefited. If people respond positively, I’ll do other posts when I go down future rabbit holes.


  1. Let’s put aside the question of whether 3 year olds should be spending time on a tablet.

  2. and free! I would be happy to pay for them

  3. we paid to upgrade from free

  4. we paid to upgrade to “pro” version

  5. The same people also make a distasteful game (I think) Plastic Surgery Simulator Kids

  6. swiper no swiping.

  7. I’ll note that here in Germany, magazines and newspapers are not free to read online. You have to pay to get any of the content. NYTimes, Newsweek, The New Yorker give their full writings away. With the German equivalents, you get little more than short blurbs.

  8. I didn’t need to when developing my vocabulary app

  9. note that this is not truly the original, original java code. The variable names will be wrong. No comments. Still, the structure will be usable. This is not like getting C code from assembly. You’ll have if statements, for loops and all that.

  10. well, you could try to script it a little, but it’s not really worth the effort.

  11. Again, I have a bigger snippet later to do this and the other rebuild steps further down.

Losing our culture by losing our dialects

In a recent post, I talked about becoming fluent in another language. My father-in-law made a comment about it on Facebook observing that the presence of so many dialects made learning or at least understanding German difficult for him1. This triggered some thoughts that at first I thought would be a followup note, but I think there’s enough floating around in my head about it to justify a separate post.

Dialects and accents. Most seem to hate them. I love em. Many see them as a sign of ignorance but I view it as richness of life. Since most of my friends are English speaking, I’ll start with my love of English variations.

German has dialects that native German speakers can’t understand. In English, it’s a bit simpler. It’s mostly accents. I love accents.

English accents and dialects

I love the way Marissa Tomei talks in My Cousin Vinny. Watching this scene makes me swoon.

More subtle is Frances McDormand’s performance in the movie Fargo. I loved her character.

Rosie Perez in Do The Right Thing (not safe for work)

It’s not just women. For example Bob and Dough McKenzie

Of course, Eddie Murphy was great at making light of accents and vernacular

I could go on. I love it.

A Cultural Digression

Speaking of Ebonics, I have a story of my own. Many of my friends would agree that I’m the whitest black guy they know. 2 If nothing else, I “talk like a white guy”. Mostly, I just try to be myself, and I guess this is part of the reason that I don’t talk like the blacks on TV.

Alright, I’m gonna digress into a side trail that isn’t really related to linguistics. Hopefully, I can tie it back into the topic. Beware that I’ll be generalizing heavily. Stereotypes exist for a reason but never forget that people are individual. My comments are based on the experiences of just one person, my own.

Blacks, and black men in particular, have a well known stereotypical personality. The black community, like all communities, expects a fair amount of conformation. Below are some ways I relate to some of the common perceptions and expectations.

  • Into sports and basketball in particular. I don’t watch sports of any kind except the Olympics then they come around 3. I’ve never enjoyed playing 4 I’ve spent a lifetime of people taking one look at me any assuming I play. Ask me to play ice hockey and I’ll consider it though. List of blacks in the NHL
  • Lovers. I was very shy with girls as a teenager.  Later on, I found that Caucasian women, which I’ve generally preferred, perhaps because of my early years in Germany, either preferred white guys or preferred the more stereotypical black men. A girlfriend once related a comment made by one of her friends, “WHAT!? You’ve been dating a black guy all this time and didn’t tell me!?”. My personality doesn’t match the stereotype. Women seeking such a man should look elsewhere.
  • Church. The stereotypes you’ve seen about black churches ALL match the image or aspire to. The jokes comedians like Arsenio Hall make about black pastors are based on universal truth. I have never been to a black church that didn’t looking like something on TV.
    Although my dad and I didn’t attend church, the rest of my family is fairly religious. Sunday activities went from 8:30 to 2:30. Although I did attend church regularly for 8 months while living in Israel, I’ve always resisted organized religion. Church could and should be so strengthening, but most of the time, I’ve just seen it be oppressive, un-supportive, and hypocritical. So the culture of religion is something I’ve resisted.
  • The black church has its cultural influences. Folks go to church dressed to the nines. To take it further, if you don’t dress nice, that’s taken as an indicator that you’re not successful. I’ve always felt more comfortable in shorts and a tshirt.
  • Success as an image thing. I once went to visit a friend shortly after graduating college and starting at Intel. I flew down to LA and rented a car. Her mom said something to the effect of, “look at you, rentin cars and shit…” 5 I was a bit surprised by this comment. Just because you go into debt buying cars you can’t afford or do something as simple as renting a car does not success make.
  • “Acting white” was mocked though I usually took it as being teased for being smart and enjoying school. 6

While at Intel, for several years, I attended a leadership conference that Intel hosted to help improve representation within the company’s higher ranks. African American men and women from across the company traveled to Santa Clara for 3 or 4 days of workshops and networking. All of Intel’s grade 8+ were invited. Approximately 120 people. 7.

The first two or three of those conferences left me energized but left out. I continually felt left out for not being black enough. That changed in the final two years when, finally, there was a critical mass of attendees that were at least as white acting as me. I finally felt like I fitted in.

Language as a source of comfort

Coming back to dialects. While I’ve never spoken black, it’s always been something that’s comforting to hear, especially now that I’m not in it. When I went to the conferences, as left out as I felt, it still felt like I was among my people. When I go to church, even though there’s so much I find distasteful, it’s familiar/soothing. 8.

I love the variety of ways in which people express themselves. America still needs to make some progress when it comes to race/ethnicity/nationality. The recent election is a good demonstration of that. American and the world in general are still a bit oppressive of smaller groups. Communities should be coming together to support its members but too often they add to the oppression.

German Dialects

So, German dialects… American’s don’t know what a dialect is. Just accents really. Even this example of Brad Pitt is still mostly accent:

In Germany, a lot of the vocabulary can be different. People that grew up 100 miles apart can speak variations of German that are unintelligible to each other.

The local Frankfurt form of speak is called Hessisch.9 Here is a random clip that you probably won’t understand. In it, a woman is tested by here mother on her ability to understand Hessische phrases. She was probably about 50/50

If you understand a little bit of German, perhaps, perhaps you might be able to follow this next one. It’s of two comedians who made their name first by being really funny, but second, it’s mostly using the local dialect/accent. In it a lady 10 goes into a music store to buy a drum machine to accompany her husband’s accordion playing. The thing she buys cost 850 Deutsch Marks or about $400. She’s finally convinced to buy when they find the beat for Lambada.

Here’s another one that English speakers may appreciate

Dying Language

Speech like this is dying in Germany. Parents make an effort to speak only Hoch Deutsch with their kids. I asked my friend’s mom about this and doesn’t she think Germany is losing something. Here’s how she described it (paraphrasing from memory and translated):

In the early years of school, teachers ask students to write using their normal voice. It’s only later that they are taught grammar and standard German. In those early years, kids that speak dialect at home are at a disadvantage and some critical decisions are made in those times. Kids who are not yet able to speak standard German are labelled by their teachers as not suitable for Gymnasium11

Think of it like this. A smart kid grows up in “da hood”, where everyone speaks the local accent/dialect. That kid then is bussed to a school in a different neighborhood. To one of the “good” schools. He or she are accepted so the school can talk about diversity but many of the teachers then discourage them by assuming they’re stupid.

What would this post be without yet another youtube clip:

I went on to ask her what happens from here. Although I hear lots of locals speaking Hessisch, it’s only older folks; people in my parents’ generation. What happens when that generation passes?

Then Hessisch goes away

That makes me really sad.

I hope you enjoyed this post as much as I enjoyed writing it.

 

Follow up

Here’s a piece of follow up on this very post. At Intel, many of my coworkers were Indian. Anyone who has met even one Indian knows that they have a distinctive accent.

For a long time, I thought of their accent in the same way I thought of German accents speaking English. Folks who have learned English but just aren’t able to say the sounds.

Well, in the case of Indians, this is incorrect thinking. People in Britain sound different when speaking English but few would say they are speaking incorrectly12. That’s just the local accent. Similarly, Indians in the US are speaking correct English. There are over a billion Indians who speak with an Indian accent and in India, it’s correct English. We don’t expect Brits to change their speech when they travel to the US, do we?

Speaking of Brits, I love Lily Allen’s voice. In this song pay close attention to the lyrics. 13


  1. After his time in the Navy, he ended up in Germany working for the Dept. of Defense

  2. even if I’m the only black guy they know. This is something that often surprises me. How is it possible that so many people know no black people?

  3. mostly because there’s such a variety that we don’t normally have

  4. a notable exception is D league, the lowest league, intramural sports in college. That was really fun

  5. I’ll note that this woman was very intelligent. One of my regrets in life is that I didn’t take the time to travel to LA for her funeral.

  6. to be fair, all cultures (except maybe Asian and Jewish ones) don’t encourage intelligence. Asian and Jewish cultures are oppressive in their own ways. What a wonderful world we live in. 😉

  7. that’s a small number given that Intel employed probably 50k people in the US. I once sat next to a higher manager in my dept on the Intel shuttle. He was trying to get a raise for everyone via a “market adjustment” and was working on a presentation for that. One of the foils I saw indicated that about a third of the dept were 8+ at the time. I spent about half of my career as a 9. I could tell that some of the managers around me didn’t think I deserved that. Conversely, I want to believe that many/most of my peers thought I did and perhaps should have been a 10/PE. Personally, I believe that I was worth every penny Intel paid me. It may not have been true in one or two of those years, but in those cases, my main deficiency was that I should have transferred somewhere else with less dysfunctional leadership.

  8. My church time in Israel was at a church that, while not black, could be described as charismatic. It’s the kind with lively, non-organ, music. Hallelujahs, many hands in the air… The stuff I grew up with. I tried the other Christian church in Haifa with my friend Teresa once and we both noted that it felt dead.

  9. We are in the state of Hessen. USA has CA, OR, WA, NY… Germany has Hessen, Bayern (Bavaria) and others.

  10. actually a guy

  11. basically college prep

  12. pompous, perhaps

  13. I’m liking that outfit.

My new Kicad blog

https://kicad.mmccoo.com

Over the years, I’ve come to love Free and Open Source Software (FOSS). I’ve been bitten so many times when a company loses interest in a product. If it’s closed source, I might as well throw it away.1

During my years at Intel, I appreciated the openness of the codebase. I took it for granted that if I couldn’t get a program to work, I had the option of looking at the source code. I once considered trying to put some of my perl language utilities on CPAN. Talking to the guy who could help me was really depressing. The short summary: don’t bother trying. 2 It was weird given how incredibly open things are inside the company.

When I first headed to MIT, it was my intention to do electrical engineering. Once I starting taking classes, I found I had much more aptitude for programming. My programs, even the complex ones, just worked. My electrical circuits… constant stuggle. Still, it’s something I’ve always been drawn to.

Recently, I’ve wanted to goof around with LED grid arrays. Something like this:

The thing is that there’s a lot of tedious circuit wiring involved (beyond wiring the LEDs themselves). Why not design a circuit board? Getting boards made is cheap and I’ve wanted to try surface mount soldering.

I’d used CadSoft’s Eagle editor 3 before but wanted to use FOSS. Kicad is becoming a leading PCB suite among hobbyists. CERN uses it

But, in spite of its popularity, it’s missing a lot of features.

Since I like programming, I have experience in EDA, and there are some features I want, I dove right in. The scripting interface was the first thing I looked for and it’s not at all documented, even by internal Intel standards.

So my blog is a set of tutorials on how to use the scripting language in Kicad’s layout editor.

If you have no interest in PCB, the blog won’t be interesting, except, perhaps this post on why scripting language support is important.


  1. An example is the wireless music bridge once sold by Linksys. I had two of them to stream music from my computer to my stereo. This was before streaming was something anyone did. The drivers always sucked but I tolerated it since it was the only option available. Somewhere along the line I needed to reinstall my computer. When I went to the Linksys website… no driver. Even when using the web chat. no driver. I wasn’t asking for an updated driver. I wanted the original. Sorry, we don’t have the driver.

  2. the main issue is that Intel is worried about releasing someone else’s code. Intel is very sensitive to the perception that they’re taking advantage of the little guy. Intel insists on paying someone for free, open source, GPL stuff like emacs, gcc, csh, grep…

  3. bought by Autodesk

How big is your circle of real friends

After living in Germany for nine months, we visited the US in November for three weeks, passing through three cities. (Los Angeles, Walnut Creek, and Portland) Going to visit friends and family got me thinking about my life here 1. The vast majority of my time it’s just the four of us. Robie has four nights of martial arts split between two schools as well as her German integration class 2 each morning during the week. The kids go to kindergarten. Me,… I spend most of those times alone or with the kids.

Beyond our daily routine, our circle of friends and family is small. There’s my friend Mishi 3; we see her and her family about once or twice a month, my niece Janina, and my older sister Daniela. The latter two, we’ve only seen a handful of times, since they live in other cities.

It got me thinking, how much of a life is it to have so few people? Returning to the USA 4 prompted me to compare and contrast.

If you moved away from wherever you’ve been living and returned for a visit, how many non-family people would you make a point of visiting? 5 For me the numbers are as follows:

  • Germany – 1 – Mishi, plus I really do enjoy visiting my sister and niece
  • Los Angeles – 2.5 – Two friends from high school, Monique and Isabel. The .5 is a friend from MIT but I’m not as consistent about seeing him.
  • Bay Area – .5 An old friend from Intel, but I’m not as consistent since it’s a bit of a drive between him and my brother’s house.
  • Portland – 5.5. The .5 is due to a bit of a drive. 6

Before coming to Germany, I’d been in Portland about 15 years. 7 That translates into one new friend about two or three years. Since we intend on staying here 2-3 years, if I find one new person, we’ll be doing pretty good.

Over the last months, I’ve asked a bunch of people what there number is. I was a little surprised that it’s pretty close to my Portland number, perhaps one or two more. The biggest number I got at 15. The smallest I got was 1. 8

What’s your number?

 

Follow up

In a previous post, I mentioned that I’d been kidnapped as a kid by my dad. When visiting the US in November, I asked him about that. I wondered if he would agree with the description. He does agree but he also claimed that the way he did it was legal. He had consulted an attorney who advised him to register me with social services in the US, thereby establishing custody in the US. This sounded suspect to me but legal systems can be twisted. Still, legal or not, it was kidnapping; even he agrees with that. 9

 


  1. I consciously think of Germany as “home”. Portland is just another city I’ve lived in and will likely live again.

  2. focused mostly on learning German

  3. it’s actually spelled Michi (short for Michaela) but when writing her letters (no email!) after my first summer in Germany at age 13 (we’ve actually known each other since I was 5) my German wasn’t that good yet and Mishi is what I heard and so it’s what I wrote. It was only several summers later that I learned I’d been spelling it wrong.

  4. again, I don’t say returning home, because while we’re here, Germany is home

  5. I say non-family because family people are generally folks you’re stuck with. You’ll likely visit them either way

  6. Should probably make it 7.5. One guy is not on the list because he hasn’t shown much interest in friendship though we’re an otherwise obvious fit. A second guy I should add, because he has shown interest and I had overlooked him

  7. April 2001-Feb 2016

  8. The 1 answer came from someone with a very strong family circle. Brother, daughter, mother

  9. I still need to do a post on my broader thoughts on the topic

How to help a language learner

Part of the point of moving to Germany has been learning/improving German. Learning a new language is not easy and each of the four of us have quite different experiences. Since I have the strongest German of the four of us, it’s got me thinking about the ways in which the others help me and how others could help me.

First a short description of where each of us are.

Robie is moving the fastest, largely due to discipline and motivation. Before moving, she spent a lot of time on Duolingo. Once we got here, it wasn’t until September than she began a formal class (3.5 hours M-F). In between, she used a couple books. She is very quickly becoming able to interact with people. She can read some German kids books to our kids and mostly know what’s going on.

Malcolm doesn’t really realize that German and English are two different languages. He doesn’t say yes anymore; only Ja. For him, it seems that there are a bunch of words around him the he doesn’t know. Some of them are English and others are German.

Lydia is aware that the languages are different and it puts her at a bit of a disadvantage. When hearing someone speak German to her, she doesn’t really listen. She is happy at her kindergarten and has others she plays with including two girls, sisters, that come to our house for play dates. Still, not a lot of communication. I worry for her the most, especially since she’ll be in first grade next year. I need to do more to help her.

Me… I speak German pretty well, but to get the real me, I have to speak English 1. Since I don’t work I’m not forced into regular speech beyond the chitchat when dropping off the kids. I need to put in more effort.

All of this has given me an increased appreciation of immigrants. American’s like to criticize, but they just have no clue. I had no/less clue before I came here.

I think I’m generally pretty good about helping people improve their foreign language skills, usually co-workers with English and now helping my family with German. Here are my tips.

First, you have to realize that correcting speech doesn’t have to be disruptive to a conversation if you do it regularly. Most of the time, it doesn’t need to take more than a couple seconds. Sometimes, elaboration is needed.

Second, you have to realize than being corrected is really the only way for the person to improve. This is especially true if not taking classes. Some people are content with where they are. They can be understood and don’t care to go beyond that. They’ll usually let you know. Otherwise, I think most people welcome the help.

Now, my tips.

If someone uses the wrong word or an incorrectly conjugated word. Just say the correct one and that’s it. Much of the time, they’ll understand. They’ll often know the rules, and just forgot. So if someone says, “they teached me how to do that.” All you have to say is “taught”. This is the most common way I help Robie.

Practice reflective listening 2. I do this a lot with the kids. So if one of them tells me “they teached me that.” I’ll respond with “really, they taught you that?” 3

That’s mostly it. Lots and lots of small corrections. Even if not that well delivered, clumsy corrections are better than no corrections. Do it a lot. Occasionally, more explanation will be needed, but even then, remember you’re a resource the learner probably doesn’t have. A confusing explanation is better than no explanation.

I once had conversation with an admissions officer for some university in Oregon. We were talking about SAT scores. I was observing that my SAT score was about 200 points (out of 1600 at the time) below the average at MIT where I went to college. The man commented that they don’t really care about SAT scores, especially the verbal portion. How well one does on the SAT verbal is more a matter of how your parents communicate and not necessarily a reflection of the student. I think our kids speak English very well, thank you very much. 🙂

In contrast, years ago, I once went to a dinner party in Sausalito. I was with my girl-friend, a Wellesley student 4 at a friend of hers’ house (also a Wellesley student). I had already graduated from MIT and was working at Intel, a leading tech company. While listening to the dinner conversation, there were a bunch of times I had to ask my girlfriend, “what’s that word mean?”. The participants weren’t trying to be intellectual or anything, it’s just how they talked. I assume their SAT verbals were higher than mine.

I also learned that “dinner party” is just another way of saying “we’re having some people over for dinner”.

 


  1. I’m happy to have conversations in both, I speak English and my counterpart speaks German, but most people aren’t comfortable with that

  2. when writing this, I initially used the term active listening, but wikipedia (where everything is true) corrected me.

  3. I wish I could find a youtube example, but I think many older black women are particularly good at this. I have many memories of my grandmother basically repeating much of what someone is saying, only prefixed with “you mean to tell me?!…” You’re probably wondering, “what is Miles talking about”, and that’s fine. It makes me smile thinking about it though. So there.

  4. Hillary Clinton did here undergrad there

Interesting trivia about getting an apartment in Germany

I’ve spent most of my life living in the USA. I lived in Frankfurt, Germany from birth until age 7 and I spent 2.5 years in Israel between April 1998 and end of 2000. Otherwise, it’s all US, ranging from living with parents, college fraternity life, roommate in Silicon Valley, and finally owning. I own some property that I rent out and like anyone else who has a pickup truck, I’ve helped lots of people move.

None of that hinted at the surprises I had here.

No kitchen

About half of the apartments on the market have no kitchen. Yes, they do have a room where the kitchen will go, but… Here are two random kitchen pictures I’ve lifted off of https://www.immobilienscout24.de which is the main way people find a place.

nokitchen2 nokitchen

It seems there are some things missing. What could it be? hmm. They are very nice. Good to have a window. The tile is a little outdated perhaps, but it seems that there’s something else not quite right about these kitchens. It would be nice if they had a pantry, but still, there’s something else but I can’t quite put my finger on it. A built in microwave would be convenient.

Oh wait!!! The cabinets are missing! And there’s no stove! Where’s the fridge?!

That’s right, you get a couple outlets, some water connections and that’s it. It’s on you as the renter to put these in yourself.

Household appliances

In the US a kitchen remodel starts about probably $10k and can quickly go up from there. Stuff is way cheaper here.

Dryers are interesting. In the US, I’ve never seen anything other than a venting dryer. It heats air, lofts it through the clothes and vents outside. Here, most apartments are not able to accommodate this. Your dryer has to capture the moisture it removes and there are two main ways to do this:

Kinda like when an air conditioner drips water. According to wikipedia 1 “Heat pump dryers can therefore use up to 50% less energy required by either condensation or traditional dryers.”

Energy Efficiency matters

I believe that in my town here electricity costs about 0.25 euros per kilowatt/hour which is about double what it costs in Portland. Clothes dryers here in the EU have energy ratings ranging from C to A+++.

  • A+++ uses 172kWh/160 cycles/year. $43/year assuming the 160 cycles
  • C (only venting dryers) uses 480kWh/160 cycles/year. $120/year.

If you have kids, you can easily go well beyond 160/year. I’d guess Robie does laundry 5 days out of the week. Even for the two years that we plan on staying here, it was worth it to spring for a better dryer. We paid 411 euros for a heatpump model.

Lighting fixtures

When we moved in, I was surprised to find out that you have to provide your own ceiling lights. The previous tenants had left the light in the bathroom as well as the one in the kitchen. In the end, I had to buy and put in 12 ceiling/wall2 lights. The previous people were also nice enough to leave a medicine cabinet in one of the two bathrooms. Note that I’m not talking about just the light bulbs but the entire fixture. There are wires coming out of the ceiling and that’s it. If you’re not comfortable with 220v electricity, you need to ask a friend or call an electrician.

Voltage matters

If you get electrocuted, it’s the current/amps that matters. Otherwise, voltage is more important. In most of Europe, household electricity is 220v instead of the 110v that Americans are used to. This is important because it enables higher power stuff.

In the US, most outlets are rated for 15amps. The circuit breakers in our German apartment are 16amp.

110Vx15A=1650Watts

220Vx16A=3520Watts

Boiling water. Our water kettle dumps 2200 Watts into water, and the difference is noticeable. Much faster boil times.

Our clothes Iron is rated at 2400 Watts.

Our Dryer can plug into any outlet in the apartment. When buying a dryer in the US, you have to buy a $15 cord just to get the delivery people to plug it in.

The only appliance that you can’t plug into any regular outlet is the cooktop. Here’s a picture of the power main at my step-dad’s apartment 3

160917-img_20160917_170617640

Because of the 500V, on-demand hot water is also possible. In the US, you can only do on-demand with gas. 4

BTW, our apartment came with a kitchen. I do wish I could swap the cooktop with a induction model and we just might do that as the one we have has some things about it that are rather goofy. 5

Follow up and would like an editor

It usually takes forever for me to get one of these posts out. This one started probably 6 months ago. There are two reasons for this:

  • I don’t want to miss any fun points
  • I try to honor your time by taking my time to make my posts as coherent as I’m capable of.

I want to improve this in two ways. First, if you care to help me by being a first set of eyes, an editor of sorts, I would like to try that. Let me know.

Second, I’ll address points I missed in previous post via a follow up section. This is something one of my favorite podcasters John Siracusa has made a hallmark of his work. His shows all begin with follup up. I’ll add them to the end of my posts under the logic that only those that make it to the end of a post even care about any possible additions.

So followup:

In a previous post, I mentioned that Germany tried to draft me and that many young Germans are doing civil service instead. It was pointed out to me by my step-dad’s wife Nada that the draft ended in 2011

When talking about alcohol in Germany, I forgot to mention a funny story; a conversation I had with my aunt Sieglinde. My aunt is 83, one of my grandmother’s sisters. I was visiting her over the summer and she asked me if I wanted anything to drink. I looked around for a clock and asked if it was too early to have a beer and anyway, how late in the day does it need to be to have a beer. Her answer: “when I’m thirsty. If it’s 9am and I want to drink a beer, I have a beer.”. Then my 83 year old aunt got me a beer at 11am.

There are surely other follupups (some call it FU), but I can’t remember them at the moment.

 

 

 

 


  1. where everything is wrong, of course

  2. stairwell

  3. My sister Jovan’s dad. Also American and has lived here for over 30 years.

  4. the hotwater thing at your sink is actually a small tanked water heater

  5. to be more accurate, I really don’t like it. When you turn it on, it either goes full blast for way too long (even on lower settings) or it barely heats. You have to first turn it on high, wait a couple minutes, turn it down to 1, and then finally to the setting you want. It’s trying to be smart by taking into account that the surface has some thermal mass that needs to be overcome, but it’s often frustrating.

Things I find interesting about Germany

Since I got so much positive feedback on my last post, I’m motivated to write some more. 1

Living in another country is filled with surprises and this is one of the main reasons we chose to come here. This post is just a listing of some of the things I’ve come across that are surprising to me. Most of it is little more than dinner party trivia.

All of the photos on my blog are clickable for larger versions.

Food related

In Germany, and most of the rest of the world, eggs don’t need to be refrigerated. How is this safe?

  • Eggs aren’t washed, which would remove their natural protective layer
  • Hens are vaccinated against Salmonella. 2
160809-IMG_20160809_090546620_HDR
Here’s where we store ours

Many people I know in the US love to eat raw fish (AKA sushi). Some like to eat raw beef, either in the form of a rare steak or perhaps in the form of carpaccio

Germans (and some other countries)…. we eat raw pork. Here it’s called Mett

160806-IMG_20160806_135937569

Doubly un-kosher and un-halal. Turns out there are a bunch of other ways meat is eaten raw

Germans are known for their sauerkraut. When eating sausages in the northeastern US, folks refer to it as “Kraut”. I wonder if those same people would find a glass of sauerkraut juice to be equally appetizing? Rote Bete means “red beets”

20160319_120810
Red beet juice and sauerkraut juice

Pork and sauerkraut are definitely yummy together.

160611-IMG_20160611_122103476
Ham hocks go well with sauerkraut

Smoking

In the US, smoking is something to be embarrassed about. Not so much here. Even though the tobacco industry is getting squeezed as much or more than in the US, many smokers don’t hesitate to smoke in public. About a week after we arrived here, we had an example of this. We were in a tunnel that connects between streetcar terminals waiting for the elevator. A dude lit up about 10 feet from us. “Us” included Lydia and Malcolm who are clearly little kids. In the US, I think a smoker would have walked another 20 or 30 feet away.

20160309_172605
Marlboro ad
20160313_111052
Cigarettes can be purchased from a vending machine. You do have to prove age by swiping some sort of id.

The anti-smoking campaign is a bit more serious here, though I wonder how much of an affect it has.

The text says: “smoking can be deadly”
img_20161004_122438058
“smoking damages your lungs”
img_20161004_122447974
Smoking is a cause of heart attacks and cancer
img_20161004_123730633
Smoking clogs your ateries

Alcohol

Germany is known for beer. Some trivia from this site

  • At 11.4 billion liters, Germany produces 26.4% of European beer.
  • Germans drink most of that (10.7 billion liters)
  • That’s 131 liters per person per year.  Three American 12oz’ers in one liter means about one beer per day across the population.
  • 60% of that is Pilseners. 3
  • Another 12% is “export”, but honestly, I don’t think it tastes much different.

I remember hearing a story from a German friend that when he was in the German army that soldiers from the Bavarian state were often allowed to have a beer with lunch since it’s considered a cultural thing.

I probably drink one or two .5l bottles on most days, so I’m doing my share.

Having said that, I think the varieties of beer available in Portland are more interesting. Note the statistics above. I do think it’s cool that you can go to a restaurant and order “a beer” without follow up. Imagine ordering “coffee” in the US.

Beer is cheap here and there are lots choices within the handful of beer types. For a case of 20 half liter bottles, you will generally pay 10-14 euros. ($11-$15.5). A friend’s mom, who’s on a fixed income, drinks beer that can be had for 4-5 euros a case. I tried one of hers and it was fine. I’d buy it myself, but they don’t sell it in my neighborhood. 4

Speaking of my friend’s mom, reminds me of something that happened with my grandmother. I was a skinny 16 year old and we had just gone shopping. A case of beer has some heft to it; it’s easy to share the load and carry it between two people. The distance from the car to our front door was a good ways and while she clearly didn’t have any trouble carrying the load, my arm was getting pretty tired.

160804-IMG_20160804_152144987
One of the two local drink shops
160723-IMG_20160723_142404323
cheapest beer I’ve found
160326-IMG_20160326_124433
even the shopping carts are beer-friendly

What is missing here is the porters, IPAs, Pales, and such. If they are sold, they’re tucked into a corner somewhere.

Never too early to begin educating
Never too early to begin educating

As you can see from the pics, Germans are pretty relaxed about alcohol. A much healthier attitude, I think.

160326-IMG_20160326_124721
liquor sold by checkout

In the US, when going to a carnival, street faire, or other public event, all drinks are segregated to a separate area. Here, it’s mixed with all the other activities. I don’t have pictures, but we went to a wine fest 5 and there were lots of kids around. In Portland’s many brewfests, you basically shouldn’t bring your kids. Drinks here are served is glasses made of glass 6

You can buy tequila on Amazon

BTW, you can buy Bud here too

20160314_163709

Not a lot of health food

In my area, there’s one store that could be labeled as a health food store, but it’s not the type of place anyone would go for their normal shopping. We haven’t found an equivalent of Whole Foods or New Seasons. There is a small “farmers market”. Why do I put it in quotes? Here’s a photo of the main veggie stand. It sells bananas. Even the southern European countries don’t grow them. In fairness, I’ve only been to this one once and I need to ask the merchants to see where it all comes from. There’s a guy who sell honey from his own hives. I want to ask him about it so I better manage the three hives we have at our Portland home.160804-IMG_20160804_101205810

Candy

Germans have a sweet tooth. When you go to someone’s house, you pretty likely to find some sort of candy on the coffee table. 7 Here are some photos of the sweet stuff section of the local real_markt_logo. This chain store is similar to Walmart of Fred Meyer.

160919-img_20160919_131604202
The sweet part of the baking section
160919-img_20160919_131614190
Gummy bears and chewing gum
160919-img_20160919_131628779
gum drops and Dickmans
160919-img_20160919_131644517
MMs on the left and right
160919-img_20160919_131654390
Toffees and chocolate bars

Five aisles of sweet stuff!

Dickmans

A note on one of the pictures above, which contains the marshmallow’eque Negerkuss. Neger is sort of the German equivalent of the N-word. A very toned down version. When I was a little kid here, it was used in the same way that “negro” was used in the US. Not quite nasty, but often not so nice. In any case, kids love to eat them some Negerkusse. A friend of mine tells me that he used to make sandwich with them. The word’s not used anymore, but the schokokuss lives on.

schokokuss2

Love that BBQ

Germans like to BBQ. More sausages and not as much hamburgers than in the US. Mostly, I’m including this section for the pictures.

20160306_132825

20160314_091726

Grocery Carts

As a kid in Los Angeles, I remember there where a couple pickups that would drive around the neighborhood collecting grocery carts. For many people, the shopping cart was the most convenient way to bring home groceries. Today that’s not possible, since the wheels will lock up on you once you leave the premises.

Here this “problem” has been solved since I was a little kid. To use a cart, you have to put a coin in the cart handle. Easier to explain with a picture.

160806-IMG_20160806_142406407I’ve once seen a family here using a cart to get their stuff home. I can’t say whether they returned it. It does remind me of something I experienced in Israel. When I lived there (4/98-12/00) it was still common not to have car. To compensate for this, grocery stores had a service that if you bought more than some amount of food, they’d deliver it to you for free. The threshold wasn’t very high; maybe NIS200/$50. My girlfriend at the time utilized this even though she did have a car. It was nice to have someone bring it to the door.

Well, there’re other differences I’ve noticed, but I want to finally get this post out of my drafts area. Hope you enjoyed.

 


  1. I actually did start on this one right after that post but life can be busy when you’re not working.

  2. I believe that many US chicken farmers also do this.

  3. think Sella Artois or Pilsner Urquell. Note that this type of beer is named after the Pilsner region, which is in Czech Republic

  4. we don’t have a car

  5. Germany has many vineyards, especially along the rivers.

  6. you pay a 2 euro deposit. It’s a good way to get some decent glasses

  7. perhaps it should be called a candy and chips table

A better way to improve vocabulary

If you want to get past the blah blah blah below, here’s a video description of my Android app

And here’s a link to the app in the playstore

It’s all those words

For a a variety of reasons, many of us want to speak another language, but it’s not so easy. We start with the easy stuff needed to be a tourist. A bit of grammar and some basic words come next. The early progression may not be so bad, but eventually we’re likely to hit a wall. Vocabulary.

A human language probably has a couple hundred grammar rules. Conjugations, where’s the verb go, past, future, future perfect, prepositions,…. At first it’s overwhelming how many rules there are, but you learn them and stumble through using them.

You can can get by with broken grammar, but if you don’t know the meaning of the words, you’re stuck.

So how does one improve their vocabulary?

Everyone’s tried flashcards, but they’re kinda tedious. Another way is to read an article, dictionary in hand. Both methods involve a lot of work. The more work you have to do, the less likely you are to avoid doing it. To make it worse, even if you slog through looking everything up, by the time you get to the end of a paragraph, you forgot what the beginning was about.

goosebumps

Another method that I’ve tried is to get the same book, one in English and the other in the language I’m learning. Goosebumps, for Hebrew and Footfall for German. This worked ok, but translations are often not that accurate. The German Footfall had entire sentences missing. Hebrew Goosebumps wasn’t so bad.

footfallcombo

Someone should write an app

A bunch of years ago, I had an idea. Take something I like to do, reading, and turn it into something that improves my vocabulary as a side benefit. The idea is to generate a vocabulary list that is personalized to me and to the text I’m trying to get through.

The point is not to study the language. The point is to read something you want to read.

Back then, I implemented a firefox extension, and it was very helpful. For the first time, I read, understood, and enjoyed a novel written in German. Once I had it working, I really liked it, but there were a bunch of things that would have made it difficult to generalize to other languages and generic websites. In the mean time, technology has moved forward.

Finally getting to the point

So now that I’m living in Germany, needing/wanting to improve my fluency in German, I’ve implemented the concept again. Here’s how it works:

  1. Install my EasyReader app on your android phone or tablet. 1
  2. Open your web browser and go to an article you’d like to read.
  3. Click on the share icon under the “…” in the upper right corner and EasyReader should be one of the options.
  4. EasyReader will load the shared URL, extract the main text and display it in a tab.
  5. If you swipe right, you’ll see a list of all the words that are used in the currently visible text along with their translations.
  6. You select the words you already know and mark them as read. EasyReader will remember these selections in future texts. This will take some work with the first couple articles, but you’ll quickly get good lists without this step.

Reading the text becomes much easier. Read until you’re stumped, swipe over to the definition, swipe back and keep reading. You’re not trying to study the words. They just need to stick long enough to comprehend what’s in front of you. Over time, the words will stick.

Any combination of languages should work. I have had some difficulties with non-Western alphabets, however. 2

Other features of the app

There are a couple more “advanced” features that I’ve added.

Sometimes, the text in front of you has too many words you don’t know. To reduce this, you can tap/select a paragraph and your word list will be limited to just that paragraph. 3

Next is the ability to add flashcards. In my own usage of the app, I found that there are important words I need to study. Next to the “unknown words” tab is a “flash words” tab. Words are added just like marking a word as known. The flash tab also has a print button and a copy to clipboard. 4

Last, EasyReader will handle ebooks in non-DRM epub format. These are easy to get. 5 Find the epub in your device’s file manager and click it. EasyReader should appear as an option.

What makes this app difficult?

In case you care, here are the two hardest parts of implementing this functionality.

The first thing that’s hard about this is the fact that most webpages have lots of extra stuff that isn’t part of the meat. Ads. Links to other pages. The banner. Furthermore, the html structure of most webpages is difficult to decipher. No clear demarcations. The utility boilerpipe makes this much easier 6.

The other thing that made it hard is finding word mappings. Babylon was a good source, though parsing their data wasn’t easy. Even after I found a parser, it wasn’t enough. Almost all words have variations, plurals for nouns, conjugations for verbs, plus some words don’t need translation. People’s names, for example. How does the app decide?

A good fallback was google translate. At the time, the translations were good enough for me to read a novel and they’ve gotten much better. Somewhere along the way, google made it harder to query their APIs. When asking for a definition, you have to compute a secret hash function on the word. Get it wrong and you just get an error response. Thankfully, others have reverse engineered it. It still wasn’t easy because two or three months ago Google tweaked the hash function. The Javascript is obfuscated but eventually, I found the difference.7 8

 

 


  1. Android only. I am prejudiced against Apple, in spite of the fact that their products are nothing less than excellent.

  2. I’ll try to fix this if there is demand.

  3. sadly, many paragraphs are quite long

  4. I’ve written some code to get better definitions from the leo website. This works only for German and it’s not part of the app. I’d consider adding it if anyone cares

  5. If you have a book in Kindle format, this site provides an excellent solution. Well worth the effort of installation.

  6. it’s not very well documented though.

  7. I depend on the fact that Google is a large company with a website that is used by many, many people. Changing the function regularly has the associated risk of breaking their website. More important than trying to slow down small fry like me

  8. If someone from Google cares to complain to me, I would love to hear from Tamar, a former Intel coworker, who I believe heads the translation division. I’m not making any money from this app, nor am I selling the translations.