Categories
Engineering Java

Your System is Finite

Let us talk limits for a bit. No, put away your graphs, this is about memory
limits. Before I get into the discussion, a few notes. I am going to be talking
mostly about particular errors and operations in Java. A healthy knowledge of
the Java Virtual
Machine
with particular attention to
garbage collection and heap allocation
would be useful.

Recently I encountered some issues where our application was running out of
memory. In this case the Java virtual machine is going to throw this exception:
OutOfMemoryException.

Why is this happening?

When your program runs in the JVM the JVM has a specific amount of memory (a
subset of the system’s ram) it can use to allocate objects. This area is the
heap and it is where all the objects you create using the ‘new’ keyword will
live. Stuff like this:

CustomObject customObject = new CustomObject();

The amount of heap space the JVM has access to is based on the system it is
run on. The JVM will set the amount of heap space available to it when it
starts. As your program executes, the JVM will allocate space on the heap for
objects the program needs. Objects you no longer need will be removed via the
JVM’s garbage collector. The garbage collector however, cannot remove objects
still in use. Therefore if you create too many objects you will use up all the
heap space and get an OutOfMemory exception. This is the key point: your
system is finite
.

For example, if your heap size is 256MBs and each object you create takes
1MB then code like this:

CustomObject customObjArray =
getNumberOfCustomObjects(257)

Will require at least 257MBs which you do not have. Thus the JVM cannot
continue and it throws an exception.

How Can We Fix This?

Now there is an easy fix to this. When you start your java program you run
it on the console like this:

java myProgram

You can specify
arguments
on java to increase the heap size. Specifically something like
this:

java -Xmx:1g myProgram

This would set the JVM’s heap size to 1 gigabyte. Do not do this! It is
tempting, it is easy, but it covers up an underlying problem in your program.
Now, of course, there is a time and place for this, but for the most part all
you are doing is delaying the problem, forcing future you to deal with it.
Future you will hate you for it. Let us look at a close to real life
example.

Record recordArray =
getAllRecordsFromMySql();

This is perfectly valid code. All we are doing here is getting a bunch of
objects back from the database. Simple code can get you into a lot of trouble
if you do not have a good understanding of how many records you can get back.
We have three possible cases here:

1. We get 0 items back.

2. We get n items which consumes less than the total heap size.

3. We get n items which needs more heap than we have.

In the first case, we are fine, no issues there. In the second case we are
also fine. You may not even have to worry about that if the number of objects
you expect back is always (key word) going to be be less than your heap size.
For example if our app can only ever store 10 records at a time (like a
rotating log) we will be fine. If, as I saw recently, the number of records you
could get back is near to unlimited then I can promise you at some point that
is going to happen. You can then see that it does not matter what we set our
heap size to. If the amount of records are bound to the size of system’s hard
disk then, at some point, the amount of stored records we have will exceed the
total amount of available ram and then it does not matter what you set the
JVM’s heap size to, you could not possibly set it high enough and your program
explodes.

What you can do however is limit the amount of records you process at one
time. Consider a couple different strategies for this case (reading n entries
from a database).

1. Conditionally Limiting your Mysql query to a certain id range.

If your tables are setup correctly it is possible you could get your rows
based on increasing the id. For example you could execute a query like
this:

select * from records where id >= 0 and <= 500;

This would get all your records with ids from 0 to 500, or 500 records.
Assuming ids are unique (meaning two rows cannot have the same id). Then you
could iterate your id range and get the next 500. Keep doing that until you
have less than 501 results and you have processed all your results.

2. Using a cursor

A cursor is basically an iterator. It points to one row in your database.
From there you can move to another row. You are only allowed to operate on one
row at a time so you will never run out of memory. This can be especially
useful if you want to process a large number of objects, and then update them
in the database. Code that would look like this:

while(mysqlCursor.hasNext()) {

       Record record = mysqlCursor.next();
       processRecord(record); 
       writeRecordToTable(record); 

}

