Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal Journal: Systemd - Efficiency and Pike's Rules of Programming 4

(DISCLAIMER: These are my notes and might be wrong.)

Lennart Poettering has never heard of Rob Pike's rules of programming. Let's examine why:

He said, "On my system the scripts in /etc/init.d call grep at least 77 times.... that has to be incredibly slow...., and should be rewritten in C."

You can time it yourself, with this command:

time for i in {1..77}; do grep user /etc/passwd > /dev/null; done

On my machine it takes 0.229 seconds.

Lennart didn't get the speed increase he wanted. From his benchmark report, "booting up with Upstart takes 27s, with systemd we reach 24s." This result isn't too bad: when I've made a similar mistake of writing code before timing anything, ignoring Pike's rules for programming, once I actually slowed the system down.

If you don't measure, you can't optimize.

For entertainment and enlightenment, here is a quote by Ken Thompson talking vaguely about Pike's rules for programming:

Early Unix programmers became good at modularity because they had to be. An OS is one of the most complicated pieces of code around. If it is not well structured, it will fall apart. There were a couple of early failures at building Unix that were scrapped. One can blame the early (structureless) C for this, but basically it was because the OS was too complicated to write. We needed both refinements in tools (like C structures) and good practice in using them (like Rob Pike's rules for programming) before we could tame that complexity.

User Journal

Journal Journal: SystemD: The Beginning 7

DISCLAIMER: THIS CODE REVIEW IS A LONG WORK IN PROGRESS, I COULD BE COMPLETELY WRONG IN ANYTHING I SAY.

To do a proper code review, you need to understand the purpose of the code, what all the stakeholders want. From my own perspective, init scripts work fine, but since Unix companies keep trying to create new init systems, they must have different needs than I do.

Here's a list of the stakeholders. I need to figure out what their goals are.
1) System admins.
2) Desktop users.
3) Distro builders.
5) Android (if systemd turns out to be good enough).
4) Programmers

My suspicion is that systemd has taken over because it makes things easier for 3.

At its core, Unix is a system for programmers. What other system comes with a compiler and multiple interpreters by default? Bash is so much more useable than DOS, or even powershell (yeah, go ahead and flame me but I'm right, Powershell doesn't even have < working). Unix was designed by programmers and for programmers.

The reason I'm talking about it is the traditional init process is incredibly discoverable. All you have to do is look in the /etc/rc directories, and you can figure out how your system boots. You can see it all. For a programmer it's easy. Poking around in the system to understand it is one thing that makes Unix great (and what I like about Slackware: the whole thing is lovingly crafted).

So that describes the approach I am taking to code review, and to the init process. Hopefully Systemd is an improvement.

User Journal

Journal Journal: I might be done with /. 1

/. Used to be an obsession for me. I've been here over a decade. I've 2^8th +5 comments, 2^8 days read. I have broken news here by waking the Admins. For the last 10 years /. could count on me putting my spin on almost every story that hit the main page. I don't know if it is Dice ownership, that the trolls have finally won, /. Beta or whatever. More and more I'm finding the content stale, the discussion vile. I don't check in every day. What I do know is that I am less and less interested in coming here any more. I don't like that. I want /. to continue to be what it was. I want it to stay here for me. But things change.

User Journal

Journal Journal: Mobile Slashdot is annoying

Yeah, I get it - you have to serve mobile kids too. I don't like that interface. Have been using classic on Android since I got it. I browse logged in. There should be configuration preference for "never show me the mobile site again".

User Journal

Journal Journal: Tapering..... in China. 5

and so it starts. The Chinese government decided to stop buying up US Treasuries and they are likely not going to roll over the US bonds that they already own, that would be Trillions of dollars that the Fed will have to print to buy up this incoming flood of the old Treasuries and without the Chinese in the US bond market, the Fed will have to buy up all of the new issued debt as well.

In this case what is good for the Chinese is bad for the Americans, Chinese are going to see a long needed deflation finally, while the Americans will see massive amounts of inflation, so much of which was exported to China previously, coming back.

