<CharlieDigital/> Programming, Politics, and uhh…pineapples

11Nov/140

Indoor Rock Climbing – Try It!

Posted by Charles Chen

One of my recently discovered activities that I'm falling in love with is indoor rock climbing (though I suppose I may try outdoor rock climbing and bouldering one day, too).

In a weird way, it's the ultimate thinking person's type of sport that is physically demanding, but also mentally challenging as well.  Climbers like to talk in terminology like "problems", "projects", and "solutions" and it's entirely accurate and applicable way to describe what climbing is all about.  If you walk into a bouldering area in a gym, you will see climbers just sitting around, planning routes, thinking about how to position their bodies to make the right move and attacking routes over and over again.  Difficult routes demand that you plan and think about how you can make your way up a vertical face while expending the least amount of energy.

It's odd, but I also think that it's a very "romantic" (or "bromantic"?) activity because you'll have the most fun climbing with someone else.  There is a lot of communication and trust involved when one person is controlling the safety and well-being of another person suspended 40 feet in the air.  For that same reason, it's a great team building activity for companies because to climb, you need to be able to work together, communicate, and have trust in your partners.

To get started, you can look up Google Maps and find some nearby rock climbing gyms and just call and take a class.  I took my first class at Rockreation in Costa Mesa, CA where you had to schedule ahead and the classes are far more formalized, but there are also places like Rockville back home in NJ, where the classes are much more informal and you can just show up and take a short intro class.

Most intro classes will teach you the basic elements of indoor climbing:

  • Using harnesses and shoes
  • Basic double-figure-8 knot tying
  • Belaying
  • Basic safety including verbal commands and communications.

But in looking through some videos, I've found that there is LOT more to learn and I've developed an even deeper appreciation for it. Take a look for yourself:

Five Fundamentals of Indoor Rock Climbing

How to Grip Indoor Climbing Holds

Footwork for Climbing

Five Advanced Bouldering Techniques

What I hope that you can get from this is that there is a real art to this that is beautiful to watch in action.  In that last video, the Bat Hang at 1:45  is a thing of beauty.  Seasoned climbers make it look easy, but it really takes a lot of practice, experience, and creativity to move around like Cliff Simanski does in the video.

Charlotte and Sandra working a wall.

Charlotte and Sandra working a wall.

I've also learned that I've been wrecking my forearms because I've basically been muscling my way up the walls with my upper body strength alone.  A strong grip and upper body are certainly beneficial for climbing, but you need far more than that to advance in the sport.

In a sense, rock climbing has a lot in common with dance or gymnastics: it demands creative body movement, flexibility, balance, body awareness, and spatial awareness (maybe even more so because your life is on the line in some cases).

It's a great activity for kids of all ages (Charlotte is 3.5 years old) to enjoy.

27Feb/14Off

DEATH TO INFOPATH!

Posted by Charles Chen

There are few technologies that I truly hate and InfoPath is right up there.  The problem isn't necessarily InfoPath itself (okay, yes, I do hate it and it sucks hard), but the misconceptions from many former and current customers and business users about the utility and suitability of InfoPath cause it to be deployed in a variety of situations where it has no business being in a web-based enterprise architecture.

It's a technology that has been oversold and over-promised but always under-delivers and "enterprise architects" love the stuffin's out of it for some reason without a real grasp on why it's such a lame, terrible technology.

Now it seems that it's reached the end of the line:

In an effort to streamline our investments and deliver a more integrated Office forms user experience, we’re retiring InfoPath and investing in new forms technology across SharePoint, Access, and Word. This means that InfoPath 2013 is the last release of the desktop client, and InfoPath Forms Services in SharePoint Server 2013 is the last release of InfoPath Forms Services.

Microsoft makes many great things like .NET and Visual Studio and some total duds like InfoPath (a solution looking for a problem).

This is my favorite part of the blog post:

Industry trends and feedback from our customers and partners make it clear that today’s businesses demand an intelligent, integrated forms experience that spans devices. We are looking to make investments that allow you to easily design, deploy, and use intelligent, integrated forms across Office clients, servers, and services—forms that everyone can use on their PC, tablet, or phone.