Both strategies will limit the amount of data you have to manage at any one
time.

Key Takeaways

The key rule to remember here is, when working with computers, you are
always working with finite resources. Memory has limits. You can program around
them easy enough, but they are there and they must be respected.

Categories
Philosophy Story

An Example of Things Working Out

Have you ever had plans to meet someone and got there really early. Not like
10 or 30 minutes early, but an hour or two. Does not matter why, maybe you got
the time wrong, or vastly over estimated how long it would take to get there.
What would you do while you waited? Would you get a snack, try and find
something to read, sit around aimlessly? Me, I like to walk around wherever I
am. Maybe it is a big building with a lot of corridors. Perhaps it is a school
ground with some forest paths. Regardless, it is time for an unplanned
constitutional. Maybe I go left, maybe I go right. Perhaps I take this path,
perhaps I take the other. I will not quote Frost at you, but you get the idea.
Sometimes I see people, sometimes I do not, depends where I am. Not the point
of the exercise. I am just burning time waiting. And yet, something else is at
play here. The walk is time limited. You have an end time at which your
wanderings must stop. What if that were not true, what if you just kept walking
and saw everything you could? What would change? Maybe you would see something
unexpected or maybe, low odds that it might be, you would change? This is a
little story of how little things changed me.

Back in University (sometimes it is fun to be pretentious) a few days before
my first undergraduate class there was a club fair. A kind of menagerie where
people convince you to join their clique. The school had a pretty clever play
of only serving lunch that day next to the club fair. So I found myself eating
some Aramark ‘food’ and poking around the tables. Nothing much of interest to
me. I got hit up to join the Society of Black Engineers. Which got the academic
intent right, but maybe missed some other clues. We live in a color blind
society though so I cannot fault them. Things were pretty much a dud so I
started to work my way back to my dorm. Oddly though, while I was making my
exit, I spotted a friend from high school poking around a club table. This was
surprising for two reasons:

1. This friend was a year older than I, yet remembered me.

2. I had no idea he went to this school.

It was a pleasant surprise, serendipitous for those of you studying for
University
Challenge
. There was some minor talking had. It was a hot day. He was
actually there to promote a club, The Society of Physics Students (presumably
all college clubs are societies). Not that he was a major player in the
organization. I suspect, like me, he was there for lunch and wanted to eat near
some people he knew. Regardless, it was fun, speaking of things past and
present. The club was running some simple experiments, playing with a spinning
wheel to show angular momentum, physic things. They gave me the first meeting
date, whatever, I did not really care.

A week goes by, turns out I do care. New school, new Paul. One of those
points turned out to be true. So I am looking for the room, a little before the
meeting time, and the thing about Umass Lowell is they named these two building
next to each other Olsen and Olney. Incredibly easy to get missed up. So,
expectedly, I go to the wrong room first. The tip off was it was an office, and
the second clue was it was empty. I go to the other building and try the same
room number over there. I give the door a tentative push, it is locked, key
card reader outside. How could it be this room? Why would it be locked? At
least the other one was open. So that was an anticlimax, but I know know the
building names a little better. I am walking away with my back to the door when
it opens which I was not expecting to happen.

“You looking for SPS?”

“Yes”

“Cool”

That is not the exact conversation, but it is the intent. I became an SPS
member a handful of minutes later even though I was not studying physics nor
taking a physics class. Then I made some new friends who would be one of the
few constants for my next four years. The name of the club was SPS, but it was
more of a social than academic organization. Very useful to know people who
were more experienced than I in many fields. They kept me in the loop for
things to do and kept me sane. I remember the dinners we would have. Hour long
affairs, people coming and going. Leaving far after closing time. I never ate
and talked so much in a cafeteria before. Six years on the contact has lessened
with distance, but we still drop notes on occasion.

Now consider one point in this story. The locked door. What if I had not
pushed it? No one would have know I was there, I would not have been in SPS,
and my life would be lesser for it. Now how often does that ‘what if’ happen? I
got lucky this time, but I am sure I missed the connection more often than
not.

