Search

Tuesday, March 28, 2017

New website!

Location: Salt Lake City, UT, USA
I have a new site online at FredericBull.com (redirects from FredBull.com as well).  Unlike the Blogger infrastructure hosting gobbly.net, FredericBull.com is a full application infrastructure under my complete control.  I've already started taking advantage of the possibilities that opens up!

The first thing I did was a write-up on Certificates and PKI, as well as a tool to generate server certificates and CA chains for testing.  I think it's pretty cool.  Not a lot of folks are offering cert generation online for free.  We'll see how much usage it gets and how resource intensive.  Currently it is generating true cryptographic strength keys.  If it gets so much traffic as to be expensive (generating keypairs isn't a cheap task in terms of CPU, after all) I may have to come up with a strategy to pre-gen keys (in which case it won't really be cryptographic quality any longer).  All that said, anyone who is using keys they generated online from anyone but a major public CA, for anything where security is a critical concern, is already failing :)  My certs/keys are meant as testing tools, not production replacements for a real CA (or proper internal PKI controls).

Next item, and what I am currently working on, is a Regular Expression (Regex) section.  Currently all that is up there is an online Java Regular Expression Tester.  It's similar to the others online, form submission, and a report.  I try to give as much info on the results as possible, as well as give examples of code that might produce such output.  I need to work on cleaning up the interface a little, but in general I think it's got some advantages to the others out there.  I also have a strategy for the future that *may* allow me to more closely mimic how the Javascript and PRCE online Regex Testers work.  This isn't easy to do in Java, since no one want's to run java in browsers, if my idea pans out it'll be pretty cool for those who want to work specifically with the Java engine, but also want to maintain the syntax highlighting and other client side features of a javascript implementation.

Sunday, March 27, 2016

Powers of the president

I am tired of hearing rhetoric thrown around by the candidates about what the budget or taxes would be under their presidency. Sure the president can make suggestions, put forth ideas, but ultimately be doesn't get to choose. Congress controls taxes and budgets, they write and pass all laws. Yet candidates constantly profess their opinions and masquerade them, as if they were the decision makers on the topics. The best a president can hope for is a veto.

Wars, tariffs, trade negotiations, pardons, appointments , and carrying out the laws, that's the territory of the president. Perhaps it's time we start discussing those topics more aggressively.

At the same time Congress's ratings are in the toilet, and the whole institution is circling the bowl. All the effort when it comes to taxes and budgets, should be going into holding Congress accountable. There is far more to running this country than 1 person, we do ourselves a disservice by focusing the vast majority of our attention at that 1 person.

Friday, September 4, 2015

Separation of church and state

Location: Boston, MA, USA
The Constitution of the United States of America requires a separation of church and state.

The Supreme Court of the United States of America is charged with determining how the constitution will be interpreted.

In the case of Kim Davis of Rowan County, Ky., the Supreme Court declined to stay the order of a federal judge who ruled that she must issue marriage licenses to same sex couples.  In doing so they uphold their prior ruling that same sex couples must be issued marriage licenses.

This is the supreme rule of our land.  This is not a case of freedom of religion, it is a case of a public servant disobeying the law.

The choices are clear, Kim Davis can choose to follow the law, and by doing so upholding her oath of office, or she can choose not to do so, and resign.  Instead she chose to break the law and deserves whatever legal ramifications that incurs.

This is not a case of freedom of religion, and those claiming it is are either ignorant, or willfully disregard the law.

It's as simple as that.

Thursday, July 30, 2015

Google Play Music

Location: Salt Lake City, UT, USA
About a year ago I was a Pandora user.  You probably know Pandora, the music streaming app, the first of its kind to show that there was a market for streaming music.  As I used it more, the premium version began to make sense.  $4 a month is worth it to not have to listen to advertising and I was always running out of skips with the free version.  And that really spoke to the drawback of Pandora, the content was just to limited.  Rarely could it build a playlist that I didn't want to skip half the tracks, and it was obvious from the frequency of repeats that they simply ran out of things that matched my tastes closely.

Enter Google Play Music (gpm from here on out).  I was aware of it, but had balked at the $10 a month fee.  That's along the lines of what I pay for Netflix...  But a friend at work convinced me to give it a shot, and I am eternally grateful that he did!

