Harrison Farm

for now, the only thing we're growing on this farm is kids - not the goat variety

Author: Doodle (page 1 of 2)

“Waiting for build to finish” bug in Android Studio and the Custom View Curse

Note: If you are a regular Harrison Farm reader, most of the terminology will probably look like Greek. (From Marathon: “But you’ll probably want to read it for the sake of the italicized portion at the midpoint.” ) If you are a frustrated app developer, this may save you up to 1.5 hours of waiting for Android Studio to restart, not to mention 10 hours of debugging.

Note 2: This bug only happens when one is using a custom view in an XML file. If you don’t even need to use the XML display, the bug shouldn’t hinder you in any way.

One day I was coding along my merry way when I opened up an XML and flipped over to display mode. That was when I was confronted by the message: “Waiting for build to finish…”

What this message even means, I’m not sure. It seems to be referring to the Gradle build, but nothing was building at the moment. I gave it a little time and nothing happened.

I went off on a big, huge rabbit trail which took me through restarting Android Studio ~40 times. I found the culprit XML file, I did some trial-and-error until I found that the problem was in a custom view Java file of mine. So I did some more trial-and-error to find out that the problem didn’t seem to be in my code at all. It was just some mysterious problem with that specific file.

And this brings the story to a sad chapter in my life. After around 3 weeks of trying to defeat this bug, I finally lost momentum and just stopped coding … for about four months. I had tried reverting Android Studio to an older version, I’d tried to modify the compiling scripts, I’d tried learning Kotlin (a Java alternative). So I just gave up. I could’ve asked Carman for help, but I had lost momentum and my sense of motivation.

4 months later, Marathon gave me some encouragement and told me that I would have extra chores until I had solved this bug, and that he was willing to help me any way he could. Sure enough, this gave me the motivation I needed. After about a week, I broke through.

Don’t let your momentum stop. What wouldn’t I give for 4 whole months of (nearly) bugless coding.


Next I went through some more trials and errors (this time having to delete and recreate a new file + restarting Android Studio with each trial) until I found the root of all my problems: a simple uninitialized variable.


What do I take away from this?

Problems with Android Studio:

  • They didn’t give me a NullPointerException error. They didn’t say anything about my error either in the XML error boxes or during the Gradle build.
  • If you open display mode in only one bad XML file, all others get the same problem: Infinitely “Waiting for build to finish”. The only way to reset this is to restart Android Studio.
  • If you try to display a bad custom view in an XML file and the XML file gets the “Waiting for build to finish” error, that file is forever infected with the “Custom View Curse”, as I call it. Even if you fix the error in the Java code, somehow the XML will always fail on that file forever. In order to rid a custom view Java file of the Custom View Curse you have to… well, you actually can’t. You have to copy the code, delete the file with the Custom View Curse, create a new Java file with the same name, then paste in your old code. The Curse is invisible, as far as I know. It’s probably in the file metadata or something.

Android Studio isn’t perfect. The problem isn’t always you.

My last drawing (until later)

I’ve still been drawing every day.

With so much drawing, I’ve filled up my second drawing book.

I asked Pa if I could stop having drawing on my school list. He said yes.

So, as of the end of my drawing era, I was most interested in shadows and textures. I was really starting to get the hang of them. One thing I never figured out was rumpled fabric. I tried many times, but I could never do it well and it never seemed realistic.

I worked on shading and textures up until a few pages from the end of my drawing book.

I wanted to do something easier for the end.

On my last page, I decided to make the drawing below:

I thought it would be fun to make up one drawing out of the whole page.

I needed a character that would be easy to draw. I don’t really know what they are, so I decided to call them Gerbils.

All the individual situations are my original creation, but the whole thing was inspired by “The Mighty Fruit Fight” page in Where’s Waldo? The Wonder Book.

At first, I was going to copy a lot from that picture, but I decided to first draw my own ideas that I had come up with.

After that, more and more ideas kept popping into my head until the page was filled.

There are several mistakes, for example, the text at the top says “WAR OF THE GIRBLES”. It was supposed to say “WAR OF THE GERBILS”. I guess I was just too focused on the drawing part 🙁

But no biggie.

Also, the guy on the turtle’s head (see below) looks like he’s holding an arrow on his head. That’s supposed to be a spear with which he’s about to stab the other Gerbil.

Also, the gerbil who is about to be stabbed in the the scene above is missing his tail.

I don’t think that flags really blow up the way shown below:

Un-blown-up flag:

Blown-up flag:

Also, in the two pictures above, you can plainly see that the Gerbil Kings’ tents have self-supporting systems built in…