Just got to keep walking I guess.

Categories
Convention

Oracle OpenWorld and JavaOne 2014

OpenWorld is
Oracle’s giant yearly business expo in San Francisco. It is a week of Oracle
trashing the competition and talking up its own product line. Oracle DB will
save you money, double performance, cure cancer, fix your marriage, etc. The
conference was flashy and large and not interesting to me. What was interesting
was JavaOne. A hold
over developer centric conference from when Oracle acquired Sun Microsystems
(the creator of Java). Being an Oracle employee I got permission to go which is
why I was awake at 5AM last Sunday.

The deal here is, Oracle will try very hard to keep its own developers from
actually going because they make bank on the registration fees from other
companies. A single JavaOne pass costs $2,050, which is pretty absurd. But, if
you actually do get permission to go, Oracle will bankroll the whole trip.
Which is why they paid for a car to come pick me up at that borderline absurd a
hour. I am used to always taking the train into Boston (then presumably a bus),
but the trains do not run that early, so sweet Oracle car it was. I was in full
business garb: army jacket, t-shirt, and jeans. It was pretty exciting to have
someone open a car do for me, made me feel like a real hot shot. The ride was
very pleasant too, classical musical and everything. Pulling up to the airport,
seeing everyone else in their taxis and minivans, I really was a business man.
The illusion suffered when I checked in and was told Chicago
was having trouble
. I might have made it a bit further, but then I had to
do the security dance so whatever respect for myself I had left I lost to the
TSA agents. Still Oracle paid flight, Oracle paid hotel, cannot be too bad.
Wait why am I flying to Oakland? Must be for the fancy accommodations and sweet
view since I will be right near the bay.

Ok, maybe not. Turns
out hotels in the city are for the real big shots and/or people who register
early. Which means, I became very familiar with Bay Area Rapid Transit. The
subway system here is pretty unique. Not only do you get charged when you get
off (hope you have enough money), but the trains are the loudest I have ever
been on. Frighteningly banshee-esque screams every time it takes a turn. So
loud, I am sure the driver has to wear ear protection for fear of an OSHA sound
violation. The best part of commuting out by train was watching all these
suited business types waiting for the hotel shuttle in this incredibly awful
Oakland neighborhood which the hotel driver described to us as “not great”.

None of that is actually important though because the actual conference was
awesome.

Being the dirty, unwashed, Oracle employee, I could not actually register
for sessions to attend, so I had to hope they did not fill up before I could
get in (five minutes before it started). Generally this was not a problem and I
got into some real cool sessions. Some of the stuff in JDK 8 is going to be
very helpful. Lambdas
and Streams
in particular are going to help out a lot. Some of the stuff scheduled for JDK
9 like value types and primitives in collections are going to be real useful
too. There was also a number of sessions that deepened my knowledge of the JVM
such as how the volatile keyword is implemented on the byte code level and the
different types of garbage collection strategies available to Java. A couple
dud sessions in there too, but what can you do. Of course no convention is
complete without an expo hall (both at Java One and OpenWorld), but it was
mostly a waste of time. I am in no position to actually buy any of the products
they were selling, but it was fun to watch how quickly the sale rep tried to
disengage once they found that out. Apparently the product I work on was demoed
somewhere on the floor so hopefully something good came out that.

All this work did lead to long days. I got up, went to the convention, sat
in as many sessions as I could, then rode the subway home to sleep. Some of the
sessions ran pretty late for a 9-5 guy with the latest being 9PM on some days.
In between I got the chance to enjoy some San Francisco food. Weirdly regular
convention goers get served lunch, but not Oracle employees. Presumably Oracle
would prefer I expense a meal that cost more than what they are serving? The
best was, oddly enough, the Korean barbeque I had near the mall at the Moscone
Center. I got way too much rice though.