First off, every single thing you do on Pandora (and likely every single track you used to listen to) is available on gpm.  You can form channels or listen to pre-made channels (basically radio stations) the exact same way, but the library that is being pulled from is VAST.  You could have several terabytes in your music collection (I did), and the moment you start exploring what is available on gpm you will be humbled.  I can't stress enough the immense size of the library your subscription gives you access to.  In a year of using it I have only found one band it lacked, and that was Tool, which surprised me as I had expected my first miss to be something much more obscure.  However, as I will expound upon below, this was by no means an issue as this is more than just a library riding on a cloud.

They allow you to upload from your own library.  Those Tool tracks I couldn't find, I owned already.  I uploaded them, and problem fixed.  It really was that easy.  When I started they capped out the number of files you could upload, think it was 20-30k or so, but recently they either removed the cap, or set it significantly higher as I've been able to upload far more than 30k tracks.

You can listen to anything anytime you want.  You can skip around in a track, or restart a track and replay a track.  You can build set lists of any tracks you want in any order, to your hearts content.  You can build set lists of set lists.  Really it's as if you owned it all and had a decently slick interface into it.

GPM allows you to download and store tracks locally for offline listening.  If a set list is set to be downloaded, it will auto sync changes when it is online.  I can set it to download everything I care to listen to on my phone and head out into the wilderness and never miss a tune.  This is great when driving long distances outside of towns.  I have yet to run into a cap on the locally stored content, and generally keep 15G+ downloaded by default.

The only drawback I ran into is that there is no easy way to move your Pandora data (all the references you used to create your channels) over to GPM, so when you first start out it may take you some time to setup channels you like and build set lists.  The annoyance, however, disappears within a week after you recreate some channels and build a few set lists.  When you realize how much better it is listening to whatever you want whenever you want!

BTW, since this is the first branded product I have strongly endorsed, it's prudent to point out that I don't get paid for writing anything.  I just post my own opinions.  I enable ads and have made an amazing 2 cents (how appropriate, my .02!) to date.

Sunday, July 5, 2015

Naturalist Basin - Uintas

Location: Naturalist Basin, Uinta-Wasatch-Cache National Forest, Utah 84031, USA
So I have had an absence of recreational posts.  And though I took video of skiing this year, I was still sorta getting my slope legs back and never really had anything worthy of a post.  I will try to put something together and talk about my journey in that arena, but I promise, that will change next year and I will bring some good video and hopefully good stories!

But for now, let me clue you in on my plans through this summer and what the blog can expect in the next few months.

In August I'm going to be packing into the Wind Rivers Range in central Wyoming.  In total we'll spend 8-9 days, hiking in from Green River Lakes, and likely headed toward Titicomb Basin (though the final destination is a work-in-progress).  2/3 of us will have Alpacka packrafts, which for me who's primary goal is great fishing, is really going to be a high point of the trip.

This is a trail I hiked when I was 14, and though it wasn't my first backpacking trip, it was my first trip more than 3-4 days, and was when my love of fishing was truly born.  I plan to relive that experience, 22 years later!

But I haven't backpacked in 10+ years, and I certainly don't feel like hauling 50+ lbs of gear like I did when I was younger.  Add in the packraft; 6 lbs for the raft, 7 oz for the seat, 29 oz for the paddle, and 1 lb for the life vest; and you're close to 10 lbs.  So in the last few weeks I have been replacing the vast majority if my gear with an eye for light.  My goal is to have a pack at 40 lbs, food, water, fishing gear, boat & gear, everything other than what I wear.

To both work on my physique, and to test my new gear, and food ideas, I plan to do 2-4 trips in the interim.  So to kick things off I headed up to the Uintas to Naturalist Basin over the extended 4th of July weekend.  I left from the Highline Trailhead Friday at around 11am.  Looking to push myself a bit more and get more opportunity to test my pack and hiking boots, as well as my navagation skills, I started off trail and meandered from the ridge to the pine forest below and back.  I checked out the two little lakes marked on the map up on the ridge.  One was more of a puddle among the talus, but the other one was a bit bigger.  I watched it for a few minutes, but couldn't spot any fish.  It wasn't very deep, and I doubt many go up there so no reason to stock it.

