20101110

LINQ Confidential

Some interesting stuff about the behind the scenes working of link from NZ Tech Ed.  Most important some good info on how linq to sql decides how/when to use sql over linq in your filtering conditions.

20100801

MSP430 Launchpad - Low Power Thermometer Code

TI has a really low cost development platform called launchpad that I have been playing with recently.  It is $4.30 with free shipping until august and it has some crazy low power capabilities.  Below is my first program beyond a blinky.  It sleeps in the second to lowest power mode then wakes up, reads the temperature, counts it out on 2 LEDs on the dev board then goes back to sleep.  Other than driving the LEDs, this should use so little power that batteries could conceivably die from age as fast as they are used if I cranked the sleep all the way up.  It also has the advantage of working on a launchpad in factory condition with no additional parts.

Like I said, I am new at this, and has been at least 8 years since I have even looked at anything that was in a base language so I am certain I have made some mistakes.  If you see some let me know.

I don't claim to understand all of this perfectly yet.  Why you need a sleep mode to read the ADC, or what all the ADC flags actually mean are a bit unclear.  Those portions are taken from TI examples.

// I am new at this - it likely has bad errors
//
// the goal was to sleep as long as possible, read temp
// then display it through flashing the launchpad leds
//
// when not flashing or measuring go to the lowest power reasonable
//

#include  "msp430x20x2.h"


//unsigned short cc = 65470;    //longest CCR0
//unsigned short cc = 1000;       //debugging CCR0 value
unsigned short cc = 10000;       //interval between tests - CCR0 value

long IntDegF;

//this is all setup
void main(void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  BCSCTL3 |= LFXT1S_2;                      // make clock work without crystal
  P1DIR |= 65;                              // P1.0 & 6 output
  P1OUT = 65;                               // lights on so we know we are started
  CCTL0 = CCIE;                             // CCR0 interrupt enabled
  CCR0 = cc;                                // set the long interval
  TACTL = TASSEL_1 + MC_1 + ID_3 ;          // SMCLK, upmode, / 8

  _BIS_SR(LPM3_bits + GIE);                 // Enter LPM3 w/ interrupt
}


//this captures the temp value
void dotemp(void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  ADC10CTL1 = INCH_10 + ADC10DIV_3;         // Temp Sensor ADC10CLK/4
  ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE;
  ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start
  __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled

  // oF = ((A10/1024)*1500mV)-923mV)*1/1.97mV = A10*761/1024 - 468
  long temp = ADC10MEM;                         // raw adc temp
  IntDegF = ((temp - 630) * 761) / 1024;
 
  CCR0 = 999;                             // set short interval for display
}

// ADC10 interrupt service routine - I don't entirely understand the need here
#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR (void)
{
  __bic_SR_register_on_exit(CPUOFF);        // Clear CPUOFF bit from 0(SR)
}

// Timer A0 interrupt service routine - this is the main flow control
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
{
  if (CCR0<1000)            //if we are on the short interval we are blinking
    if (P1OUT > 0)          //if the leds are on turn them off
    {
      P1OUT = 0;
      CCR0 = 600;
    }
    else                    //time to count down
      if (IntDegF == 0)     //if we have counted to zero back to the long count
        CCR0 = cc;
      else
      {
        CCR0 = 100;
        if (IntDegF > 9)    //if there are more than 10 left use the first led
        {
          P1OUT = 1;        //first led on
          IntDegF -= 10;    //decrement 10
        }
        else
        {
          P1OUT = 64;       //less than ten, second led
          IntDegF -= 1;     //decrement one
        }
      }
  else
    dotemp();               //do the temp measure
}


20100410

Dokan

Have you ever needed to make something look like a local drive that wasn't? or wanted to use a filesystem based tool to save to a database or post something to the internet?

If you are a linux user this is not a really difficult thing, but in windows land there has not been a really approachable way to do this without getting down into the weeds with some C driver development tools.

This is where Dokan comes in.