We also got a chance to visit mother Oracle at nearby Redwood Shores and see
the sweet Oracle boat.

Turns out there are some perks to having a slightly eccentric CEO. At the
convention I got to see him speak for the first time at the key note and I was
greatly impressed. He was funny and engaging. Calling out the competition,
poking fun at himself, he really has a flair for speech and clearly loves being
the big shot. The gift shop at HQ was pretty disappointing though so he is not
perfect. After that it was two quick flights back, and a midnight car ride to
Franklin. Business managed.

The big takeaway from all this is two fold. One, this convention is not for
Oracle employees. Two, find all the Oracle employees you can so they can tell
you who to talk to in the company to actually get stuff done.

Categories
Musings

Am I Making Any Sense?

I am nearing 50 posts on this little blog so an important question naturally
arises after having written so much. Does anything I write or say make sense?
Do people just nod along with it and then when I finally stop and leave think,
“man that guy is crazy, what is he talking about?” I like to think I am
Brain, but do
others just hear Pinky?

An example for context. I am talking about acting to some friends, and how I
am rubbish at it. So bad people would be asking “why did the filmmakers use
actors from Home Depot?”. That is not the exact line I said, but it is close
enough. I thought it was clear enough, but all I could see were confused faces.
The thing is, this is my humor. Anyone can make a joke about a person acting
wooden. You have to go to that next level, where you understand everyone knows
that. You build on that knowledge and layer a joke on top. A person is acting
wooden, wood comes from Home Depot. Simple right? Blank stares, no laughing,
failure to communicate.

It is not just jokes though. Jokes can be excused. The issue at play here is
I might think I am being clear, but actually not being so. Imagine a carpenter
made chairs in a sealed room. Wood comes in one side, the carpenter sends the
finished chair out the other. She does this for many years and things, “I make
so many chairs, I am a skilled carpenter.” Meanwhile, outside the sealed room,
the chair inspector keeps rejecting them and burning them for firewood. Without
feedback how can any of us know if we are making a worthwhile product? I just
happen to be making collections of words here though so we are even further
removed from my example. Not everyone is a carpenter, but, as the internet
teaches us, everyone can write.

So what is to be done? How can I know if I am clear or not? It helps if I
write without error in spelling or grammar. I think I am doing that well, I
have no proofreader, but myself to confirm. I study logical fallacies so that
should help with my arguments, but it is so easy to fall prey to them.
Discussing issues with others seems to help. Easy to establish a feedback loop.
See what is working, adjust, see if it works better. If anything I am going to
blame others for being too polite and not calling me out when I say something
dumb or make no sense.

I hope, dear reader, you are not expecting a sudden insight with a solution
to this problem because I have none. Which is why this is tagged ‘Musings’ and
not ‘Philosophy’. Just thoughts on a continuing process.

Categories
Obituary

Wayne Roth

September 16th is my paternal grandfather’s birthday and now it will be my
maternal grandfather’s deathday. As there are no speakers
near I will fulfill the role.

Wayne Lehman Roth, who lived for 89 years from February 14, 1925 to
September 16, 2014, was a quiet man. His actions and words were chosen
carefully. He was precise. His life running his small print shop taught him
this. Long hours and hard work is wasted because of typos and small mistakes. A
love of letters and words was not just his job, but his character. Not long do
I remember him being separated from either a pun on his lips or a crossword on
his lap. That was his style. He wore suspenders long since out of fashion.
Correspondences were conducted on a typewriter. Smoking was done with a pipe.
He learned how to do something once and that was good enough. He tinkered with
model trains in that small row house of his. A house with no AC for those muggy
Bryn Mawr PA summers. He built Impressive vistas and intricate rail systems
which fought for room amongst the tools and paints of the basement. A busy life
to be sure yet time enough was found to be married for 60+ years. Time enough
for two children and their grandchildren and even a great grandchild. I never
saw him separated from my grandmother for long. Marriage to them was less a
contract and more a bonding of two people. His wife was an extension of his own
body and he cared for that just as much as his own.