I kept on going, slower than if I'd taken the trail, but I accomplished all of my goals while in total solitude.  I saw turkey and elk, the latter of which were large, and my first thought was that I had startled a stray horse, but no, it was a large buck, I met up with the Naturalist Basin trail roughly where I had planned, just before a small pond, which again was shallow, and after 10-15 min watching I couldn't spot movement under the surface.

This area is crowded, especially on a holiday weekend.  I ran into several groups hiking down as I was going up, and at the trail fork where there is a large meadow, 4 or 5 different groups were stopped playing in the stream and eating a late lunch.  I made my way quickly for the Blue Lake trail looking to avoid the crowds at Jordan.  It turned out to be a good decision.  There were certainly people around Morat Lakes, but not as many as I had braced for.  I had no trouble finding a camping spot.

The fishing was superb.  Nearly every cast saw action, the majority ending in a fish.  Catch and release with barbless hooks is cake, they never leave the water.  It's trickier to land fish with no barbs though, and a number were able to catch me with enough slack to wiggle off.  I met a nice gentleman the next morning while fishing.  I couldn't quite tell if he just wasn't having luck, or if his complaint was in the size of his catch, but I imagine it must have been the latter as I could hardly do anything to keep the fish off my flies.  As to that, this area does get A LOT of use!  Everything I know about it is that these accessible lakes are basically put and take, and that was my experience.  The larger fish I caught were 12-14 inches.  Was something like 2 brook to probably 50+ tiger.  The brook might have been native, they were good sized for brook, the tiger were almost certainly stocked.  I catch the same exact fish when I go to Mirror Lake.  The gentleman I met hadn't seen Tiger Trout before.  His description: "There is some crazy trout in there, at least I think it's a trout.  It's shaped like a trout, but has this tiger pattern to it."  He said he hadn't been there in 10 years.  I grinned.

That evening, around 5, it started to rain.  Brief 20-30 min torrents at first, broken by 15-20 min spells of sun.  I would run down to the lake, rod in hand, and be on my 4th or 5th fish when the drops would start to fall, and I had about 30 seconds to run to my tend before a full torrent of water rained down.  After 3 or so cycles of this it broke loose and vacillated between rain and hail till long after I fell asleep.  The next morning it was grey and overcast, but no water was falling, so I hastily broke camp and headed out.

Here I will insert a rant.  I am a big proponent of 'leave no trace', or what is becoming known as low-impact.  My goal when I leave a camping site is to not be able to tell it was ever a camping site.  I was quite successful this trip, having used two sites (to facilitate gear testing), and the only way I could tell they had been used when I left was the dry spot where my tent had sat at the second site.  I looked ahead and found that the entire area was restricted for wood collection (due to the high usage, burning all the dead wood leads to nitrogen starvation).  I don't mind that, I like a fire, but doing it with minimal impact is work and I don't want to contribute to issues in this heavily area.  But it often felt like I was the only one.  I saw a number of people out collecting firewood, as well as smelled them in the evenings and mornings.  Another longstanding rule, as far as I know uniform across all forest service land, is no camping within 200 feet of a water source.  The vast majority of people I saw camping were well within 50 ft of a water source, and many were basically on the banks.  One poor guy was setting up in a flood plain for a river, and that night it rained like mad.  I doubt he had any idea that in rain his perfect camp site, 20 feet or so from the river, would be a bog.  I even found a full camp, complete with A-frame structure, woodburning stove, gas grill, and god knows what else they had wrapped up in that mass of tarp they had stored there.  Stocked with several cases of bottled water, and several more cases of beer that looked like they had been gone through by animals as they were strewn all over the place.  In my mind this was wandering into a garbage dump that someone left in a wilderness area.  It made me sick.

I don't say anything to these people.  It's not my job to enforce the rules, and I have as much vested interest in preserving places like these, I am out here for my vacation and to get away from people, the last thing I want is to be looking for confrontations.  I do, however, give feedback to the people whose job it is to manage these places.  And I certainly will be sending coords for the garbage dump I found.