User Journal

Journal Journal: Backblaze Box 3.0

Apparently Backblaze has a third generation box out. Backblaze is a provider of online backup who has a fixed fee "all you can eat" price structure. Because of this they have to minimize the cost of providing their huge storage needs. They designed a 4U server to hold 45 drives some years ago and open sourced it. Netflix uses the design now for their CDN. Since then Backblaze has improved it some and it has been reported here.

Now there's a site where you can buy them for retail, and there's a new version out. If you want to put 180TB raw into 4U, there is no more efficient way to do it.

45drives.com

User Journal

Journal Journal: It's about the people, stupid 1

In Star Trek they have a great deal of amazing technologies. Warp drive, transporters, phasers, replicators, lots of cool stuff. Some of these things have been realized at least partially with technology. Tech people love Star Trek mostly, and adore the tech. Some think that this is what Star Trek is about. This technology stuff is what makes Star Trek science fiction. This is not what Star Trek â" nor any popular fiction â" is about.

The tech in Star Trek has almost never been the story, and certainly never in a good episode. The tech is a method where the storyteller sets his story in a place just different enough from the current day that the audience can view the story objectively rather than subjectively. It is a prop. With this diversion the moral play becomes not a threat to the viewer's established prejudices because it happened in a mythical place far away in space and time, opening the viewer to alter their prejudices and experience (pleasurable) personal growth. Every Star Trek show is a moral play showing conflicts arising between people, and how they resolved them. It is about educating people about conflict resolution and ethical behavior. This and only this is why we watch. Roddenberry was shameless in re-telling all of the basic stories of the past in his postmodern future â" even Aesop's fables and Shakespeare. It's about the people because how people engage with other people is what we, as humans, connect with on an emotional level. That is what makes it a good story.

In the technology world we focus on the widget. What its gigawhats and megathings are relative to the one that came before. How many FPS it gets on TradeBench. This is entirely the wrong approach. The technology world is not about gigawhats. It's about people. People who have wants and needs, aspirations and dreams. To a certain extent we acknowledge this in the marketing department where the people who sell the stuff we make live and bring the money that buys our sweet engineering gear. Marketing understands this is how you sell things: You associate the thing in the customer's mind with a greater affinity with his family, the public, the world â" you empower and enable him to do what he needs or wants to do, to be important, or at least convince him you will, and he gives you his money.

Somehow a one-way conceptual firewall has been built between engineering and marketing where this idea cannot pass back to the people who invent stuff. Engineering doesn't respect marketing, and is living in its own Star Trek world where they invent ever more widgets they think are really cool and then fling them through the Barrier to Marketing to make of them what they can.

If you start instead at âoewhat do people really want and needâ and build that you don't need marketing much at all. People will beat down your door to get it once they know you have it. Make it your engineering goal to understand what people want and need at a basic human level, and focus on inventing stuff around enabling and empowering them to have that.

So what do people want and need? After air, food and shelter they want to connect with their fellow humans, to share and partake of sharing of each others' lives. This is why Facebook and Twitter are so huge. They want to relax and enjoy life, and enjoy songs and stories â" so, Netflix and Pandora. They want fame and recognition, so: Facebook and Twitter. Notice Facebook doesn't have a âoedislikeâ button? Know why that is? Because the fear of negative feedback would ruin the sharing experience by including the risk of rejection. They want love without fear. Give them that and they are yours.

User Journal

Journal Journal: Ho Hos are back, no word on the Ding Dongs 5

On November 21, 2012, Hostess Brands was shut down and went through a bankruptcy procedure to restructure its debts. On June 7, 2013, Hostess is open for business again under the new management.

This is an example of what free market based restructuring looks like after a company goes through normal bankruptcy due to no longer being able to operate and carry on with its fiscal responsibilities to the lenders, bond and share holders. Obviously the restructuring made the company profitable again, the plants and equipment were bought at auctions, the unions and various obligations to those unions written off as they should be.

