Archives

You are currently viewing archive for October 2008

Fri 31 October 2008 11:23 AM

Too Smart

Would Orson Welle's War of the Worlds radio play be mistaken for a factual news broadcast today? Read all the way to the end for the punch line.
Category: General
Posted by: beowulf

Fri 31 October 2008 9:49 AM

DST

Why is this the top hit for a google search on bony, blue-fingered hand of Puritanism.

Personally, I've always hated Daylight Savings Time. I think the entire world should standardize on UTC and be done with it. Who gives a fuck what number is on a clock when you wake up when you still have to wake up and go to your shitty job regardless?
Category: General
Posted by: beowulf

Wed 29 October 2008 9:51 PM

People Suck

"People suck and that's my contention. I can prove it on a scratch paper and a pen. Give me a fucking Etch-A-Sketch(tm), I'll do it in 3 minutes - the proof, the fact, the factorum, I'll show my work - case closed.

I'm tired of this back-slapping "Aren't Humanity Neat" bullshit. We're a virus with shoes, ok - that's all we are."

-bhicks, Rants In E-Minor
Category: General
Posted by: beowulf

Wed 29 October 2008 8:47 PM

Divestment

2008-Oct-29 - 1 x 1982 VW Rabbit Pickup ==> Junk-Yard.org
Category: General
Posted by: beowulf

Fri 24 October 2008 11:03 PM

b3ta best of

disco ball death star
that's no moon
groovey star wars



it's a trap
Category: General
Posted by: beowulf

Mon 20 October 2008 11:24 AM

Nonsense

I had been holding it in for several hours because I was diligently doing work, so it was with a sense of total body relief that I said to myself whilst sitting down on the toilet "I'm going to poop the shit out of this bowel movement".
Category: General
Posted by: beowulf

Fri 17 October 2008 4:36 PM

Function

I'll pay 1000 space bucks to anyone who can send me a single-line function that will return the following table of values:









xf(x)
21
32
43
54
65
76
17


This works, but the IF offends me:
CREATE FUNCTION dbo.fx
(
  @x int
)
RETURNS int
AS
BEGIN
  DECLARE @y int
  
  SET @y = @x - 1
  IF @y = 0 SET @y = 7

  RETURN @y
END
Category: General
Posted by: beowulf

..."destroys from the inside".

When the jackhammer came in, I was completely unnerved by it. I almost had to shut it off to avoid the raw visceral dread it had induced.
Category: General
Posted by: beowulf

Fri 10 October 2008 3:47 PM

SQL

How's this for a SQL query, bitches?

	-- Display the project hours/timeslots, 
	-- with needed hours per timeslot smeared across each hour,
	-- with the displayed hour localized for the specified time zone
	SELECT
	  @PeriodStartDate AS PeriodStartDate,
	  @ProjNum AS ProjNum,
      e.DOW,
	  e.PartOfDay,
	  e.HourNum,
      f.TotalRequestHours,
      f.TotalSchedHours,
      f.TotalNeedHours,
      f.NumHoursPerPartOfDay,
	  f.NeededBodiesPerHour,
	  f.IdealBodiesPerHour,
	  LTRIM(RTRIM(z.TZ)) + ' - ' + z.Name AS TimeZoneDisplayName, 
      -- Hour numbers in scheduling database are based on 
	  -- Eastern Time (that's why -5 and -4)
	  CASE r.IsDst
		WHEN 0 THEN HourNum - (((Bias + StandardBias)/60) - 5)
		WHEN 1 THEN HourNum - (((Bias + DaylightBias)/60) - 4)
	  END AS LocalHourNum
	FROM dbo.Calendar r 
	INNER JOIN dbo.TimeZoneInfo z
	  ON r.ThisDate = @PeriodStartDate
	INNER JOIN dbo.ProjectHours e 
	  ON z.TZ = @LocalTimeZone
	LEFT OUTER JOIN (
		-- Figure out how many hours per time slot, by day of week, by part of day
		SELECT 
		  d.PeriodStartDate, 
		  d.ProjNum,
          c.DOW,
		  c.PartOfDay,
          d.TotalRequestHours,
          d.TotalSchedHours,
          d.TotalNeedHours,
          c.NumHoursPerPartOfday,
		  d.TotalNeedHours / c.NumHoursPerPartOfDay AS NeededBodiesPerHour,
		  d.TotalRequestHours / c.NumHoursPerPartOfday AS IdealBodiesPerHour
		FROM  (
            -- Count up the number of hours the Ops Mgr defined
            -- for each day's part of day
			SELECT 
              ProjNum,
              DOW,
              PartOfDay,
              COUNT(HourNum) AS NumHoursPerPartOfDay
			FROM dbo.ProjectHours
			WHERE ProjNum = @ProjNum
			GROUP BY 
              ProjNum,
              DOW,
              PartOfDay
		) c INNER JOIN (
            -- Figure out how many of the requested hours we still need to fill
			SELECT 
			  a.PeriodStartDate,
			  a.ProjNum,
			  a.PartOfDay,
			  a.TotalRequestHours,
              b.TotalSchedHours,
			  CASE
				WHEN b.TotalSchedHours Is Null THEN a.TotalRequestHours
				ELSE a.TotalRequestHours - b.TotalSchedHours 
			  END AS TotalNeedHours
			FROM (
				-- The hours requested by Ops Manager, with padding applied, by part of day
				-- 1 = day; 2 = early eve; 3 = late eve; 4 = weekend
				SELECT 
				  PeriodStartDate, 
				  ProjNum, 
				  1 AS PartOfDay,         
				  TotalProdHours * PaddingFactor * PercentDay AS TotalRequestHours
				FROM dbo.OpsMgrRequests
				WHERE PeriodStartDate = @PeriodStartDate
				UNION
				SELECT 
				  PeriodStartDate, 
				  ProjNum, 
				  2 AS PartOfDay,
				  TotalProdHours * PaddingFactor * PercentEveEarly AS TotalRequestHours
				FROM dbo.OpsMgrRequests
				WHERE PeriodStartDate = @PeriodStartDate
				UNION
				SELECT 
				  PeriodStartDate, 
				  ProjNum, 
				  3 AS PartOfDay,
				  TotalProdHours * PaddingFactor * PercentEveLate AS TotalRequestHours
				FROM dbo.OpsMgrRequests
				WHERE PeriodStartDate = @PeriodStartDate
                UNION
                SELECT
                  PeriodStartDate,
                  ProjNum,
                  4 AS PartOfDay,
                  TotalProdHours * PaddingFactor * PercentWkn AS TotalRequestHours
				FROM dbo.OpsMgrRequests
				WHERE PeriodStartDate = @PeriodStartDate
			) a LEFT OUTER JOIN (
				-- The hours we've already scheduled
				SELECT 
				  s.PeriodStartDate, 
				  s.ProjNum, 
				  h.PartOfDay, 
				  SUM(S.Duration) AS TotalSchedHours
				FROM CurrentSchedulesDetails s INNER JOIN ProjectHours h
				  ON s.ProjNum = h.ProjNum
                  AND s.DayOfWeek = h.DOW
				  AND s.StartHour = h.HourNum
				WHERE PeriodStartDate = @PeriodStartDate
                  AND s.ProjNum = @ProjNum
				GROUP BY 
                  s.PeriodStartDate,
                  s.ProjNum,
                  h.PartOfDay
			) b
			ON a.PeriodStartDate = b.PeriodStartDate
			AND a.ProjNum = b.ProjNum
			AND a.PartOfDay = b.PartOfday
		) d
		ON c.ProjNum = d.ProjNum
		AND c.PartOfDay = d.PartOfDay
	) f
	ON e.ProjNum = f.ProjNum
    AND e.DOW = f.DOW
	AND e.PartOfDay = f.PartOfDay

	WHERE e.HourNum BETWEEN 6 AND 23
	AND f.NeededBodiesPerHour Is Not Null
    AND e.HourNum IN (
		-- Exclude hours from the available list in 3-hour shifts
		SELECT StartHour
		FROM dbo.HourShiftsWithFreeSlots(3, f.IdealBodiesPerHour, @PeriodStartDate, @ProjNum)
	)
)