A few weeks ago, there was a sculpting competition in a sculpture park about two miles away from where we live.

The whole competition took about a week. Each person got handed a big block of marble and were told to carve something out of it.

We first found out about it because Marathon, Sudoku, and I were taking a bike ride up Cerro San Cristobal. We decided to really explore the sculpture park for the first time.

While we were there, we noticed there was a lot of whitish smoke. Then we saw a big tent set up and all the people with their big pieces of marble. None of the sculptures were very clear yet. We decided then that we would want to see when they were done.

As far as we could tell, there were about 20 sculptors, each one making one sculpture. (A few of them had helpers.)

Below is a list of a third of the competitors. This is one of three lists that were there. (Notice the guy from Taiwan! Listed as “Taipei, China”.)

We — all but Mom — took a bike ride down there two Sundays ago–Marathon, Carman, Sudoku, Rosebud, and me.

The sculptures were pretty amazing. There were a few at the end that had granite, but apart from that, they were all marble.

Here’s a slide show of some of the works.

Dad’s favorite part was the textures. Some sculptures were glossy smooth while others were rough and chopped at wonky angles as if to resemble age.

Now I’ll get to the particulars.

One looked like a guy frozen into an ice block. The whole thing was smooth, all in one piece. The guy looked like he was trying to get out, but most of his legs and part of his arm was stuck.

One was like a bunch of plates stacked on top of each other.

One was a big waviness with a bunch of writing in small letters going around it at the base and up the waves to the top.

Another was what looked to be a Greek/Roman guy with a blindfold and a sash that read, “OMNIA VINCIT AMOR”. That was my favorite.

Another was like one of the water things that you sometimes see in parks, with all the little pools, with a trickle of water flowing slowly down from each pool to the next. The water was also made of marble.

Another was like ten people sitting on a boat.

Another was a pregnant woman. This one was cool, because it was all rough in the back, and slowly changed to smooth in the front. None of the other statues had this.

Another was like a jet scooter, with granite handle bars. Most of the granite parts were cylinders. Marathon said this was done with a hole saw.

Another was an A, but with waviness on it. This was Marathon’s favorite.

Well, we got back from our bike ride and told Milkmaid how awesome they were, but that she would have to see them for herself.

About a week later, Milkmaid, Sudoku, Rosebud, and I went back to the sculpture park, but already most of them had been taken away to different parts of the country.

My shadow project

[A little introduction by Marathon: ]

We were talking about solar eclipse phenomena recently. I told the kids about my memories from eclipses that I experienced as a boy, especially about how all the leaves of a tree would cast shadows that looked like the shape of the eclipse.

After the conversation, I did some image searches so I could show them what I remembered.

I was stunned to find that the truth was nothing like I remembered it!

Instead, there are thousands of images showing pinhole-camera effects. That is, the light from the sun passes through tight squeezes between the leaves and casts itself on the ground as an inversion of the sun’s distorted shape. Here is a typical example (Photo by Neal Wellons):

I couldn’t find a single picture to support what I remembered!

But I couldn’t seem to let go of it either. Without being able to explain very well why, it just seemed to me that there would be an eclipse shadow effect separate from the well-known pinhole effect.

I muttered something to the effect of, “We’d need some fancy lighting or a computer program to know if there was any truth to what I was thinking.”

Little did I know that wheels had been set in motion…

Over the past week, I have been working on a project. A coding project.

Sometimes we would play games with light during supper, when the light from the sun would reflect off glass buildings. I noticed that the shadows were almost perfectly crisp, even though our shadows fell on a wall that was 15-20 feet away.

That isn’t the case when the light is coming straight from the sun.

In the morning’s direct sunlight, the shadows are all fuzzy, and they would do all kinds of crazy stuff, like jumping over to other shadows, or some shadow that is a lot thinner than it should be…

A week ago, I had a realization about why shadows seem to warp sometimes.

I had always assumed that it was from the light of the sun bending, slightly.

But that isn’t the case. I realized that if you have a small slit letting sunlight through, there will be a light spot on the ground that is a good bit wider than the small slit. I realized this was because of the light from the right side of the sun shining through to the left of the slit, and vice versa.

During an eclipse, also, a tree shows many mini eclipses on the ground, on it’s shadow. This, we found out, is due to the pinhole effect.

Marathon still felt that a normal object, without a pinhole might also give an eclipse-like shadow. We made this big sketch, we kept messing up, but finally, we were pretty sure that any object would give a slightly eclipse-like shape.

It would take a long time to explain it all in writing. It’s pretty complicated.

So, instead, I did this coding project to make it easier to understand:


I consider ~150 inches from the ground to be the best distance for seeing the eclipse-like shadow.