Dokan gives you a driver that handles all of the ugly low level bits and lets you develop the functionality you need in a higher level language. I have been playing with it for the last few days and by what I have seen so far, I think I would have killed someone to have this a couple of jobs ago when I was dealing with insane amounts of jpeg images all the time.

20100316

Win Phone 7 Ditches Multitasking, Memory Cards

Shared by Bill
and cutting off memory cards... are they stupid?
This article from PC mag talks of an interview with Charlie Kindel, WP7S development head honcho. He describes WM7S as a "much more controlled, consumer experience". "Microsoft iPhone" ahoy?

Quote:

LAS VEGAS – The new Windows Phone 7 platform will avoid multitasking third-party apps, nix support for user-replaceable memory cards, and demand that all apps be installed from Windows Phone Marketplace, a Microsoft executive said Monday.
Charlie Kindel, who is in charge of Microsoft's Windows Phone developer strategy, described a much more controlled, iPhone-like experience for formerly freewheeling Microsoft in an interview at the MIX10 conference here.
Microsoft needed to exercise some control to provide a great set of consumer experiences, Kindel said. And notice that word "consumer" – Microsoft isn't offering much to enterprise IT folks with this release of Windows Phone 7. This is a consumer device.
Like the iPhone, Windows Phone 7 won't support third-party apps being able to run in the background. But third parties will get access to a wider range of services than are available on the iPhone. For instance, Pandora could stream in the background using a special background-music service, Kindel said. But VoIP apps will be limited; there won't be a service to allow third-party apps to access telephony in the background.
Microsoft doesn't have anything against background processing – they just need to find a way to do it that doesn't kill responsiveness and battery life. They're still working on the issue, Kindel said.
"Apps that run arbitrarily in the background create an end user experience where battery life and responsiveness of the system becomes … inconsistent," Kindel said. "We focused on getting a set of experiences right where we didn't have to support [multitasking,] but we will over time."
Those third-party apps will all have to be installed from Microsoft's own Marketplace, Kindel said. Initially, there won't even be a way for enterprise customers to deploy apps to their staffs, but Microsoft is working on one. Microsoft may sweeten the deal for developers with lower fees to submit apps to the Marketplace, but the details haven't been worked out.
"We are revamping a lot of the marketplace policies, [and] we have a real desire to make sure that for developers, getting started is cheap and easy," Kindel said.
Windows Phone 7s won't support user-replaceable memory cards, Kindel said. Microsoft will work with OEMs to make sure that phones have enough storage for media and 3D games, but there will be no MicroSD cards for your music. Some phones could have a MicroSD locked under the battery, but it won't be user-replaceable.
Kindel refused to confirm whether or not any future Windows Mobile 6.5 phones would be upgradeable to Windows Phone 7, saying Microsoft was focusing on the new platform, but he said that developers aren't crying over the transition. Rather, they're thrilled with the ease of use and power of the new Windows Phone 7 developer tools, he said.
"When I talk about the fact that we're breaking backwards compatibility, I get applause," he said.
The first Windows Phone 7 devices will come out during "the holidays" of 2010, Kindel confirmed.
Original story here.
http://bit.ly/dmxOxA

20100315

Official announcements from Microsoft about Windows Phone 7 Series from MIX10 !!!

Here's some interesting news about W7 Mobile from the Mix:

So, here it goes:
  • free developer tools for making XNA and Silverlight apps for Windows Phone 7 Series = .NET-only development what means: source code of these apps can be easily decoded
  • several partners announced that will be making apps for Windows Phone 7 Series, including EA Mobile - the huge game maker, and also Microsoft's own Microsoft Game Studios
  • Silverlight apps running in Windows Phone 7 Series have access to accelerometer, camera, microphone, multitouch
  • Windows Phone 7 Series Emulator will be included with tools too, but not clear when it will be available
  • Marketplace for Windows Phone 7 Series apps announced
To learn more, visit original source of this story about Windows Phone 7 Series announcements.

SOURCE
http://bit.ly/aQvHhc

