Friday, 1 April 2016

Android Unit Testing

The Gradle Plugin supports two different types of tests.

Unit Testing is supported by locating all classes under the path src/test/java and any dependencies defined within the module gradle build file e.g. testCompile based dependencies.

Instrumented Tests covers all tests that are intended to be run against the app within the emulator or live device. These test classes by default are located under src/androidTest/java and have corresponding module dependencies e.g. testAndroidCompile

Unit tests can be run in one of two ways depending on context.

Command Line from the command line, the Gradle task test can be used to run and generate a report of the test results.

bash gradlew test; open app/build/reports/tests/debug/index.html

From the IDE from within IntelliJ or Android Studio the unit tests can be run by:

  • Select "Build Variants" from left tray
  • Select Test Artifact = Unit Tests
  • Run indiviual or groups of tests as usual

.

Tuesday, 23 February 2016

Twinkies

An interesting question: how do we convert energy into Twinkies?

Calories into Joules

Reference

"The calorie, is defined as the amount of heat energy needed to raise the temperature of 1 gm of water 1 C°."

The "calorie" commonly used in measuring food energy is actually the kilocalorie, or Kcal for short. Thermodynamic measurements tell us that one calorie = 4.186 joule.

One Kcal = 1000 cal = 4168 joules.

So, for example, a Hostess Twinkie with 200 calories contains 200 X 4168 = 833,600 joules

Energy in a Twinkie

Reference

One piece is 135 kcal, weighing 1.4oz (39.689g):

135 * 4186 = 562,680 joules of energy

Dimension of a Twinkie

Dimensions:

  • Width: 1.1 inch (2.794 cm)
  • Length: 3.9 inch (9.906 cm)
  • Depth: 1.5 inch (3.81 cm)

Volume (m3) W x L x H

0.02794 . 0.09906 . 0.0381 = 0.000105451 m3

Energy per volume (joules/m3)

One Twinkie contains 562680 joules in a volume of 0.000105451 m3

So we can see that 9483 Twinkies fill 1 m3 and that that 1 m3 contains 5,335,938,018 joules of energy

Size/Weight of Twinkie for given energy in Joules

Next question is, how do we for a given energy in joules scale the Twinkie to the corresponding size? Doing this algerbraically will involve calculus. There are two simple options however:

  • cube-root volume for an evenly sized object: 0.000105451 m3 = 0.047244388721775 m per side (4.7 cm per side)
  • Next simplest is to brute force with spreadsheet.

Full size

Download: Excel Spreadsheet

This gives us the a reasonable order of magnitude figure to use when comparing energy to size of Twinkie.

Useful links

Convert large numbers into words: Number Converter

Thursday, 14 January 2016

Smart Parts to Orbit

The question to answer was, is it possible to automate a launch vehicle using Smart Parts?

Craft: Automatic Launch

0.8 ton relay satellite delivered into a circular orbit

As you might expect, it is possible to automate the launch. We will attempt to cover the detail of the considerations for the design of the launch vehicle and the kind of launch profile needed to get into orbit.

The end result of this is that from the launch pad, all that is required to get into orbit was:

  • Enable SAS
  • Stage
  • Set SAS to Prograde

The rest of the sequence is entirely automatic and will deploy the payload into a fairly tunable orbit.

However there are some caveats. The launch vehicle will require extensive testing to ensure the timing is correct, and in addition I found in testing that getting two completely consistent launches was not possible. There appears to be minor variations in each launch, perhaps due to the physics processing or some other subtlety.

Requirements

Launch Profile

The launch profile is a gravity turn which aims to be reasonably efficient. It is made up of three separate burns:

Initial: Full power burn at a slight angle to start the turn.

Middle: Moderate power long duration burn continues gravity turn to orbital altitude

Circularise: Full power burn adds enough horizontal velocity to circularise orbit

Using a gravity turn like this allows us to automate the launch with no input from the user.

Launch Vehicle Requirements

The launch vehicle must be aerodynamically stable. With fins at the rear and a simple balanced design ensures that it will remain stable throughout the flight. The first two burns could actually be performed with no stability control at all. Only the last one requires that we use Prograde SAS.