Hope you like it!

[Marathon: So, thanks to Doodle’s javascript program, we can see how a shadow of basically anything leaf-sized, that is positioned around 12 feet above the ground, gets distorted by parallax effects to look vaguely like the crescent of the eclipse.

Here’s a leaf-like shape’s shadow at 10 inches above the ground during an ~80% solar eclipse:

Now here’s the same shape’s shadow at the same moment if it was 12 feet off the ground:

Totally different!

Even the staple shape, that already is a crescent of sorts, will bend to roughly become a crescent in the opposite direction! Try it for yourself.

Here’s another neat effect we found. If you set the moon’s size to be slightly smaller than the sun so that it allows for a “ring of fire” at the point of complete eclipse, here’s what the shadow of a ping-pong sized ball looks like.

Another symmetrical shape that gets bent into a crescent:

And finally, I was able to find a photo that shows this effect. The key is to find and eclipse shadow photo of just a few leaves so that the pinhole effect doesn’t dominate. Thanks to Flickr contributor Paul Sableman. Notice how all the leaves have a distinct concavity facing right.

The Bicibahn

Dad and I have been going out every morning to ride our bikes since Sunday.

We started going out more often because a really nice bike path, wide and smooth, was recently made.

There’s this long section with no stops, slightly sloped because it goes along the river. We call it the Bicibahn, named after the Autobahn in Germany.

On the way back down the bike path, I normally draft off Dad. If I can keep up with him, he’ll “torque out”. He has a mirror on his helmet, so he can see how I’m doing.

Early in the week, it was a little scary, but now it’s fun and exciting.

Most of the time, I have to mouth-breathe to keep up with him. Sometimes I’ll even get little pebbles in my mouth, thrown up by his tire.

Anyway, this morning, I was struggling to keep up with him when I thought, “I wonder how fast we’re going?” I was in my top gear, and pedaling at 100-120 RPM. I was close to out-spinning my top gear.

Photo by YoVivoMapocho.


Other Pieces of Music

Here’s another piece of music that’s a lot longer.  ~4min long.

This one, Growth, has three parts, whereas The Storyx only had two.

Hope you like it!


Here’s Face-Scratch:

My Favorite Piece of Music so far

I think this is my favorite piece of music I’ve written so far. Before, I was writing by hand. It was very slow, and it was hard to do more than one or two notes at a time, because all I had for playing the music was Carman’s recorder. I could play arpeggio chords (one note at a time), but it was hard to get something that really sounded good.

That was before I went over to the King padpad. Sorry for the name, but it is the real name. It was a typo. Then, we got the Ensemble Composer app. You can make music on it, as many parts as you like, then you can play it.

Here’s my favorite one, The Storyx:

More Drawings

I have forgotten to post my pictures for more than six months! I have a lot more drawings to show off.


Can you guess who this is? It came from a newspaper.



Here is my name written in Chinese, in 3-D with perspective.



This is a drawing of a 3-D sculpture.



This is another 3-D drawing with perspective.



That’s all for now!


For the past month, I have been really getting good at drawing.

One day I drew Rosebud reading, and it didn’t look too bad.

Then I got into drawing faces.

Here’s one of Milkmaid:


Here’s one out of my imagination. I tried to make it look like someone in a mood.


I also like drawing hands.

Here’s one of my fist.


Here’s one of my shoe that I drew about a month ago.


I hope to have more drawings to show off, but they have to be good enough.

Moody Noriega

I have a little ball that I’ve named Moody Noriega.  Let me tell you how it got it’s name.

But first, do you know what a palindrome is? It is a word or a sentence or a paragraph or any type of text that is read the same both backward and forward when not including any punctuation or capitals or spaces, for example, “race-car” or “Stanley Yelnats” or “Aha!”.

I created a program on Khan Academy which challenged the user to think of a palindrome longer than mine, that I had come up with myself: “No stop! A pot’s on!”

One of the users put down in the comments a palindrome longer than mine: “‘Are we not pure?’ ‘No sir!’ Panama’s moody Noriega brags, ‘It is garbage! Irony dooms a man, a prisoner up to new era.'”

Then Carman and I came up with a game. We collect the left-over pipes from our stretch wrap and aluminum foil, and we set them up on their ends, and we take turns throwing at them, and whoever had knocked the most pipes over wins that round.

But we normally set at least two pipes on top of the “Panama Jack” box, that we ended up calling the “Panama Noriega” box.

And we ended up calling both the game and the ball that we throw to knock down the pipes, “Moody Noriega”.

Moody Noriega

« Older posts

© 2021 Harrison Farm

Theme by Anders NorenUp ↑