French village went insane after CIA spiked its bread with LSD

For 50 years, residents of the French village of Pont-Saint-Esprit have tried to understand the "cursed bread" incident, a moment of terrifying mass insanity and hallucinations that left at least five dead and dozens in asylums. Now the mystery is solved: the CIA secretly spiked the bread from the bakery with enormous quantities of LSD as part of its cold war mind-control experiments, at least according to recently uncovered documents. The allegation originates with H P Albarelli Jr., an investigative journalist who uncovered the documents while researching his forthcoming book, A Terrible Mistake: The Murder of Frank Olson and the CIA's Secret Cold War Experiments.
One man tried to drown himself, screaming that his belly was being eaten by snakes. An 11-year-old tried to strangle his grandmother. Another man shouted: "I am a plane", before jumping out of a second-floor window, breaking his legs. He then got up and carried on for 50 yards. Another saw his heart escaping through his feet and begged a doctor to put it back. Many were taken to the local asylum in strait jackets...

Scientists at Fort Detrick told him that agents had sprayed LSD into the air and also contaminated "local foot products".

Mr Albarelli said the real "smoking gun" was a White House document sent to members of the Rockefeller Commission formed in 1975 to investigate CIA abuses. It contained the names of a number of French nationals who had been secretly employed by the CIA and made direct reference to the "Pont St. Esprit incident." In its quest to research LSD as an offensive weapon, Mr Albarelli claims, the US army also drugged over 5,700 unwitting American servicemen between 1953 and 1965.

French bread spiked with LSD in CIA experiment (Thanks, Steve and everyone else who suggested this!)

(Image: Shaw's French Bread, a Creative Commons Attribution photo from Adam Pieniazek's photostream)



http://bit.ly/ag3jDi

20100314

ASP.NET MVC 2 Released

ASP.NET MVC 2 is out. This means, it's released. It's final. Use it. Love it.

You can download it directly, or install it (and whatever else you like) with the Web Platform Installer:

image

ScottGu has many details in his post. There's lots of resources to check out:

If you have questions or problems with any of the samples, please post your comments on the MVC Forum

Enjoy!



© 2010 Scott Hanselman. All rights reserved.

http://bit.ly/aq6xNO

20100311

1024-bit RSA encryption cracked by carefully starving CPU of electricity

Since 1977, RSA public-key encryption has protected privacy and verified authenticity when using computers, gadgets and web browsers around the globe, with only the most brutish of brute force efforts (and 1,500 years of processing time) felling its 768-bit variety earlier this year. Now, three eggheads (or Wolverines, as it were) at the University of Michigan claim they can break it simply by tweaking a device's power supply. By fluctuating the voltage to the CPU such that it generated a single hardware error per clock cycle, they found that they could cause the server to flip single bits of the private key at a time, allowing them to slowly piece together the password. With a small cluster of 81 Pentium 4 chips and 104 hours of processing time, they were able to successfully hack 1024-bit encryption in OpenSSL on a SPARC-based system, without damaging the computer, leaving a single trace or ending human life as we know it. That's why they're presenting a paper at the Design, Automation and Test conference this week in Europe, and that's why -- until RSA hopefully fixes the flaw -- you should keep a close eye on your server room's power supply.

1024-bit RSA encryption cracked by carefully starving CPU of electricity originally appeared on Engadget on Tue, 09 Mar 2010 02:47:00 EST. Please see our terms for use of feeds.

Permalink The Register, TechWorld  |  sourceUniversity of Michigan  | Email this | Comments http://bit.ly/aCec97

How to Teach Yourself Programming

ars_longa_vita_brevis

Seriously, why is everyone in such a rush?


submit to reddit Stumble this!

http://bit.ly/ad3QNU

20100306

Kohctpyktop: a game for engineers

Kohctpyktop: engineer of the people, by Zachtronics Industries is the first game where you have to design integrated circuits as a challenge. You play the role of an chip designer and you have to design chips using metal, n and p dopped silicon. Check it out. [via]

