22 March 2010

Totally forgot about references.




class Program
{
static void Main(string[] args)
{
Program p = new Program();

string s = null;

EventHandler<EventArgs> closure = null;

closure =
(o, e) =>
{
Console.WriteLine(s);
p.provemattwrong -= closure;
};

p.provemattwrong += closure;
s = "FUCK";

p.provemattwrong(p, EventArgs.Empty);

}
public event EventHandler<EventArgs> provemattwrong;
}


Needless to say I didn't prove Matt wrong because I forgot that C#'s Refereces reference a Pointer are not Pointers to the object themselves. I feel like a moron.

Labels: ,

28 September 2009

Comment on Sound Weapons.

On the topic of Civil Disobedience

So this happened: http://gizmodo.com/5369190/lrad-sound-cannon-used-on-pittsburgh-g20-protesters

I have this to say to protesters: Next time carry one of these Large Parabolic Reflectors available many places and here:
http://scientificsonline.com/product.asp?pn=3053875&cm_mmc=Mercent-_-Google-_-NULL-_-3053875&mr:trackingCode=656F1735-DB81-DE11-8C0A-000423C27502&mr:referralID=NA&bhcd2=1254161937

Good luck.

Labels:

23 July 2009

Pen-Cam time lapse commute

I purchased a pen-cam from ebay the other day, and it finally came. It's been a while since my last post but I thought I'd share this time lapse video I took of my 41 minute commute home in 4 min. I've posted it in Vimeo.com since I still boycott youtube.

Pen Cam Hung On Dashbord 40Min commute in 4Min from Max Fridberg on Vimeo.

10 December 2008

I found my inspiration

Here are two commercials that inspired me greatly when I was a child:
(I'm still trying to find the Qwest cafe jukebox having every song one one)

Just go through this one answering yes to everything... Except that door thing (but I'm sure you can buy that somewhere.)

Isn't it amazing how utterly underwhelming all these things are now, but when I was a kid i just dreamed of them.


Ala' Filesharing :-)

04 December 2008

Alice and Bob


Just wanted to have a nice private conversation... Until the police stepped in.
http://www.websequencediagrams.com is cool
Here's my source:
note over Alice,Bob: Want to have a secure conversation
note over Bob,Frank: Roommates
Police->Alice: Taps Alice's line
Bob->Police: Pays off
activate Bob
Police->Bob: Informant
deactivate Bob
Bob->Alice: Stabs
note over Alice: Dies
Alice->Bob: Falls Down onto
Bob->Frank: Asks to borrow shovel
Frank->Bob: Lends shovel
Bob->Alice: Buries Body
Alice->Alice: Decomposes
Frank->Police: Calls the Authorities
Police->Bob: Arrest

Labels: , , ,

30 November 2008

Tech Retardation

I would first off like to state that I am not "into" recycling.  I do not believe in purchasing a canvas bag because I think that I'd always leave it at home.  The only time my consumer waste makes it into the recycling bin is when the trash is too full for it,  or when there is a large stack of it and it is convenient.  I just wanted to get the truth out there so that after reading this post you will have no questions as to what kind of "Eco" person I am.

 

All that being said there is something that I noticed as "Massive Waste" that I felt it important to bring to light.  I view the tech industry to be highly wasteful.  "How's that? Besides the obvious." you say?

 

When looking up one of my old laptops on HP's website I found a listing for 3 dozen different laptops with greatly varying features, in processor as well as in motherboard.  "Where's the waste? I'm sure that HP came out with those models in a economical fashion as possible" you say.  The waste and the harm of having multiple models occurs in the very notion of having "multiple models."  While I do realize that some tech creations are radically different in price because the actually cost more to manufacture,  what about the thousands of artificial costs created by just separating product into groups. 

 

Just look at the processors alone dozens and dozens of different grouping of different speed processors.  Each processor grouping and speed step is priced out differently in order to maximize profit.  It is not a giant leap to think that Intel has processors designed years into the future.  If Intel for example was to publish its latest off the bench processors as ready to use imaging how many processors thousands of ton's of processors sitting in landfills four years from now would be saved.

 

Right now, technology is created with the mentality "Tech for profit's sake,"  could you imagine if a radical shift of principal to "Tech for tech's sake" occurred.  This shift of principal is highly idealist,  not just idealist but altogether impossible since profit drives the creation of the next and great processor.  I recognize this idealist disconnect; however that does not mean that these tech companies in order to be "Eco Responsible"  could not implore some of this "tech for tech's sake" principal. 

 

How?  I do not have that many great ideas on this front.  However I do think that instead of an upper level manager asking an engineer by asking him "what do you think the next marginal upgrade to this product which makes us money?"  That  manager should be asking  "What will be our next great product?"

 

Think about that shift in manufacturing principals next time you decide between the 8400 and the 9650 video cards or the 500gb hard drive and the 1.5TB hard drive, or the next thing you buy.

 

Also part of me wrote this because I want tomorrows processor today!

Labels: , ,

13 October 2008

List Net Apps

Lets say that you want a list of network apps running in windows at a given time. I have written a simple script in Powershell to handle this:
function global:get-netapps
{
$myfile = (& netstat -abno )
$mymatches = $myfile -match "\[(?.*\.exe)\]`$"
$results = ""
foreach ($line in $mymatches)
{
if ($results.Contains($line.Replace('[','').Replace(']','')) -eq 0)
{
$results += $line.Replace('[','').Replace(']','') + "`n"
}
}
$results

}
Set-Alias lsnetapps get-netapps -Scope "global"
just run: get-netapps or lsnetapps

Labels: , ,