Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: Circular dependencies in three languages 1

Here are six files for ya, showing a problem in 3 different scripting languages. What will they do?
--------- test1.php:
<?php
require 'test2.php';

define('SOMECONSTANT','hello world');

function foo() {
                return SOMECONSTANT;
}

echo foo(); echo "\n";

--------- test2.php:
<?php
require_once 'test1.php';

echo foo(); echo "\n";
--------- test1.py:
#!/usr/bin/python
import test2

SOMECONSTANT='hello world'

def foo():
                return SOMECONSTANT

print foo()
--------- test2.py:
#!/usr/bin/python
import test1

print test1.foo()
--------- test1.rb:
#!/usr/bin/ruby
require 'test2.rb'

SOMECONSTANT='hello world'

def foo
                SOMECONSTANT
end

puts foo()
--------- test2.rb:
#!/usr/bin/ruby
require 'test1.rb'

puts foo()
---------
Ok, scriptfiends, predict the output of these three commands:
php -q -f test1.php
python test1.py
ruby test1.rb

and then do some pasting and try it out. Match your predictions?

The PHP one bit me pretty hard today.

User Journal

Journal Journal: One Too Many 2

I have a password written on a post-it note underneath my keyboard. Decades went by without this ever having happened, but now I have one of these. [rationalize]And I'm keeping the post-it, because it'll probably be months or years before I ever need that password again, so there's just no chance I'll be able to remember it (it's actually a pretty well-made password).[/rationalize] OTOH, I suppose I could just throw it away and then the next time I need it, ask someone for it again. [truth]But no, it amuses me that I've entered the ranks of people with passwords on post-its at their desks, so I'm keeping it, for that reason if nothing else.[/truth]

User Journal

Journal Journal: I still can't believe I'm this old. 12

I've been 35 for almost a month now. I'm working at a place with linux-only guys, who think that the best solution is always free software. I feel like the old unix dude with the suspenders who still reads a.s.r. I feel ancient, as I've worked with big iron, or at least medium iron since my first job, and the guys who work in the IT department here are used to virtualization on intel platforms (so, machines considered big for their time, but not SPARCs or RISC machines).

Benny pestered me incessantly about what I wanted for my birthday. I couldn't figure it out; I was (and still kind of am) on the dark side right now, about a 4 on my personal 1-10 depression scale. It doesn't affect my ability to work, but it numbs and dulls my senses. Like I should've been elated to get the job I have now (which is almost perfect), but I wasn't. I couldn't express that level of joy. I'm still not quite there, but I'm digging out of it slowly but surely. Anyway, the day before my birthday, I figured out what it was I wanted. I wanted a guitar and lessons.

We headed to Guitar Center and I found a decent guitar, and we walked out with a guitar, case, book, picks, and an extra set of strings. I called up the music store in Castle Rock (which is where I work, 17 minutes from where we live, just north of Sedalia), and started lessons last week. I suck, but I'm sucking less at it every day. I practice until my fingers are tender, as many days as I can actually get the time, and I figure that has to be good enough.

I don't want to be the next Joni Mitchell, or even Lisa Loeb. I just want to make music, in the way I still take photos because I want people to see what I see in the world.

If anyone is looking for a 6-month gig in the Castle Rock, CO area, let me know. I'm looking for a mini-me, who can help me get the alarms in line. Someone who groks windows servers and javascript, who has a decent grasp of monitoring and alarming (snmp and nms experience would be nice, but not necessary.) I'm currently putting people through the "Chris test" by having my boss interview them first, and looking for specific skills later.

User Journal

Journal Journal: Yo, Tom Hudson 3

Yo, Tom Hudson, I'm real happy for you and I'ma let you finish, but Breitbart is the greatest troll of all TIME!

User Journal

Journal Journal: I'll never empty my freaks list 5

I'll never empty my list of freaks. First of all because Pudge is on there, and for him to un-freak me would require him to change his mind.

But of far more interest than that is my former brother-in-law. I hadn't forgotten that he showed up here when his crazy assed sister left me. Hadn't thought about him in a while. Was looking around some pages and saw his name on my freaks list. Then I remembered he was 'an hero'. And I laughed. I hope it hurt. It probably did, because for it to have been painless it would require him to do something right for once in his miserable life.

Cowardly chickenshit.

User Journal

Journal Journal: 2 more weeks of hell. 8

I gave my notice for the contracting company. I'm going back into NMS with a passion that can't be denied.

Just 2 more weeks of waking up when other people are coming home from work.

Just 2 more weeks until I can take the dog to the dog park after work, or go to the normal park with her on her leash (we're right near Chatfield, and they have a great dog park, I've been told.

Just. 2. more. weeks.

User Journal

Journal Journal: APK is a trip 23

Everybody still having fun with APK? I notice that damned near every post I made last week has been responded to, questioning my educational bona fides. The hysterical thing is that some AC responded to his inquiries. Now, to about half of those, he responded, accusing me of being the AC. The really hysterical thing: I haven't visited /. since very early on Wednesday morning.

So APK spent a day or two running around and accusing people of sockpuppetry who had forgotten his existence hours before APK posted. Classic. How long until he goes all Hans Reiser?

User Journal

Journal Journal: THIS is why linux is not ready for primetime. 18

So Ben (el Husband) is building/has built a CNC router using Ubuntu and a couple of pieces of software, a CAD program (for which he paid), a CNC controller program (which I can't remember if it was free as in beer or not), a tiny motherboard, and a couple of other pieces of actual hardware for which he paid a decent amount of money (but not enough to justify actually buying a mill the size he needs). Motors, threaded rod, etc. If you want to see, he's got a video on youtube linked from the woodshop blog showing it in action.

We've had problems with ubuntu deciding to boot from the usb stick, partially because Ubuntu decided it didn't want to shut down properly, and corrupted libraries, and someone decided that certain useful utilities (say, fsck) didn't need to be statically linked, which made it rather unhappy to work with. Ubuntu has been reinstalled, and he's got a .dmg on his ibook (my old ibook which still runs, and well) that he keeps at the shop, as backup. Because he has to. He was trying to install some packages to make his life a little easier (his BACulator, new version of gcc, some other stuff) yesterday, and the automounter kept complaining about ... something. The error message was Linuxy, by which I mean wordy and not very useful. I got this email tonight:

1: The problem with the USB stick was that SOMEONE, decided that I MUST have a CDROM drive, and surely that CDROM drive would be my second drive, so they added a cdrom entry in fstab for /dev/sdb... So, every time I inserted the USB stick, the kernel tried to mount /dev/sdb, which it was told was a cdrom drive, so it tried to mount an iso 9660 FS, which of course the drive doesn't have. Commenting out the fstab line fixed the problem completely. Assholes.

2: The G-Code reference page has JAVASCRIPT that detects if the gcode-main.html is in the same doc base and sets all the links to point there if so, and to the linuxcnc server if not. So someone wrote a fairly complex bit of code just to make that work, then someone else decided to not include the main page with the distribution. Assholes!

As a programmer and a unix admin, he gets a little upset.

User Journal

Journal Journal: Define normal 4

I have never met a single person who is normal. I have never met a single person who was raised in a normal family. Yet I have met many people who insist, often to such a degree that it causes them a great deal of anxiety and stress, that everyone else, with them being the sole exception, is a normal person who was raised in a normal household.

I am not worried, dismayed, or upset by people who are crazy. We are all crazy. What I can't stand is people who insist on always holding themselves up to some idealized abstraction that they call normal.

Where I am from, being of mixed race is normal. Never going to church is normal. Recycling is normal. In the house I grew up in, worrying if there would be enough money to pay the bills next month was normal. A happy joyous Christmas was normal. My father getting up at 6:30am to fry me a steak for breakfast was normal.

Not knowing if my father was going to live tomorrow.

Normal.

Not knowing who my birth mother is.

Normal.

Cursing her every day for forcing me to live with the consequences and end effects of her behavior?

Normal.

Knowing I have a loving family to go home to, no matter how psychologically messed up or near death they may be on any given day?

Normal.

The things we take for granted, the things we, personally, in our hearts, believe to be universal truths that are beyond any doubt, make up what we consider to be normal.

To live a happier life, do not take for granted any of the positives blessings that you have received in life, no matter how few they may be. Be thankful, truly grateful to the world, for all the good that has come your way. Look at everything good in your life that you take for granted, all the positives that you assume are normal, and love them with all your heart. That which you assume is normal are things many others cannot take for granted. Food on the table. A safe bed to sleep in at night. A shoulder to cry on. A place to run away to when your home has become too crazy. Whatever it is in your life, love it and hold it dear.

Come to the understanding that everything wrong, everything negative in life that you take for granted, does not have to be that way. If you are unloved, do not assume that is normal. Do not take it for granted that no one will ever love you. If you saw your parents addicted to drugs, do not assume that you too must become a drug addict. If you saw your father beat your mother, do not assume that you must beat your wife or be beaten by your husband.

The beautiful thing about normal, is that it can, it does, everyday, change meaning. We define it. You and I define it for ourselves, and for the world as a whole.

Do not strive for normal. Strive for joy. Strive for happiness. Strive for a better future, for yourself, and for all of us. Make that the new normal.

User Journal

Journal Journal: I blame Lysol for the antibacterial frenzy we're in now. 5

Especially after seeing the commercial they're running now. "Did you know that there are germs everywhere, including on the bottle of liquid soap?" Why yes, Lysol, I did. I knew there are germs on top of the soap dispenser. But you see, after I put my hand on top of the soap dispenser, soap is dispensed into my other hand and I WASH MY HANDS WITH SOAP. Holy crap, people. Unless you've got an automatic faucet, you probably pick more germs up from turning off your faucet than you would from the pump on the soap dispenser.

That word looks wrong. You know when you say or write something multiple times and it just looks wrong? The number '1' looks and sounds wrong at the end of my shift because I say it so much. Whatever. Back to my rant.

Lysol kills germs. That's fine. Except that telling people there are germs on their liquid soap bottle on the spot they use to dispense soap isn't really a useful observation. And really, there didn't need to be a 'fix' for that for consumers. Life wasn't meant to be lived in a sterile operating theater. it was meant to be lived alongside and in opposition to the rest of the living things that live around us.

Gah.

User Journal

Journal Journal: Romance is in the eye of the beholder... 8

So "that day" is coming up on Sunday. You know, February 14th. We normally don't celebrate with what you would call 'normal' gifts. Ben said he'd have gotten me 'flours' but he didn't want to go to Whole Foods. He was going to get some white, wheat and rye, and some yeast, and it would be a bouquet of flours. I'd have loved that.

But no, what he did was awesomer. He bought me a decent point-n-shoot, which I've been wanting for a while now, and a microwave (because our last one was sold with the house -- it was mounted over the stove), and three paperback novels. I've been wanting to read "Stupid reading" for a little while now, too. You know, the kind of thing you read when you just want to read something. Mysteries, mostly. He got me a Jonathan Kellerman and a Dean Koontz Odd Thomas book, and an Iris Schrier, I believe. Those were the sweetest gifts he could've gotten for me. Not anything sentimental, not something that will be dead in a week. Something useful and something I've been wanting, actually wanting.

I'm not recommending that everyone get their SO a microwave and a camera and three paperbacks. Or that you get them Chick-fil-a and leave it in the car clipped to their badge for them to take to work. But they were the perfect thing, and the most romantic thing (for me) that could happen on or around v-day.

I'm obviously easily impressed, though. :P

User Journal

Journal Journal: Mumble mumble something. 3

This week has kinda sucked for me sleepwise. I was up until 2pm on Sunday and Monday, as we were looking for places to rent and moving into the one we liked. For normal sleepers, this is staying up from 6am one day until 4am the next day. Two days in a row. I got maybe 8 hours sleep between the two days (or I guess three days, if you want to look at it that way).

But!

We got a cute place in Sedalia, CO. It's on a guy's HUUUGE tract of land (he has a polo field on it. and the horses to go with that.) and is a small house, but we've met our neighbors, well.. one of them. She's a spinner and a weaver (which is cool), and she and her husband have 4 rather large dogs. Nulla played a little with them, but she's not allowed off her little cable because, well, she's a shiba. Shibas are notorious for deciding to run and run and run and laugh at you when you call them. She zipped out the door when we were staying with a friend and into the busy road (2 lanes each way with a median) -- Wadsworth around 470 for those of you in/near denver.

We spent Monday digging through boxes looking for the &^#*@ remote to the bed -- It's a sleep number bed, which we've had absolutely zero issues with, which seems to be the exception, as I've seen many many bad reviews online. Our stuff is in storage in the springs, which makes it kind of irritating to get our stuff, but whatever. We won't be taking a whole lot out of storage, as the house is only about 700-ish square feet, but we got Benny's big chair, and the bed, and the dining room table. We picked up a few boxes of kitchen stuff, but this'll be one of those long drawn out things where we pick things up piecemeal. There's not going to be much time to set up housekeeping this week, since I'm working and then we're headed down to the ranch to build skeinwinders on Sunday. It'll be interesting to see if Ben installs the shower before we leave... the landlord bought the shower and is paying Ben to install it, but we'll definitely benefit from that, since what's in the bathroom now is a claw-foot tub with a shower sprayer (and no shower curtain) which makes a HUGE mess. We've been un-synchronized sleepwise because of the moving and the going-to-home-depot-with-the-landlord, and will probably stay un-synched for another week or so while he does things like get firewood from the guy down the road, and working at the ranch. It sucks, but you do what you can.

User Journal

Journal Journal: I have people skills! 1

All I can think tonight is

Well-well look. I already told you: I deal with the god damn customers so the engineers don't have to. I have people skills; I am good at dealing with people. Can't you understand that? What the hell is wrong with you people?

but maybe that's because I've seen office space too many times.

Slashdot Top Deals

Thus spake the master programmer: "After three days without programming, life becomes meaningless." -- Geoffrey James, "The Tao of Programming"

Working...