Kohctpyktop: a game for engineers - [Link]

http://bit.ly/9o15mu

20100223

hrmageddon: is this how mergers should be done?

I’ve been a cubicle dweller several times, although all of them short-lived. Corporate vets may be more amused at Thup Games’ HRmageddon, a Flash game which puts the gore in merger. What? Anyway. HRmageddon’s “story” starts when your company, Gray Solutions, merges with Beige Dynamics. The problem? The number of openings remain the same, but the number of employees have doubled. The higher ups’ solution, delivered to you via an attached PowerPoint presentation:

HRmageddon 1

Battles take place tactics-style. To win, you must kill all of the rival employees, or capture more cubicles than the opposing team. Employees consist of managers, receptionists, IT guys and salesmen, with varying specialties and attack ranges. Before each battle, you choose which of these employees and how many of each type to hire, as long as you spend within the budget. There are power ups on the field too, all of them office related as well, e.g. “Holiday Bonus”, which heals a unit and bestows a temporary attack bonus.

HRmageddon 2

The game is kinda slow-paced, but the animations made me stick with it, especially the salesman’s attacks and the manager’s moves. Check out the HRmageddon at Adult Swim. While you’re there, be a kind soul and check out My Lil’ Bastard for me won’t you? I wanted to play it but I didn’t have the time. And also Robot Unicorn Attack; and Dungeons and Dungeons; and Death Vegas.

http://bit.ly/cfDxnE

20100221

Windows Mobile 6.5.x Development to Continue Longer Than Expected?

We know by now that Microsoft will have two mobile platforms in the market at the same time: Windows Mobile 6.5.x will remain for professional devices and for phones that have interface skins, and Windows Phone 7 Series will be around for consumers and in some cases, business users as well. Well, at the below email from HTC customer service ... Read More

Related Posts

Comments [10]

http://bit.ly/aQUt0s

20100219

Make Sure You're Not De-Motivating Your Team [Career]

It should come as no surprise that money is a pretty powerful motivator for workers, but an article by researchers at Harvard Business School says it takes more than cash to keep employees happy and productive.

Photo by crschmidt.

The article suggests that managers spend too much time trying to figure out how to motivate employees—something most workers are perfectly capable of doing themselves. Instead, team leaders need to get out of the way and stop de-motivating employees with mindless policies and poor management strategies.

The authors say people have three main goals at work: 1) to be treated with respect and equity, 2) to take pride in a job well done, and 3) to have good relationships with fellow employees. If even one of these factors are missing, workers are three times as likely to be unhappy at work. Surprisingly, not even a better paycheck will make up for the loss of one of the three biggest motivators.

Inane company policies and procedures often do the most damage to employee motivation, and there's often little middle managers can do about it:

Satisfying the three goals depends both on organizational policies and on the everyday practices of individual managers. If the company has a solid approach to talent management, a bad manager can undermine it in his unit. On the flip side, smart and empathetic managers can overcome a great deal of corporate mismanagement while creating enthusiasm and commitment within their units. While individual managers can't control all leadership decisions, they can still have a profound influence on employee motivation.

The most important thing is to provide employees with a sense of security, one in which they do not fear that their jobs will be in jeopardy if their performance is not perfect and one in which layoffs are considered an extreme last resort, not just another option for dealing with hard times.

Check out the article for a list of ways managers can help workers achieve their goals, feel a sense of pride in their work, and build camaraderie with fellow workers. What keeps you motivated at work? Is it the companionship of your colleagues, cold, hard, cash, or something else? Share what revs your motivational motor in the comments.



http://bit.ly/drZqJc

I Knew That Tin Foil Would Protect My Actions


I Knew That Tin Foil Would Protect My Actions

Submitted by: dunno source via Submission Page

http://bit.ly/a1tpsJ

Firefox Feedly RSS option

If you use Firefox with a RSS button and want the default RSS page to offer a Feedly option here is what you need to do: go to the about:c...