Sticking to the trail it took me 3 hours to hike out what took me 6 hours to hike in off-trail.

In general I was very impressed with the new gear I got.  I was a bit concerned with the sub 2 lb tent I got, but it performed like a champ in the rain and hail.  Everything else worked perfectly.  I was able to identify a few things I really didn't need, especially when it came to fishing gear.  On the food front I was mostly satisfied, however, I will never take hot chocolate mix again.  Apple Cider mix is where it's at!  And I need twice as much of it!  On the water front, my strategy of sticking to 1 liter worked well with foresight.  The same strategy will work perfectly in the Winds, however, I think I will take a second platypus bottle as weather and passes may prevent intra-day management.  Lastly, the Thermarest NeoAir worked better than I expected, it let me setup camp in places I wouldn't have otherwise.  It is so thick that smaller rocks protruding aren't even noticed.

Thursday, June 11, 2015

"Greed is good?"

Location: United States of America


"Greed, for lack of a better word, is good." said Gordon Gekko in Wall Street (1987).  But saying so is disingenuous.  Greed has no motives, no more so than any emotion.  Human beings, and likely every living thing, simply want an easier life, and we have no standard to compare to other than how other people live.  Greed can lead people to do bad things, or good things, and there lies the rub.  It is the people who decide to take actions that lead to positive or negative outcomes.

Capitalism, as we practice it in the US, is a tool.  Just as any tool, it has no motivation other than that which its users ascribe it.  One of the most amazing things about this tool is that it can focus a natural human trait, greed, into socially positive outcomes.  The examples are many, from a private transportation infrastructure that allows global travel within hours, to cleaning products that prevent disease and improve lifespans.  Unquestionably these enterprises produces great wealth as a byproduct of providing those goods and services.

Capitalism can focus greed to produce a positive outcome but a positive outcome is not inevitable.  That, in my opinion, is why Capitalism requires strong regulation.  It is only through strong regulation that positive outcomes are to be expected.  The examples of this are many, from the inevitable fraud and manipulation that result from deregulation campaigns, such as the deregulation of the energy industry in California, to the proliferation of pyramid schemes thinly veiled behind the term 'multi-level-marketing'.

The ability to create positive outcomes is the purpose of capitalism, the generation of wealth is the side effect, an amazing side effect in what it provides for human nature, but a side effect non-the-less.  It is when we begin to believe that wealth creation is the purpose that we risk slowing or halting the progress we have made thus far, and ultimately could lead to the downfall of our civilization.

NIMBY

Location: Marin County, CA, USA
This George Lucas drama is entertaining!  How often do you get to hear millionaires spout such unveiled drivel?  These people who are 'all for affordable housing', but not if it graces their field of view.  Those fantasy bound souls who believe that their hoarded wealth represents a contribution to society.  That sense of entitlement that only being disjoint from reality can provide.  The NIMBY crew!  Keep it up Mr. Lucas!  You've set your own bar!


Thursday, July 10, 2014

Fishing

Location: Salt Lake City, UT, USA
So It's been quite a while since I last wrote (I guess my second hiatus).  I made the mistake of starting a multi-post technology entry, and after dealing with that stuff all day at work I mostly lack motivation to consume my free time with more of it.  So I don't plan to do much deep technology in the future, and if I do, I will try to stay topical.

So I'll get to a new topic, and break the ice with some talk of fishing!

Growing up in central Utah I was always close to the mountains, and always close to fishing.  At a very young age I was throwing salmon egg laden hooks into the local ponds and pulling out stocked trout.  In hindsight my technique was poor, I simply tied the hook to the end of the line, loaded it with eggs, loaded the line down with enough weight to get to the deep spots, and waited to feel a jerk on the line.  In those put-and-take ponds I caught fish after fish.  But I learned quickly that I didn't really like the taste of fish, and at theage of probably 7 in the mid 80's I'd never realized that there was such a thing as releasing fish.

It wasn't until I became a boy scout that my true love affair with fishing started.  My scoutmaster was as close to a mountain man as any I had known, or have known since, a consummate backpacking fly-fisherman and hunter with a deep respect for wild places.  One day in the park practicing the back and forth casting of the line and our troop was ready to hit real water, the Green River.  And I took to it naturally.  I loved it.