Hey Microsoft, here's a tip for you: HTML!  What took you so long?  I mean, holy smokes, why did you even waste the money to conceive of InfoPath Forms Services to convert InfoPath forms into HTML in the first place? Why did you even bother with forcing developers to build forms in some terrible designer with a terrible programming experience only to convert those forms right back into HTML so that people could fill it out?

Any idiot could have seen the utter uselessness and un-ceremonial end of InfoPath years ago.

Filed under: Awesome, Office No Comments
26Dec/13Off

Setting Batch Variables Dynamically

Posted by Charles Chen

One of the challenges of managing builds and deployments of source on multiple developer machines is that it can be complicated to contain and manage different variations in developer environments.

For example, often times, it is useful to know the server name or the connection string information so that local settings don't make it into source control.

How I've often tackled this is to add a batch file that every developer executes when getting the source for the first time.  This batch file asks for various settings and then saves the results to a text file which is then read back when executing other batch files.

Here is an example of such a batch file:

@ECHO OFF

ECHO ================================================================
ECHO Creates the developer specific local configuration for builds
ECHO that will allow developers to use local settings for specifc
ECHO aspects of the deployment.
ECHO ================================================================

:SPURL
SET SPURL=
SET /P SPURL=Enter SharePoint site URL (ex. http://mymachine:2345/): %=%
IF "%SPURL%"=="" GOTO SPURL

ECHO ----------------------------------------------------------------

:SQLCONN
SET SQLCONN=
ECHO Enter SQL connection string to the IC membership database 
ECHO (ex. Server=VM1;Database=IPDB;User ID=membershipUser;Password=P@ssw0rd;Application Name=HeCoreServices):
SET /P SQLCONN=
IF "%SQLCONN%"=="" GOTO SQLCONN

ECHO ----------------------------------------------------------------

ECHO SPURL=%SPURL% > build-configuration.txt
ECHO SQLCONN=%SQLCONN% >> build-configuration.txt

ECHO Completed; created file build-configuration.txt

PAUSE

This batch file will prompt the developer for two settings: the URL of a site and the connection string that the developer is using locally (which can vary by the database name, login, etc.).  The contents get written to a file called build-configuration.txt that looks like this:

SPURL=http://mymachine:2345
SQLCONN=Server=VM1;Database=IPDB;User ID=membershipUser;Password=P@ssw0rd;Application Name=HeCoreServices

This file is excluded from source control and developers can, of course, manually edit this file as well to create local settings.

Now when I'm ready to use these settings in another batch file, I can invoke it like so:

@ECHO OFF

SETLOCAL ENABLEDELAYEDEXPANSION

FOR /F "tokens=*" %%n IN (build-configuration.txt) DO (	
	ECHO %%n

	SET %%n
)

ECHO %SPURL%
ECHO %SQLCONN%

PAUSE

There are other ways to do this as well, but the downside to most approaches is that you have to know how many parameters you have or use less meaningful names.  This approach will let you set variables to your heart's content and read them in dynamically at execution.

Filed under: Awesome, Dev, Self Note No Comments
12Nov/13Off

An Architecture for High-Throughput Concurrent Web Request Processing

Posted by Charles Chen

I've been working with ZeroMQ lately and I think I've fallen in love.

It's rare that a technology or framework just jumps out at you, but here is one that will get your head spinning on the different ways that it can make your architecture more scalable, more powerful, and all the while offering a frictionless way of achieving this.

I've been building distributed, multi-threaded applications since college, and ZeroMQ has changed everything for me.

It initially started with a need to build a distributed event processing engine.  I had wanted to try implementing it in WCF using peer-to-peer and/or MSMQ endpoints, but the thought of the complexity of managing that stack along with the configuration and setup seemed like it would be at least fruitful to look into a few other alternatives.

RabbitMQ and ZeroMQ were the clear front-runners for me.  I really liked the richness of documentation and examples with RabbitMQ and if you look at some statistics, it has a much greater rate of mentions on Stack so we can assume that it has a higher rate of adoption.  But at the core of it, I think that there really is no comparison between these two except for the fact that they both have "MQ" in their names.

It's true that one could build RabbitMQ like functionality on top of ZeroMQ, but to a degree, I think that would be defeating the purpose.  The beauty of ZeroMQ is that it's so lightweight and so fast that it's really hard to believe; there's just one reference to add to your project.  No central server to configure.  No single point of failure.  No configuration files.   No need to think about failovers and clustering.  Nothing.  Just plug and go.  But there is a cost to this: a huge tradeoff in some of the higher level features that -- if you want -- you have to build yourself.

If you understand your use cases and you understand the limitations of ZeroMQ and where it's best used, you can find some amazing ways to leverage it to make your applications more scalable.

One such use case I've been thinking about is using it to build a highly scalable web-request processing engine which would allow scaling by adding lots of cheap, heterogeneous nodes.  You see, with ASP.NET, unless you explicitly build a concurrency-oriented application, your web server processing is single-threaded per request and you can only ever generate output HTML at the sum of the costs of generating each sub part of your view.  To get around this, we could consider a processing engine that would be able to parse controls and send the processing off -- in parallel -- to multiple processors and then reassemble the output HTML before feeding it back to the client.  In this scenario, the cost of rendering the page is the overhead of the request plus the cost of the most expensive part of the view generation.

The following diagram conceptualizes this in ZeroMQ:

zmq-processing

Still a work in progress...

Even if an ASP.NET application is architected and programmed for concurrency from the get-go, you are limited by the constraints of the hardware (# of concurrent threads).  Of course, you can add more servers and put a load balancer in front of them, but this can be an expensive proposition.  Perhaps a better architecture would be to design a system that allows adding cheap, heterogeneous server instances that do nothing but process parts of a view.

 In such an architecture, it would be possible to scale the system at any level by simply adding more nodes -- at any level.  They could be entirely heterogeneous; no need for IIS, in fact, the servers don't even have to be Windows servers.  The tradeoff is that you have to manage the session information yourself and push the relevant information down through the pipeline or at least make it accessible via a high speed interface (maybe like a Redis or Memcached?).

But the net gain is that it would allow for concurrent processing of a single web request and build an infrastructure for handling web requests that is easily scaled with cheap, simple nodes.

Filed under: .Net, Awesome, ZeroMQ No Comments
19Sep/13Off

The Nuclear Arms Race and Deep Space Exploration

Posted by Charles Chen

Wired has a fascinating article which focuses on the world's dwindling supply of plutonium-238, a veritable super fuel in the field of deep space exploration:

In 1977, the Voyager 1 spacecraft left Earth on a four-year mission to explore Jupiter and Saturn. Thirty-six years later, the car-size probe is still exploring, still sending its findings home. It has now put more than 19 billion kilometers between itself and the sun. Last week NASA announced that Voyager 1 had become the first man-made object to reach interstellar space.

None of this would be possible without the spacecraft’s three batteries filled with plutonium-238. In fact, Most of what humanity knows about the outer planets came back to Earth on plutonium power.  Cassini’s ongoing exploration of Saturn, Galileo’s trip to Jupiter, Curiosity’s exploration of the surface of Mars, and the 2015 flyby of Pluto by the New Horizons spacecraft are all fueled by the stuff.

But there’s a problem: We’ve almost run out.

Most of the US supply of plutonium-238 was a byproduct of producing bomb-grade nuclear material.  Nowadays, the material is in incredibly short supply with demand, unyielding.

Of course, we have the capability to make more, except for the reality that pitiful funding that is required has been so difficult to obtain:

Since 1994, scientists have pleaded with lawmakers for the money to restart production. The DOE believes a relatively modest $10 to 20 million in funding each year through 2020 could yield an operation capable of making between 3.3 and 11 pounds of plutonium-238 annually — plenty to keep a steady stream of spacecraft in business.

It took countless scientists and their lobbyists more than 15 years just to get lawmakers’ attention. Congressional committees squabbled over if and how to spend $20 million of taxpayers’ money — it took them three years to make up their minds

Any hiccups in funding for plutonium-238 production could put planetary science into a tailspin and delay, strip down, or smother nuclear-powered missions.

Support science and share this story!

Filed under: Awesome, Science No Comments
7Nov/12Off

The Real Reason the Republicans Lost

Posted by Charles Chen

 

While there has been a lot of chirping about the shifting racial makeup of Americans, Republicans already have a very big problem that crushes any discussion of the Latino or minority vote.

The Latino-American vote issue is going to start to pop up, but states like Texas are in no danger of turning Democratic for at least 4-5 more cycles.  On the other hand, Republicans are losing the battle for women today by a big margin.

The real wakeup call should be Republican messaging and policies when it comes to the female vote -- it's the single largest block of voters by population and participation and it broke for Democrats by 11 points.

Filed under: Awesome No Comments
25Sep/12Off

Obama’s Address to the UN Assembly

Posted by Charles Chen

A great speech; too much to quote:

It is time to marginalize those who, even when not directly resorting to violence, use hatred of America or the West or Israel as the central organizing principle of politics, for that only gives cover and sometimes makes an excuse for those who do resort to violence. That brand of politics, one that pits East against West and South against North, Muslims against Christians and Hindu and Jews, can't deliver on the promise of freedom.

To the youth, it offers only false hope. Burning an American flag does nothing to provide a child an education. Smashing apart a restaurant does not fill an empty stomach. Attacking an embassy won't create a single job. That brand of politics only makes it harder to achieve what we must do together, educating our children and creating the opportunities that they deserve, protecting human rights and extending democracy's promise.

...when you strip all away, people everywhere long for the freedom to determine their destiny; the dignity that comes with work; the comfort that comes with faith; and the justice that exists when governments serve their people and not the other way around.

The United States of America will always stand up for these aspirations for our own people and for people all across the world. That was our founding purpose. That is what our history shows. That is what Chris Stevens worked for throughout his life.

Filed under: Awesome, News No Comments
10May/12Off

BarackObama.com View Source

Posted by Charles Chen

Brilliant!

Filed under: Awesome No Comments
25Mar/12Off

Book Review: 17 Equations That Changed the World

Posted by Charles Chen

What could be more boring than mathematical equations?  The majority of folks would be hard pressed to find something to answer that hypothetical query. Myself included :) I'll be honest, I'm a math minor and I picked up this book on a whim in a bookstore thinking to myself "Now why would anyone want to write or buy a book on 17 equations?" I flipped through it and immediately knew that I had to consume the rest of this book.

What Stewart is able to do is to take these 17 equations that manifest in everything we do, everything we observe, everything bit of space around us and bring life to them. He presents the opening of each chapter with a concise summary of these equations that helps immensely in revealing the underlying nature of the equations and then goes into the history of the creation (discovery?) of each of these equations and it's been an eye-opening read.

As an example, having majored in computer science, I worked constantly with logarithms and natural logs (there's lumber joke here somewhere) but never once understood the nature of logarithms. How did they come about? Why do they exist? What problem do they address? Just what in the heck is a logarithm? I knew them only in the abstract -- as operations that yielded a result; I knew them as a general pattern but not the nature of the logarithm. The second chapter simply blew me away with the clarity and simplicity with which Stewart was able to pull back the covers on what logarithms actually mean. No one in my years of formal education had bothered to explain it in the same way that Stewart does in this book.

While I cannot say that this book is for everyone, I will say that I find it is surprisingly approachable for most folks who are scientifically or mathematically inclined. Certainly, there are many equations and plenty of mathematics (and it gets especially complex (pun intended :) in the later chapters. However, I think this book is still immensely readable and approachable, even for those who have never ventured deep into the vast field of mathematics or have long moved past their days of calculus, linear algebra, and so on. I, for one, will make sure that my daughter reads the chapter on logarithms as it starts to seep into her curriculum one day to make sure she understands the "why" and so that she has an appreciation for all of the history and magic behind that little "log n" button on her calculator.

This book is incredibly well written, well presented such that it is approachable for a large audience, an entertaining read, and highly recommended. If you've read this review to this point, you should probably just go ahead and by this book!

22Feb/12Off

The ESAM 5600 Arrives!

Posted by Charles Chen

Ever since my trip out to Switzerland, I've been jonesing for an espresso machine.  After a lot of research, checking out lots of youtube videos, almost pulling the trigger various times, I ended up purchasing the DeLonghi ESAM5600 SL from JL Hufford.  I briefly considered Nespresso machines, but without recycling centers nearby, it seemed like very wasteful and not to mention the cost of the pods would be expensive over the lifetime of the machine.  Besides: I like to be able to choose my own beans.

We'll see how this DeLonghi holds up over time.  I expect to get a lot of use out of it :-D

Filed under: Awesome No Comments