The payload mass in the demonstrated craft is small, to lift a larger load would require a larger launch vehicle but would follow the same principles. In this case the payload is close to the maximum this launch vehicle could lift. Switching to Liquid Fuel engines would improve efficiency.

Initial Burn

The launch vehicle should be set at a slight incline. This is achieved in the VAB by selecting the craft, and holding Shift + D to tilt the craft in small increments. Two increments is optimal. Use the support towers to hold the craft at this angle for launch.

Launch Vehicle at slight incline, ready to launch - Full Size

Attach a timer to the last stage of the craft which is in the first staging group. This timer will trigger staging of the circularise burn later. About 4 minutes, tune to launch vechicle

The launch burn I found worked best with Solid Rocket Boosters (SRB), 4 x Hammer at 100% thrust worked well for a small payload. The SRB's should jettison once spent with separators.

Trigger staging with the fuel sensor

Use timer trigger set for about 4 minutes to trigger staging

Set SAS on, and to Prograde. Stage to launch.

4 SRBs take us up to about 5km - Full Size

Middle Burn

Middle Staging triggered - Full Size

The next burn immediately follows the initial and is a longer duration, lower thrust burn. This has to do the rest of the work of lifting the mass out of the atmosphere. It needs to be long enough for the gravity turn to slowly curve the orbit into a useful ballistic orbit with an apoapsis of 70km or more. Too low thrust and the vehicle will not gain enough height and burn up. Too much and there will not be enough horizontal speed for the final burn.

Middle stage sub-orbital burn to 70km+ - Full Size

The burn can finish before the craft reaches apoapsis however it is recommended to jettison the spent stage before the final burn so that the final SRB is clear to fire.

Trigger staging with fuel trigger

Middle stage complete and separation - Full Size

Circularise Burn

Coasting to final burn - Full Size

Now the craft is coasting towards apoapsis waiting for the Timer part to trigger. The important detail here is that we have used SAS set to Prograde to keep the craft aligned with the prograde vector.

Timer triggered Circularising burn - Full Size

When the timer elapses, the final SRB will fire (15g of force, not recommended for crew) and propel the payload to orbital velocity. The fuel amount of this SRB will need to be tuned to the mass being propelled. The SAS control here is crucial (I could find not other way to achieve this without SAS).

When the SRB expires it needs to trigger an action group which will trigger the parts of the payload that need to be activated. Separator, solar panels, antennas etc are all ideal to trigger in this last group. In the example I used the "Lights" action group but any other would work as well.

Fuel Sensor to trigger final action group

Circularising burn complete, jettison stage and deploy payload - Full Size

We now have deployed the payload to orbit.

A roughly circular orbit - Full Size

Testing and Tuning

The most fiddly part of this processes is the testing and tuning and requires a number of test launches to perfect.

In the example the payload weighs 0.8 tons.

Initial: 4 x Hammer SRB @ 100% thrust

Middle: 1 x Thumper SRB @ 62% thrust

Circularise: 1 x Hammer SRB @ 100% thrust (275 out of 375 fuel)

Timer Trigger: 3 minutes 45 seconds

The variable parts are:

  • Middle thrust: Scaled to lift TWR for gravity turn
  • Circularise fuel: Scaled to payload mass lifted
  • Timer: Based on all of above

Appendix

One aspiration I had for this approach was that I would be able to create repeatable launches for the purpose of launching satellites to make up a network for RemoteTech. However I found that even with automated launches, there was a surprising amount of variability in the final altitude of the probe.

Friday, 23 October 2015

Artemis SRB Lifter

Craft: Download

Cost per launch: 42K

Weight Limit: 15 tons

In an attempt to produce a lower cost lifting vehicle, this lifter is capable of reliably lifting 15 tons to LKO. Based around two stages of SRB for the main work, and a liquid fuel upper stage to complete orbit, or perform a trans-lunar injection if the load is less than 15 tons.

Complete with a suitably Greek God name too!

Wednesday, 20 May 2015

10 Overlooked Truths About Taking Action

This felt an important article, so I'm preserving a copy of it.

May 19, 2014

Editor’s Note: This is a guest post from Kyle Eschenroeder.