The rhythm of the casting was like meditation, almost hypnotic, clearing my mind; the effect multiplied by the babbling of the river.  And a purpose!  Not just idly standing in nature, but learning the currents and flow of the river, to place a little wad of feathers and thread so that it, and the line snaking back to you, float in unison in what is called a 'dead drift'.  And the fish!  No longer were you throwing out and waiting for a tug.  Floating flies the fish come to you, and when they come on a river, they almost always come extravagantly.  A surface strike is you luring the fish out of the water, oftentimes accompanied by a quick dart down, with the fins making a big splash as the tail-fin smacks the surface.  It's as exciting as fishing gets!



Close up of two strikes (not me)

I was hooked, and I fished a lot, all over Utah and some of Wyoming, all dry-flies just floating the surface.  And I released nearly ever fish I caught, and increasingly among fly fishermen this is the norm, and I hope it spreads even more.  I hold no animosity for those who keep fish, and I will do so on rare occasion, but we all need to be mindful of how many of us there are, and what the ecosystems can handle. <I'll try not to rant :)>  In 1995 my dad hand made me a fly rod for Christmas.  It is one of my most prized possessions, and sees regular use.

Then for years I didn't fish, taking a 13 year hiatus, but the past several years I have picked it back up and found it to be like riding a bike, the muscle memory persisted after so many years.  And I have embraced it as only an adult can, exploring much deeper into the waterways that avail themselves.  I plan to do much more frequent posting about my explorations for fish.

Friday, July 19, 2013

More geekyness - How is memory on a computer used?

Location: Salt Lake City, UT, USA
Since it had been a while since I had a geeky post, I figured it was time.  Following with the theme of the low level, I am going to delve into memory a bit deeper than I have in the past.  This will be a two-part post.  This post will cover the hardware and operating system view of memory.  My next post will cover the view of memory which programs see.