To put it simply, he was a builder. Ink at work, tracks in the basement,
flowers in his garden, family any other time.

Perhaps he was not always this way, but I can only speak of the man I knew
for my whole life, which was only a fourth of his. I will never see my
grandfather again. No one will remember his name once I and am my kin are gone.
That is ok though. I will remember him and that will be enough. He never cared
for flashy things.

Grandparents Told you they were inseparable.

Obituary

Categories
Convention Musings

Thoughts on BFIG

Boston Festival of Indie Games was last
weekend. This was my third time going to the festival which has been operating
for the same period of time.

There is a very curious dynamic at play at this festival. Generally I am a
very reserved individual. If you were in a charitable mood you could use the
word taciturn. The point is I rarely talk to people at these things. I am more
inclined to see and listen and take in what I can. Except at this convention. I
talked to way more people than usual, far in excess of what is normal for me to
do. I talked to just about every indie developer there. This is no joke, I went
to every table and saw every game in the digital section. I even played most of
them. Best of all I got to play this cooperative survival board game (After the
Crash):

with this nice fellow:

the game creator. Go check out his site and buy the game when it
is available it is awesome. I also played an in development real time
restaurant management game. Each player played a role (I was busboy aka plate
and glass washer) and helped work customers through an assembly like system.
There were many sand timers and much yelling. I can see it being a great party
game as it is real quick to learn, but pretty stressful to actually play well.
Those two board games stood out the most. In regards to the digital section
there were a lot of familiar games, either from past festivals or ones new to
the festival that I had heard about prior. Some ones that stood out:

  • Anchorage Adrift:
    a cooperative space ship game, similar to Artemis, players are tasked with running a
    particular role on a space ship. A little rough technically and usability wise,
    but showed great promise.
  • Soda Drinker Pro and Vivian Clark:
    the first game is a first person soda drinking game which is hilarious. The
    second game is hidden within Soda Drinker and is weird and strange and has to
    be played. It is akin to dreaming or hallucinating. You play a rain drop that
    changes to whatever it touches. Also the developer is a
    real funny upbeat guy
    so that is cool too.

  • Adrift
    : a real polished looking arcade space shooter and tower defense
    hybrid. It is slick, fun, and a good coop experience. Why it still is not
    greenlight yet is curious.
  • Talon: a fast quake style
    spaceship multiplayer shooter. It reminded me of playing Unreal Tournament or
    other arena shooters.

Best part of all though was I got to throw my business card in one of those
raffle bowls. The phone number is wrong on it though so hopefully they just
send an email.

Categories
Philosophy Words

Stop Confusing Intelligence and Experience

Has someone ever called you smart? I will brag a bit and say I have been
called that a few times. The thing is, its just not true. It is not true
because people are confusing intelligence with experience. Intelligence, as was
once described to me, is the ability for a person to turn the abstract into the
concrete. The more intelligent your are, the less information you need to solve
a problem. An intelligent person can look at an issue and, with no prior
experience in that domain, solve it. The smarter you are the less information
you need and the quicker you are in solving an issue. To give a concrete
example a smart person might not be able to start their car one day. Not
knowing anything about cars, they start to investigate, beginning with the
ignition all the way through until they find a problem. A experienced person
recognizes a problem and solves it based on past experience. To use the same
example their car will not start, but they recognize the symptoms. In the past
they had a car that had a similar, but not exactly the same problem. They can
rely on that past information and associate it with the problem at hand. In
other words they know x, how does x relate to y?

In both cases the solution is the same which may lead some to think that
these attributes (intelligence and experience) are interchangeable, but that is
not the case. Intelligent people solve problems by there ability to quickly
understand how systems works. Experienced people solve problems by using their
past knowledge and experimenting off of what they know.