“This is a holy moment. A sacramental moment. A moment in which a man feels the gods as close as his own breath.

What unknowable mercy has spared us this day? What clemency of the divine has turned the enemy’s spear one handbreadth from our throat and driven it fatally into the breast of the beloved comrade at our side? Why are we still here above the earth, we who are no better, no braver, who reverenced heaven no more than these our brothers whom the gods have dispatched to hell?”

In this speech from Steven Pressfield’s gripping, well-researched re-telling of the Battle of Thermopylae (Gates of Fire), the Spartan King Leonidas addresses his troops after a victory. He is reflecting on the fact that when you do battle in chaos, Lady Fortuna and skill have an equal say in the outcome. Pressfield explains this dynamic in his equally worthwhile non-fiction work, The Warrior Ethos:

“In the era before gunpowder, all killing was of necessity done hand to hand. For a Greek or Roman warrior to slay his enemy, he had to get so close that there was an equal chance that the enemy’s sword or spear would kill him. This produced an ideal of manly virtue – andreia, in Greek – that prized valor and honor as highly as victory.”

Andreia meant that judgment was based on actions taken — not outcomes. Society understood that the outcome was, at least in part, in the hands of the gods. What was in a man’s control was how he acted.

We tend to mix this up. There is an army of authors studying “successful” people and writing lists of 5, 7, 10, or 20 things that they did to become successful. All you have to do is emulate the list and you, too, can be successful.

That’s like looking at the living Spartan soldiers and explaining why they survived. Leonidas would laugh at their idiotic arrogance.

We have become so focused on results that our actions have become a secondary concern. We judge men based on what they have instead of what they do. We signal our ideals instead of embracing them.

In his short book Do the Work, Pressfield relates a New Yorker cartoon that cleverly skewers our preference for thinking about things, rather than doing them:

“A perplexed person stands before two doors. One door says HEAVEN. The other says BOOKS ABOUT HEAVEN.”

He’s perplexed. He’s considering the book. It’s funny because it’s absurd… and because we know we’d have the same consideration.

That’s where we are as a culture. We run desperately to abstraction and avoid action at all costs. Thoreau’s man of “quiet desperation” has never been so prevalent.

The world is full of men who are “stuck” in life. There has been some mass paralysis. Modern man has forgotten how to take action.

The culture is beginning to shift, though. The popularity of Nassim Taleb and his Incerto series, beginning with Fooled by Randomness, has brought an appreciation of randomness to a large segment of society. As we’ll see soon, a focus on action is dominating the business world as well.

The economist and author of Average is Over, Tyler Cowen, agrees:

“The more information that’s out there, the greater the returns to just being willing to sit down and apply yourself. Information isn’t what’s scarce; it’s the willingness to do something with it.”

A world that is increasingly confused, uncertain, and paralyzed is calling out for men of action. We need to stop thinking and start acting. Stop looking at the big red button and push it. Stop planning and take a step forward. Stop talking about grit and take a hit.

In short, the world needs men. I’m not sure if you’ll answer the call. I do know some will, though, and that’s all we need. I’ll be out there, too. You’ll probably find me facedown in failure. I’d appreciate a hand.

The next section will provide 10 powerful and mostly overlooked truths about the nature of action.

The final section will provide two specific practices that will force you into creating a habit of taking action.

Your next action? Continue reading.

10 Overlooked Truths About Taking Action

1. Action is Cheaper Than Planning

Do you know why the Wright Bros. beat out all the mega-corporations they were competing with in the race to taking the first flight? Action.

Robert Greene explains in Mastery that the Wright Bros. had a tight budget and were forced to make small, cheap tweaks to each model. They would fly a plane, crash it, tweak it, and fly it again quickly.

The corporations had budgets that allowed them to go back to the drawing board (i.e. abstraction) with each failure. They spent a ton of money and time on each redesign.

The Wright Bros. had a hundred test flights in the time it took these big corporations to complete a handful. Every test flight taught lessons – the one who failed fastest gathered the most information.

This philosophy of failing fast has spread through Silicon Valley and beyond thanks to Eric Ries’ work The Lean Startup. We can imagine the Wright Bros. writing this passage from Ries’ book:

“I’ve come to believe that learning is the essential unit of progress for startups. The effort that is not absolutely necessary for learning what customers want can be eliminated. I call this validated learning because it is always demonstrated by positive improvements in the startup’s core metrics.”

Technology has reached a point where building is often cheaper than planning. We can build the thing and know the answer before we can plan for all the possibilities and determine how it might work. Ries writes:

“The question is not ‘Can this product be built?’ In the modern economy, almost any product that can be imagined can be built. The more pertinent questions are ‘Should this product be built?’ and ‘Can we build a sustainable business around this set of products and services?’”

These are questions that cannot be answered in the abstract – they must be tested in the physical world.

The key is to make the tests cheap and quickly make small improvements.

This applies to everything. Especially your life.

Planning has paralyzed me time and again. I was taught to always have a plan before taking action.

That led to a deep depression. I didn’t know what career I wanted to dedicate my life to and so I did nothing. I didn’t know what girl I wanted to marry and so I didn’t give any a real chance. I didn’t know what fitness plan was the best and so I stayed out of the gym.

Now I do the opposite.

I don’t let myself plan or research until I’ve taken action.

I’ve tried a ton of careers and found which I hate and which I love. I’ve let myself love the imperfect girl and have the best relationship I’ve ever had. I’m not allowed to read anything about fitness until I’ve worked out that day. I don’t let myself learn about a new diet until I’ve stopped eating sugar.

Most of the time, planning is procrastination. It’s based on theory. It’s going to be wrong.

Plans are useless without action.

That’s why Step 1 is to take action based on what you already know. Then improve bit by bit. Then begin forming a plan.

2. Action Allows Emergence

Taking action creates possibilities that didn’t exist before.

We always look out at our future from the place we’re standing. Yet we forget that this is only one spot.

Imagine walking in New York City. All you can see are skyscrapers, neurotic humans, and taxis. You turn down the next street and you’re looking out into the trees of Central Park.

A completely new possibility has emerged.

If you’re obese then you probably don’t see a possible future where you’re fit. But, after three months of working out and eating well there will be a possible future of physical fitness that didn’t exist before.

These possibilities seem to “come out of nowhere” but they actually come out of action.

If you’ve only failed then it’s impossible to see the possibility of success. The trick is to keep trying. That next step might be the key to a better future — you just can’t see around the corner yet.

3. Inaction is Scarier

The pain of action is acute. It’s right in our face.

Inaction tempts us because it’s slow.

We don’t consider refusing to choose to be a choice. We think we’re safe if we don’t expose ourselves to failure. We don’t appreciate the consequences of inaction because they are slow, chronic, and less obvious. That’s what makes them worse.

You don’t get to escape pain.

The pain that comes with action is acute, gives you scars, and makes you grow.

The pain that comes from inaction is low-grade, makes you soft, and makes you decay.

4. Motivation Follows Action

I had zero motivation when I began writing this. I had nothing to say. I wrote a book about action but for some reason I couldn’t think of the words to tell you.

It’s 1,600 words later now and I can’t stop thinking of new things to say.

It’s always like this.

I don’t feel like working out until I’ve been at the gym for 15 minutes. I’m too tired to have sex until we’ve started. I don’t want to go to the party until I’m there.

Motivation (and passion) will follow you if you have the balls to go without them.

5. Action is an Existential Answer

I’m a professional when it comes to existential crises. I’ve spent a large portion of my life in “what is the meaning of my life?” mode. I’ve come up with a lot of clever answers. Some of them even felt original.

The only one that ever really works is disappointingly simple: do something.

The meaning of my life cannot be summed up in a pithy quote or even the most complete philosophy.

It is impossible to give yourself a satisfying purpose in the abstract.

It is only in the flow of action that life can make sense. There are no abstract ideals there, just life.

6. Action Creates Courage

“Courage is not something that you already have that makes you brave when the tough times start. Courage is what you earn when you’ve been through the tough times and you discover they aren’t so tough after all.” -Malcolm Gladwell, David and Goliath

My business partner and I didn’t charge for anything for more than a year. We gave out some of the best content online and never asked for anything in return.