The socialist/fascist/collectivist media is complaining full force that many people lost their jobs, of-course that was the point - restructuring debts, restructuring operations, streamlining operations, ensuring that the business can continue without impossible liabilities.

If it were up to the socialists/fascists/collectivists, the government would have stepped in (right into it) and bailed out the unions as it did in case of GM and some others. Of-course GM is going to fail again because it is still structurally unsound, even more so than before.

Had GM been allowed to go through the same bankruptcy procedures, the plants would have been bought up in auctions by more responsible owners at large discounts and made profitable again, plants and equipment don't go to waste, capitalism reclaims discarded pieces of business to rebuild them specifically because they have no liability baggage attached to them after restructuring.

Instead when the government steps in, it ensures that the business continues as usual, the only way governments know how - by stealing from actual owners and loading business with more liability and debt ensured by the tax payers.

It is a good thing that Hostess was allowed to go bankrupt, GM and all the banks should have also been allowed to go bankrupt, they would have re-emerged, clean slate, made profitable again in a sustainable manner.

This time capitalism won, the brand is back in business and people can enjoy their wonder breads and whatever other products named with plenty of sexual innuendo.

User Journal

Journal Journal: +5 Troll 1

Of all the achievements I've managed in my /. time, this one has escaped me: the moderation of +5 Troll. I believe this rare goal has been achieved, and would like a link to the incident.

User Journal

Journal Journal: Shadowbanned? 6

I'm starting to detect some deviation from the former regime. Posts are no longer as controversial. My comments are not moderated as frequently - or at all. The front page is not as timely. There's a chance my idle maunderings don't even appear to most folk. The 16 hour outage of Hotmail and such remain unreported here. Something is amiss.

It may be time to take my leave of /. It was a long wonderful run but when it's over, it's over.

User Journal

Journal Journal: The Heymann Petition has met its quota

The US Attorney Carmen Ortiz and the professional prosecutor Steve Heymann both have petitions on the whitehouse "we the people" site calling for their termination in the wake of the Aaron Swartz scandal. The Ortiz petition was filled almost immediately, but the Heymann petition took longer. Today the Heymann petition is also filled.

The whitehouse has promised to give a response to petitions which meet these thresholds. Now we will find out what the response will be, and what the reaction to that response will be.

User Journal

Journal Journal: Interpreting the Constitution = breaking the law. 2

I think it is funny what is happening on /. in terms of comment moderation, it seems like a very dedicated and coordinated approach. So I think that comment should get its own journal entry, here it is.
---

I make the argument that the Constitution is not in fact a "living, breathing, malleable document", that it is to the government what criminal code is to an individual.

The Constitution is the law and when the government officials say that the law needs to be interpreted rather than clarified and amended if it is unclear on something, what they are saying and doing is they are breaking it.

A murder trial involves figuring out whether murder was committed and whether the individual in front of the judge and jury did it and what the punishment should be. Of-course jury can nullify the law, but so far I hear that nobody tried doing that during a murder trial. So the trial does not include figuring out whether murdering people is bad, whether the legislature that set the law meant for people to be murdered under certain circumstances, if the person murdering them was doing it while pursuing criminals (or terrorists) as a government official for example.

Same thing must be done in case of the Constitutional law, same thing exactly - if something is unclear in the Constitution it needs to be clarified IN the Constitution.

However the Constitution must be followed, it is the chains around the hands and the legs of the government. It is supposed to be the chains that hold government within its limits. But what happened to that idea? The politicians figured out that amending the Constitution is too damn hard, they would rather break the law and call that "an interpretation".

User Journal

Journal Journal: Aaron Swartz: Steve Heymann needs to go too

There are plenty of signatures on the Whitehouse petition to fire US Attorney Carmen Ortiz but she's just a politician. The frontline prosecutor who drove this case was Steve Heymann. He needs to go too, but his petition isn't trending to enough votes to get it done. We need to be rid of him too.

So do your part and do him in: https://petitions.whitehouse.gov/petition/fire-assistant-us-attorney-steve-heymann/RJKSY2nb

Slashdot Top Deals

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...