It is a nice compliment for sure, and it does wonders for my ego, but it
will not be true for some time. It takes a while for me to study systems and
understand how they work. My skill comes from my ability to remember how I
solved past problems and relate them to the problem at hand. I have worked with
truly frighteningly intelligent individuals. It is a disservice to their skill
to place me amongst them. Many more years of service are required before I
reach their level.

Categories
Engineering Philosophy

Impatience is the Mind Killer

I am not a patient man. It is one of the main reasons I went into software
engineering. It is very quick to think of an idea and convert it to machine
language. This desire to do things as quickly as possible has served me well in
that past, but lately it has caused great harm. An example and then an
explanation. I have been working on some systems at work that require a lot of
tinkering with some of the special database sauce we use. An unfortunate side
effect of this development is the need to constantly replace rpms (a kind of
specialized automated zip file). I was having great difficulty getting the
system updated with my changes so in my haste I just uninstalled all the rpms
of a particular package so I could reinstall all my newly built ones. Of course
what I should have noticed was I was uninstalling rpms that I had not built new
versions of. There is a sudden clarity when your console stops accepting
commands. In that brief window before you get told for certain that you lost
your connection you curse the gods, which for me happen to be the trinity of
Richard Stallman, Dennis Ritchie, and Ken Thompson. As you can surmise the
system died a quick death. And since the issue I was working on was hardware
dependent I had to develop on an actual blade instead of a virtual machine so I
had no snapshots or backups to revert to. Thus the afternoon was lost to
resuscitating the system via the HP ILO system and
its fantastically poor console. It was a huge pain, a waste of time, and
ultimately did no good to helping debug the problem. The solution it turns out
was far more targeted, I just needed to update a few system files instead of
blowing out all these rpms. So what is to be learned from this? Be patient and
be sure of what you are doing before acting.

The thing is, I used to get by wielding a giant hammer but I need to be more
comfortable with the scalpel. If I had just taken the time, talked to people
who knew the issue, and acted with a bit more foresight I could have saved
myself much gnashing of teeth. I chose an engineering example as I tend to like
thinking with that discrete mindset, but the lesson should be applied
elsewhere. The problem with impatience is its side effect, anxiety. I have been
kind of obsessed with grand schemes that can be rapidly achieved. Then,
inevitably, when things begin to drag I grow agitated that my plans are not
proceeding with the rapidity I prefer. Take my house hunt for example. Many
dreams, little progress in resolving them. I could buy a house tomorrow, but,
given the options available now, it would be a poor call. Rationality in
conflict with impatience creating anxiety.

Not sure how to resolve the quandary. Engineering-wise the solution is
simple: be more deliberate in action. I should work harder to understand the
systems I work with and only make the smallest possible changes at a time.
Personally though it gets harder to fix. If I do all I can to achieve something
and yet it remains unachieved the only result can be frustration. The beauty of
software is understandable systems where input produces expected output. When I
expect the same from the world disappointment will abound. Impatience is just a
byproduct of this unfortunate truth. It is as if I am desynced from reality,
like we are running on separate clock cycles. I expect one
speed of progress and get another. In time I hope to sync up, but until then I
remain impatient.

Aside: I goggled this title before using it and seems I was not as clever
as I thought
. A regrettably common occurrence. I still like it though so I
am going with it.

Categories
TIANSTL Video Games

Things I Am Not Supposed to Like:Katawa Shoujo

Starting a new series if you will about things I am not supposed to like
because people tell me otherwise. The series starts with a photo.

LillyCosplay

This a picture of Lilly from Katawa
Shoujo
a free visual novel novel. She is appropriately enough waiting in
line for a tea sampling. Neither she nor I got into the room, but that is not
the point. What motivates someone to cosplay as such an obscure character? I
have seen two Lilly cosplays in my life and barely anyone recognizes them. This
is from a game that has no retail release, had no marketing. A game whose
popularity is purely through the words of others. And yet here she is. If that
is not all the indication you need that is game is special, I doubt my poor
skills at wordsmithing will convince you otherwise.