We didn’t believe that what we had was worth anything.

Intellectually we knew that we deserved to be paid. Something was holding us back, though.

Finally we put down a date. We scheduled a webinar and more than a thousand people showed up.

The webinar was a technical disaster. We started late, laptops went out, our business password was exposed to hundreds of people, and we didn’t know how to run the software. Everything went wrong that could have.

We offered our course for $497 – a price we thought was too high.

It turns out it was too low. We sold more courses than we ever thought we would and, in the process, made more money in a single night than we did in the previous year.

Forcing ourselves into a corner made us ballsier than we thought we could be.

People were amazed at how cheap we offered our course.

Our fake courage became real. Now we know in our bones that we can deliver value to people in a way that they are grateful to pay for it. We know that we are delivering something worthwhile.

Now I’m looking for the next corner. What’s the next abyss to jump into? What is something else I “know” I’m capable of but don’t know I’m capable of?

7. Explanations Follow Actions

Neuroscientist David Eagleman told the participants of a 2004 study to, “Move your finger when the impulse grabs you.” He reports on his findings in Incognito: The Secret Lives of the Brain:

“Long before a voluntary movement is enacted, a buildup of neural activity can be measured. The ‘readiness potential’ is larger when subjects judge the time of their urge to move, rather than the movement itself.”

They made the choice before they were conscious of it.

Earlier in the book he reports on the findings of a study on people playing a gambling game:

“The interesting part came when I interviewed the players afterward. I asked them what they’d done in the gambling game and why they’d done it. I was surprised to hear all types of baroque explanations, such as ‘The computer liked it when I switched back and forth’ and ‘The computer was trying to punish me, so I switched my game plan.’ In reality, the players’ descriptions of their own strategies did not match what they had actually done, which turned out to be highly predictable. Nor did their descriptions match the computer’s behavior, which was purely formulaic. Instead, their conscious minds, unable to assign the task to a well-oiled zombie system, desperately sought a narrative.”

This urge of ours to create cohesive stories where none exist is called the narrative fallacy.

Knowing you have this need should help you act freely when no story exists. Or at least realize that the story you’re telling yourself is probably wrong. Nassim Taleb makes this suggestion in The Black Swan:

“The way to avoid the ills of the narrative fallacy is to favor experimentation over storytelling, experience over history, and clinical knowledge over theories. . . . Being empirical does not mean running a laboratory in one’s basement: it is just a mind-set that favors a certain class of knowledge over others. I do not forbid myself from using the word cause, but the causes I discuss are either bold speculations (presented as such) or the result of experiments, not stories. Another approach is to predict and keep a tally of the predictions.”

When we know our stories are probably wrong we can give them less power. Don’t let your scary stories paralyze you. Act and let the narrative follow (just as courage and motivation do).

8. Action Beats the Odds

“Spartans do not ask how many are the enemy but where are they.” –Plutarch, Sayings of the Spartans

More information rarely helps unless you are ready to act on it. The perfect plan doesn’t exist.

The great Warren Buffett biography The Snowball shows that Buffett had no grand plan when he was younger. He just knew that he wanted to make a lot of money. There was no early master plan, just a powerful urge and the willingness to take opportunities as they came.

The uber-successful venture capitalist Ben Horrowitz says in his new book The Hard Things About Hard Things that:

“Startup CEOs should not play the odds. When you are building a company, you must believe there is an answer and you cannot pay attention to your odds of finding it. You just have to find it. It matters not whether your chances are nine in ten or one in a thousand; your task is the same.”

You don’t need to know if it will work (you probably can’t know), you need to try and find out.

Your obstacles are yours to face. It doesn’t matter how they compare to the obstacles in history or those of your peers. It’s a waste of time to consider anything except how you will overcome them.

9. Action Makes You Humble

Teenagers think they know everything because they haven’t tested their mettle. They don’t know anything and so they feel like they know everything. They are just beginning to learn about theories and possibilities. They haven’t done anything so they feel like they can do anything.

In Gates of Fire, an older warrior, Dienekes, addresses a younger:

“My wish for you, Kalistos, is that you survive as many battles in the flesh as you already have fought in your imagination. Perhaps then you will acquire the humility of a man and bear yourself no longer as the demigod you presume yourself to be.”

Action carries the potential to bring imagination and reality together. But only when taken consistently and powerfully.

After the young realize they can’t do everything they become disillusioned. They stop trying anything. They fall into inaction.

This is why most adults end up so dull. They don’t do anything because it’s probably going to fail. They mistook early failures for a sign that they should stop trying.

That’s why they’re bored, depressed, and lethargic.

Instead, our failures should strengthen us. We should recognize that failures are how we learn and grow.

Just ask, “What would Leonidas think?”

10. Action Isn’t Petty

“Suckers try to win arguments, nonsuckers try to win.” –Nassim Taleb

Action isn’t concerned with opinions, it’s dedicated to reality.

Action doesn’t leave room for gossip.

Action couldn’t be small if it tried.

Practicing Action

Here we will explore (briefly!) two specific ways you can train yourself to take more action.

I. Systems Over Goals

Nassim Taleb offers an explanation to the mental perils of non-linear rewards in Fooled by Randomness:

“Our brain is not cut out for nonlinearities. People think that if, say, two variables are causally linked, then a steady input in one variable should always yield a result in the other one. Our emotional apparatus is designed for linear causality. For instance, you study every day and learn something in proportion to your studies. If you do not feel that you are going anywhere, your emotions will cause you to become demoralized. But reality rarely gives us the privilege of a satisfying linear positive progression: You may study for a year and learn nothing, then, unless you are disheartened by the empty results and give up, something will come to you in a flash. . . This summarizes why there are routes to success that are nonrandom, but few, very few, people have the mental stamina to follow them. . . Most people give up before the rewards.”

If you train yourself to be emotionally rewarded for actions taken rather than outcomes you may be able to lengthen the time you can spend in active “failure” and increase your chances of success.

A possible solution is to reward yourself for following your system rather than achieving a specific outcome. Select a system you know will lead to success and follow it.

Eating right vs. losing 20 pounds. Building a business vs. achieving financial independence. Going on dates vs. having a successful relationship. The first are systems, the second are goals.

Scott Adams, the creator of “Dilbert,” champions this idea in How to Fail at Almost Everything and Still Win Big:

“Goal-oriented people exist in a state of continuous pre-success failure at best, and permanent failure at worst if things never work out. Systems people succeed every time they apply their systems, in the sense that they did what they intended to do. The goals people are fighting the feeling of discouragement at each turn. The systems people are feeling good every time they apply their system. That’s a big difference in terms of maintaining your personal energy in the right direction.”

When I set a goal of “210 pounds and 13% body fat” I stopped going to the gym and began eating stupid amounts of ice cream. When I decided on the system of “work out every day” I began a real path to fitness success.

That’s the easy step. The next is the real challenge.

II. Input Deprivation Week

Go an entire week with zero information consumption.

I first tried this last year and it was wildly successful. I got more done in one week than I had in the month prior. I also ate the best I had all year and solidified my meditation practice. It was so effective I offered it up to the readers of my blog, StartupBros.

Most of the people mocked me or called me naive. A few actually tried it, though. And many of them are still practicing it to this day. It’s the most effective way I’ve found to boost output.

It’s also the most painful.

You are going to, for an entire week, live without information input.

Stay with me on this.

For one week:

  • No reading books.
  • No reading blogs.
  • No reading newspapers.
  • No going on Facebook (even just to post).
  • No watching TV (shows, sports, news, anything).
  • No watching movies.
  • No listening to talk radio.
  • No going on Reddit.
  • No going on Twitter.
  • No information input – only output!

You must force yourself to spend an entire week with yourself and the people immediately surrounding you.

This will, first and foremost, force you into action by stripping away every activity you run to in order to avoid actually doing the work you know you should be doing.

Besides that, it will increase mindfulness, increase the respect you have for your own ideas, you’ll have more ideas, unsolvable life problems may begin to make sense, you’ll have an increased appreciation for the news that actually matters, you’ll become more social, you’ll gain perspective, and you’ll become more original.

It sounds too good to be true but it’s not. It’s what happens. The only way for you to appreciate this is to do it.

