Fluff

Prime Factorizations

Prime FactorizationI was checking out the internet and I came across someone doing a code kata for prime factorizations. I stopped watching what they were doing and decided to try my own hand at it. Here is the result:

You call it like so:

var primeFactors = PrimeFactors.Of(1305294);

I’ve run tests on this and some timings. Here are some representative findings:

   198,602 = 2 * 199 * 499 (40 milliseconds to run)
 4,678,421 = 11 * 101 * 4,211 (3,131 milliseconds to run)
17,841,257 = 7 * 2,548,751 (20,603 milliseconds to run) 

2,548,751 is a pretty big prime! (Verified by http://is.2548751.aprimenumber.com/.)

I use the trick that says that a number is prime if it isn’t divisible by any of the numbers up to its square root. That definitely sped up performance. Other than that, I think the biggest spot for potential refactoring is around actually checking and calculating the prime factors. I laid it out very much like I would do the prime factorization with pencil and paper, but I don’t know if there is a better or more elegant way to attack that.

I’d be interested in any feedback and in seeing how some other people might solve the problem.

Podcasts

My Podcast is Live!

Well, I did it! I finished the first episode of my podcast this weekend and published it. I added a podcast link to the menu:
Podcast Menu Item

If you click on the menu item, it will take you to the Podcast’s web page.

I also got the feed published and accepted into iTunes as you can see below:

My Podcast in iTunes

If you are interested in subscribing, but don’t want to go to the podcast’s page, here are the links below:
iTunes Link RSS Feed

Thanks for everyone who participated in my survey and to everyone who is going to listen. I’m working hard on episode two now and I’m going to try to make it a little better every time.

Note: For those so inclined, I’ve submitted to the Windows Marketplace, but it hasn’t been accepted yet.

Fluff

Believe in Yourself

Believe in YourselfI often have no shortage of belief in myself and my abilities. When in doubt, I will always “bet on myself” when the chips are down to get things done. That confidence has allowed me to be very fortunate in professional settings. At times it can be misconstrued and at times I know that people can think that I don’t have any right to be as confident as I am. However, earlier this year, I read Ball Four by Jim Bouton and was really struck by this passage.

I’ve had some thoughts on what separates a professional athlete from other mortals. In a tight situation the amateur says, “I’ve failed in this situation many times. I’ll probably do so again.” In a tight situation the professional says (and means it), “I’ve failed in this situation and I’ve succeeded. Since each situation is a separate test of my abilities, there’s no reason why I shouldn’t succeed this time.”

Then there is also the case of the professional player who is not professional enough. He goes on a fifteen-game hitting streak and says, “Nobody can keep this up.” And as the streak progresses, his belief in his ability to keep it alive decreases to the point where it’s almost impossible for him to get a hit.

The real professional – and by that I suppose I mean the exceptional professional – can convince himself that each time at bat is an individual performance and that there is no reason he can’t go on hitting forever.

He is 100% saying how I feel about my potential for success in any given situation. Why not me? Why not now? Why can’t I do this thing? Why can’t I continue to succeed, or rally to success after a failure?

More importantly, why not you? Why not now? Why can’t *YOU* do the thing you want to do? Why can’t you continue to succeed, or snatch victory from the jaws of defeat?

You can.

Go do it!

Podcasts

Podcast Survey Results

Podcast SurveyLast time, I blogged about a survey I was running to collect information to help me craft the podcast that I want to start. The responses seem to have tapered off, so I closed the survey and I’m going to consider this data final.

In the interest of giving back, I’m going to publish the results here to help anyone else who might be interested in the information. I got 28 participants and here were their responses.

Do you listen to podcasts regularly? (Once a month or more)
Yes – 53.57% (15)
No – 46.43% (13)

How did you discover the podcast(s) you listen to?
More than one answer allowed
I don’t listen to podcasts – 25% (7)
Blogs – 32.14% (9)
Other podcasts – 21.43% (6)
Recommendation from friends – 46.43% (13)
Reddit/Hacker News/Similar Site – 25% (7)
Twitter – 14.29% (4)
Other – 17.86% (5)
(Included “Other” Responses: iTunes – 2 votes, radio/internet, search engines, Interests: Sci-Fi/Star Trek/Walking Dead/Tv & Movie Reviews)

How many different podcasts do you listen to?(Only 27 responses because I added this question after the first person took my survey)
0 – 33.33% (9)
1 – 7.41% (2)
2-5 – 37.04% (10)
5-10 – 18.52% (5)
10+ – 3.7% (1)

What is an ideal length for a podcast?
Less than 15 minutes – 35.71% (10)
15-30 minutes – 35.71% (10)
30-60 minutes – 17.86% (5)
Over 60 minutes – 10.71% (3)

What format/segments would be in your ideal podcast?
More than one answer allowed
Current Tech News Discussion – 39.29% (11)
Guest co-hosts – 39.29% (11)
Interviews – 39.29% (11)
Opinions – 46.43% (13)
Recommendations / Interesting Things Found Online – 67.86% (19)
Technology review (one topic per podcast) – 57.14% (16)
Technology reviews (varied) – 32.14% (9)
Other – 7.14% (2)
(Included “Other” Responses: religious topics, philosophical ramblings)

How frequently would an ideal podcast publish?
More than once a week – 3.57% (1)
Once a week – 50% (14)
Once every two weeks – 14.29% (4)
Monthly – 3.57% (1)
Whenever the muse strikes – 14.29% (4)
I don’t care – 14.29% (4)

So, to me, I do consider this survey a success. Even with only 28 participants, there are some decisions that I feel that I can make about the podcast.

First, I should aim to publish weekly (50%). Secondly, I should aim to keep it under a half hour (71.42% combined). One thing that I found surprising was that 67.86% of people said they would like a segment with interesting things that I’d found online. I really didn’t expect that option to come in that high.

The one thing that the survey confirmed for me is that I really need to try to encourage word of mouth support for the podcast to get it going. Over 46% of people found a podcast because of friends and over 32% found them from blogs (very similar – still a personal recommendation).

I’m going to take all of this information to the lab and hopefully I will start publishing a podcast next month. A huge thanks to everyone who helped or participated!

Goals

Starting a Podcast – Phase 0

PodcastI’ve toyed around with the idea to start a podcast for quite some time. I think the time for me to get started has arrived. I’ve created a survey to try to do a little market research that you can find here. If you would please take a minute to take the survey (it is only 6 quick questions), I would really appreciate it.

My goal is to narrow down a format and get 4-5 shows in the can and then publish them at whatever pace gets decided (one of the survey questions!) while making more.

I’m not looking to be “Hansel-famous”, I just want to put myself out there in the community another way and try to continue to grow as a technologist, a communicator, and a person. I’m taking Scott Hanselman’s advice (found here) and going to give this a go.

I would really appreciate if you would take the survey and help me make a podcast that people might want to tune in to. Thanks!