On your computer you have some amount of memory.  You might have 2-4 GB or a little less, or a lot more, but beyond the abstract idea that your programs go in there when they run, you likely have little idea what your computer actually does with this memory.  You may have seen something about virtual memory, seen something about swapping, or even heard people talking about locality (I'm talking spacial locality), and not understood what they meant.  I aim to clear up some of this confusion.  This post is from a programming perspective.

The memory on your computer, typically refered to as RAM (random access memory), is one large array of contiguous bytes.  If you have 2 GB of memory, you have 2*2^30 (two times two to the thirtieth power) total bytes, or 2147483648 bytes numbered from 0 to 2147483647.  This numbering forms an address system for the memory array, thought of as Physical Memory.  This is a very logical way to address memory, and lends itself to very fast hardware operations, however this method of addressing poses a problem for applications running on the computer.  To understand why, we must look at how programs are actually run by your hardware (I will go into much more detail on this subject in my next post).

When a program is run on your computer the code which makes up the program (called the code segment) is loaded into memory.  Spread liberally throughout this code are commands that jump to new memory addresses, load values from memory, save values to memory, and generally manipulate the memory in any number of ways.  If your computer is only running one program this is not a problem, but if you happen to run a second program, the computer will have to place it in a different part of memory.  Since all modern computers are able to run more than one program at a time, the programs will never know where in memory they are, and programs have no way to know ahead of time where memory values will be, something a program must be able to do because these addresses must be defined and resolved at compile time, before the program is run.  To resolve this issue Intel introduced a new architecture to their chips called Virtual Memory (not to be confused with your operating systems swap file, which is sometimes called Virtual Memory by Windows users).

Virtual memory is an addressing scheme where each running program is presented with its own address 'space'.  This is an abstract representation where each program running (or more properly put, each process) is presented with a memory space that appears to be its own computer.  This memory space is not real, in the sense that it does not directly correspond to the physical memory installed on the computer, it is a completely logical memory space as opposed to physical, an abstraction.  Since there is a disconnect between the physical memory, and what each program sees, a special piece of hardware, called a memory management unit (MMU) is added to the computer to translate these logical addresses to a physical space in your memory array.  Hardware translation is important because it is very fast.  This way each program can address its own memory as if it were the only program running, but your physical memory can be used to handle many of these programs running at once.  Virtual memory and the increasing use of multi-tasking operating systems are a large contributing factor to increasing memory requirements.

So on top of this physical memory we have a layer of abstraction giving us logical addressing.  But there is another traditional issue in computer memory which must be addressed before we can use (program for) a modern operating system, that is the issue of fragmentation and total space.  What do I mean by fragmentation?  When we are laying out programs in memory, we need to make sure those programs do not run out of space.  We also must ensure that all the memory for a program is near the other memory for that program, a concept called spacial locality.  This is important because many operations within a program will move much faster if the memory accessed is sequential (because memory is transferred in chunks), and cache schemes tend to depend to some degree on spacial locality.  To achieve this we over-allocate memory to each program leading to unused memory that is unavailable, fragmented.  Also there is the issue of running out of memory all together.  Programs regularly allocate memory.  There are many programs running on every computer which will cause it to crash if this request for memory is unsatisfied, and as we run more and more programs we use more and more memory.

To deal with these issues by making it appear that we have nearly unlimited memory (limited only by the address width) we turn to a vast but slow array of memory, your computers hard disk.  To accomplish this we introduce the abstract idea of a page, a limited range of memory of a predefined size which we can assign to a single process (program).  Pages could be of any size, but as with anything in memory are typically sized to be a power of 2, aligning properly in memory with addresses that are powers of 2.  We can then move this page (a limited range of memory) back and forth from the physical memory (via logical addresses) to the hard drive and vice-versa depending on how frequently it is needed and how full the physical memory is.  This memory paging is controlled by the operating system which builds and maintains a table of all the pages of memory allocated and manages the access and location of the data stored in that memory whether it be in physical memory, or stored on disk.  The file on the disk which holds the memory not located in physical RAM is called a page file (proper name) or swap file (descriptive).  Many people improperly or informally refer to this concept of paging as virtual memory, though this can lead to confusion as I mentioned eariler.

So if you made it this far, at the very least, the next time you get an error that refers to a page or paging you will know what is causing the issue...  Then you will restart your computer like everyone else!

The only other thing that I can think to say on the subject of virtual memory and paging is that they are working together.  Your computer, consisting of a CPU, MMU, memory and busses (which transmit data between places), handles the virtual memory translation, an address translation, and this logical view presented by the hardware is what is being manipulated by the software, or the logical system on your computer, including your operating system.  In fact, your operating system is responsible for talking to the hardware, and it is prudent to note that the OS can control how the hardware functions on this level (through user rings, and processor modes, I will not go into this here).  The operating system is what created pages.  So if logical memory is an abstraction of physical memory, pages are an abstraction of logical memory.


Computers are a layered collection of abstractions!


I will leave you with that thought, and I will follow up this post with another about how programs work with memory, and how applications are structured in memory.  If you had trouble following my post on switch statements and jump tables, this next post will help clear it up a lot!

Tuesday, July 16, 2013

Fast lane or passing lane?

Location: Salt Lake City, UT, USA
Something that irks me, and I know I am not alone, are people who monopolize the passing lane.  I know I am not alone because this is one of the few things I consistently complain about to those around me, and everyone I know immediately agrees and they commiserate with me.  However, where I will complain about misuse of a passing lane, most people I know will complain about misuse of a fast lane, and therein I believe is part of the problem.

Fast is an abstract idea.  Ask 10 people what is fast, and you will likely get 10 different answers.  By thinking of the far left lane as a fast lane you open this lane up to everyone's individual idea of what is fast.  This could be everything from what someone feels is the appropriate speed for conditions, to the speed limit, to as fast as a car can be pushed.  The result, the left lane becomes the same as every other lane, a mire of traffic to impede anyone who may want to travel faster than the slowest inhabitant.

This is the importance of defining this lane as a passing lane (which is often how state law will define the left lane in a multi-lane highway).  Passing is not an abstract idea.  You either are passing cars on your right, or you are not.  This creates a very clear standard, if you are not passing cars then you should not be in the passing lane.  If you are blocking the passing lane by not passing cars you are being an anti-social ass.

Short post today!  What do you think of people monopolizing the passing lane?  What do you call it?