Category: General
Posted by: beowulf

Thu 9 October 2008 9:34 PM

The Thick Baldwin

Category: General
Posted by: beowulf

Wed 1 October 2008 9:51 PM

Cop Porn

The internet is not a truck. It is a series of tubes and now those mavens of technology have figured out how to push popcorn through those tubes. As you may know, Gareth and William joined the local Cub Scout Pack 962 this year and it is the season for shilling popcorn to raise enough scratch to fund many wonderful activities - including but not limited to camping, hiking, learning to tie knots, and helping old ladies cross the street.

So, go buy you some popcorn here:
http://www.orderpopcorn.com/Store/Catalog/Default.aspx

To buy some popcorn from Gareth enter this "order key": TEZYYKT
To buy some popcorn from William enter this "order key": TEP7902

I believe you will find the shopping experience at orderpopcorn.com so unbelievably mind-blowingly wonderful that you'll end up buying even more popcorn than you thought possible. You don't even have to put on pants or open the front door for this one. I can't imagine how it could be any better.

If the boys sell a stupendous amount of popcorn they will earn some trinkets from the BSA, but more importantly, the pack will get back more than 60% of the money you spend. Street-crossing old ladies everywhere are depending on you.
Category: General
Posted by: beowulf

Wed 1 October 2008 10:27 AM

Divestibule

9/26 - Left a short-circuited key fob for a 1998 VW Jetta atop concrete retaining wall out front of my office.

9/27 - Disposed of 8 recreational explosives left over from July 4th in the obvious manner whilst celebrating Oktoberfest.

9/28 - Tossed out a radio/tape/cd mini-boom box thing that was missing an antenna which my brother-in-law left in the garage after he moved out. I found it upstairs during the Great Springcleaning of 2008 and thought that I would transplant the antenna from my current "garage radio" onto this piece of crap and have radio, tape, and CD in my garage. Six and a half months is long enough to hold onto that dream without implementing it. ==>

9/29 - My plan was to leave a Tekram SCSI host adapter (taken out of the hella cool machine I built in 1998) in the server room here at work, but I forgot the access code. On a whim, instead, I tossed it out the car window on my way home from work. I know littering is bad, but it was worth it to see the box pop open and empty its contents into my turbulent wake.

9/30 - Dropped off a bag of pants that escaped the great cat shitpissing of a couple months ago. To give an idea of how long these pants have been sequestered: they all have 34 or 36 waists. Ha ha.

10/1 - Took one of the six hundred 3.5" floppy disks out of the Xerox box housing them in my office and placed it in the crook of a tree I was parked under.
Category: General
Posted by: beowulf