This game is unique in its ability to capture moments. You have a game like
Call of Duty that can very skillfully capture a feeling. COD makes you feel
tense, or excited, or angry, but has it ever captured a quiet moment? Some of
Bioware’s offering get close, but all these big budget triple A games fail
again and again to capture the moment. What do I mean when I say this? A
moment, as defined here, is a single interaction between people. A moment is
not bombastic, its not life changing, its just people talking, just
conversation. Here is
a perfect example. It is not special, nor unique, but its eight minutes and 54
seconds of a dozen or so people’s lives. Its raw, its unscripted, its life.
This is a moment and Katawa Shoujo is a game that captures these interactions
between its characters better than any other game. There is a clarity to
dialogue that makes the interactions seem so natural, so unforced. That is why
I love this game so much. Who cares that it is anime inspired, or a dating
game, or a made by a bunch of people from 4chan. This game offers the greatest
thing any form of media can give: a brief look into the lives of others. Is
that not what anyone wants? Some games are empowering, they make you feel
things. To be fair this game makes you feel a lot of things, but that is not
the point here. The point here is to see a person’s life over a few months.
That is unique amongst video games, it is awesome, and it is why I love this
game despite what others thing.

Categories
Cosplay

Melting Metal:Attempt 1

A little while ago I read a how to on melting
metal in a microwave. So having more money and time than sense I figured it was
worth a shot.

First I needed some safety equipment for this job:

Here we have some metal tongs for grabbing the dish the metal is going to
melt in, some gloves that can hold hot things, and a face guard to prevent
molten meal from showering my pretty boy looks.

Now here is the general setup:

Microwave plenty of distance from anything that can catch fire, safety
equipment ready to go, and a fire extinguisher in case things get out of hand.
As per the instructions I fashioned a brick kiln in the microwave. The brick under the steel bowl is
silicon carbide and should provide a nice hot surface to warm the bowl.

In addition I sealed off the entry and exit vents of the microwave to try
and get the inside as hot as possible. We do not want our hot air flowing out
the back.

Bricks with holes in them was not ideal, but it was what I had to work with.
The metal to melt is zinc:

Yup, I hand cut that with a hacksaw and it took a ton of time to do. The
melting temperature of zinc is 786.2°F. Supposedly the max temperature you can
achieve using this microwave strategy is 900°F-1000°F so it should be possible
to get the metal up to melting temperature. Fumes from molten zine are
relatively harmless, but if you breathe too much it is possible you can get
metal fume fever.
The long term effects are negligible, at most it seems to produce flu like
symptoms for a few days. Here is a material safety data
sheet
if you want to know more. Of course we are going to need a mold for
our molten metal:

A bit rough, but should work. This mold is made out plaster of paris with
wood blocks to give the plaster a form to mold around. Of course I broke it
getting the wood out so its been put back together and secured with a rubber
band. Nothing else to do but fire it up and wait. I turned on the microwave for
about an hour and here is the result:

buttons…

I was unable to achieve a high enough temperature. The metal and bricks were
certainly too hot to handle, but I had no temperature gauge so I have no idea
how off from the melting point I was. A couple things contributed to this
failure:

1. After 30 or so minutes the microwave front became loose reducing its
ability to build up heat inside.

2. I did not make a full kiln with the bricks, and the bricks I did have had
holes in them making it harder to build up heat in there.

3. The microwave I was using was $5 and was made in 1993, it is possible it
just does not have enough power to build up the heat I need. Over time the
magnetron inside the microwave will weaken based on how much use the microwave
gets. Since I have no idea how intensively this 21 year old microwave was used
this may or may not have started to happen.

4. It was quite a hefty chunk of zinc. Perhaps things would work better if I
had a smaller block.

So things were a bit of bust, but I have not given up yet. I may try again
once I get some more bricks to build a better kiln. A better microwave might be
found at a yard sale or I might try doing this the old school way with
charcoal. It might also be good to try and get a baseline for this by melting
something with a really low melting point like solder (370°F).