When I first suggested Input Deprivation Week I provided the following 5 steps to start strong, and they still work just as well:

  • Install StayFocusd or its equivalent and put all your time-sucking websites on there. ALL of them! Facebook, Twitter, MySpace (??), reddit, Digg (??), Chive, EVERYTHING!
  • Delete your consumption apps. I deleted Facebook, Pulse, and Twitter off my phone. Delete the apps that you reflexively go to when you have a minute of free time.
  • Move your books and magazines. They will just taunt you if they’re sitting on your bedstand or at your desk. Make a stack and put it out of sight.
  • Carry a notebook with you. You’re going to begin having ideas pop up in your head; make notes of them. I like notepads more than phones because we associate them with creating instead of consuming. It’s risky to take notes on a smartphone if you’re trying to avoid inputs.
  • Take the batteries out of your remote. When you have the urge to flick on the TV you’ll have to go get batteries for the remote. This is a barrier to TV that will save your willpower pool from draining as you stare down the remote thinking about all the Game of Thrones and Mad Men you’re missing.

This may be the hardest thing you do all year. The benefits may not be obvious on Day 2. By Day 6 they’ll be undeniable.

Your focus will turn to production instead of consumption. You will become a giver instead of a taker. You will see your addiction to novelty and useless information plainly.

Remember that this is only a week and not a suggestion for a lifestyle. I love books. I love learning new things. I consume information like crazy. And it’s valuable! Input Deprivation Week is about creating a better relationship with information, not denying its importance.

Like a girlfriend that you didn’t fully appreciate until she was gone, your relationship to information will be forever changed. You will appreciate quality information and be more able to ignore the rest. You won’t be an addict to useless information.

If you need any support or have any questions, comment below or even email me (info below).

Godspeed

This was a long post on something that is actually quite simple.

I wanted you to know Action deeply so that you have the confidence to push when others don’t. This isn’t comprehensive, but it is a great place to push off.

Remember:

  • Failing can be progress if you use it.
  • The wisdom you receive from action often remains invisible.
  • Judge yourself based on the actions you take – not their outcomes.

I hope this is the last thing you read for a week.

The Art of Manliness

Copyright © 2015 All Rights Reserved

Sunday, 12 April 2015

Atermis: Networking

In a recent play test the mobile (iOS and Android) clients seemed to crash a lot.

There seems a plausible link between the amount of network traffic and causing clients to crash.

Certainly out of sync packets and poor network code seem like a plausible reason for a crashing client.

The first step in verifying the client instability is to profile the network performance of the game to understand the factors.

Conclusion

The amount of network traffic is directly proportional to the number of entites in the simulation. Lowering the game difficulty and to a lesser extend the number of non ship entities (asteroid, mines etc) will reduce the network traffic. By far the largest contributor to network performance is the update frequency.

Test Setup

Network Traffic was measured on system running Artemis Server.

The variables in the test were:

  • Game difficulty 1, 11
  • Game options (Terrain, Aliens etc) None, Many
  • Network Update 20ms, 250ms, 500ms

Data

1 Client

Network Update 250ms

All Terrain etc options off

Level 1: 3kbps

Level 11: 22kbps

1 Client

Network Update 250ms

All Terrain etc options on

Level 1: 7.5kbps

Level 11: 26.5kbps

1 Client

Network Update 20ms

All Terrain etc options on

Level 11: 250kbps

1 Client

Network Update 500ms

All Terrain etc options on

Level 11: 12.5kbps

Anaylsis of Network Code

The network performance of the Server was measured and found to exhibit consistent behaviour under a variety of game settings. It was also scaled proportionally with number of clients connected which indicates the networking code is simple in its design, probably issuing updates for all game entities on a periodic basis. No compression or encyrption is expected which would alter the traffic characteristics.

Thursday, 28 August 2014

Da Chip

For those that enjoy Daft Punk and 8-bit Chip Tune music, this will be of particular interest.

Da Chip have created some rather excellent covers of Daft Punk tracks and released them on the Internet. They are however somewhat elusive to get hold of, so here is a mirror:

Volume 1

Volume 2