Category Archives: quote

sending email in python with gmail

A Python nugget from Programming Your Home (review) I wanted to share from p97:

import smtplib
def send_email(subject, message)
    recipient = 'your_email_recipient@domain.tld'
    gmail_sender = 'your_gmail_account@gmail.com'
    gmail_password = 'your_gmail_password'

    #use tls
    gmail_smtp = smtplib.SMTP('smtp.gmail.com', 587)
    gmail_smtp.ehlo()
    gmail_smtp.starttls()
    gmail_smtp.ehlo()

    #login
    gmail_smtp.login(gmail_send, gmail_password)

    #message formatting
    mail_header = 'To: ' + recipient + '\n' + 'From: ' + gmail_sender + '\n' + 'Subject: ' + subject + '\n'
    message_body = message
    mail message = mail_header + '\n ' + message_body + '\n\n'

    #send
    gmail_smtp.sendmail(gmail_sender, recipient, mail_message)

    #close
    gmail_smtp.close()

more coolidge

More choice excerpts from Coolidge by Amity Shlaes (review):

The constant apprehension was, so long as then-existing legislation remained in force, that the unit of existing monetary relations would be changed. Such an apprehension is the surest ground for panic which can be offered. The panic which resulted when this fear became more specific was not a bank panic, nor a crisis in which the banks had any responsibility. –William Graham Sumner on issues surrounding changing from the gold standard.

I do not like an income tax, it taxes the land and the crops at the same time, it is too expensive to collect… no man’s income is permanent enough to admit of taxation, it will easily be a source of corruption. –Calvin Coolidge, 1894

The term of power for every party must therefore be limited. –Anson Morse – influencer of Coolidge’s views on length of time in any given office

The nineteenth century is slipping away. We are to live in the scientific age of the 20th century and must prepare for it now. There are millions who can only be hands and only a few who can be heads. –Calvin Coolidge, 1894

One should never trouble about getting a better job. But one should do one’s present job in such a manner as to qualify for a better job when it comes along. –Calvin Coolidge, 1894. (Don’t be unpromotable.)

the art of the essay

Paul Graham is one of my favorite essayists. The following are some excerpts from his excellent 2004 essay, “The Age of the Essay“.

The most obvious difference between real essays and the things one has to write in school is that real essays are not exclusively about English literature. Certainly schools should teach students how to write. But due to a series of historical accidents the teaching of writing has gotten mixed together with the study of literature. And so all over the country students are writing not about how a baseball team with a small budget might compete with the Yankees, or the role of color in fashion, or what constitutes a good dessert, but about symbolism in Dickens.

With the result that writing is made to seem boring and pointless. Who cares about symbolism in Dickens? Dickens himself would be more interested in an essay about color or baseball.

in the late 19th century the teaching of writing was inherited by English professors. This had two drawbacks: (a) an expert on literature need not himself be a good writer, any more than an art historian has to be a good painter, and (b) the subject of writing now tends to be literature, since that’s what the professor is interested in.

The other big difference between a real essay and the things they make you write in school is that a real essay doesn’t take a position and then defend it.

Defending a position may be a necessary evil in a legal dispute, but it’s not the best way to get at the truth, as I think lawyers would be the first to admit. It’s not just that you miss subtleties this way. The real problem is that you can’t change the question.

And yet this principle is built into the very structure of the things they teach you to write in high school. The topic sentence is your thesis, chosen in advance, the supporting paragraphs the blows you strike in the conflict, and the conclusion– uh, what is the conclusion? I was never sure about that in high school. It seemed as if we were just supposed to restate what we said in the first paragraph, but in different enough words that no one could tell.

To understand what a real essay is, we have to reach back into history again, though this time not so far. To Michel de Montaigne, who in 1580 published a book of what he called “essais.” He was doing something quite different from what lawyers do, and the difference is embodied in the name. Essayer is the French verb meaning “to try” and an essai is an attempt. An essay is something you write to try to figure something out.

Figure out what? You don’t know yet.

If all you want to do is figure things out, why do you need to write anything, though? Why not just sit and think? Well, there precisely is Montaigne’s great discovery. Expressing ideas helps to form them.

Questions aren’t enough. An essay has to come up with answers. They don’t always, of course. Sometimes you start with a promising question and get nowhere…An essay you publish ought to tell the reader something he didn’t already know.

An essay is supposed to be a search for truth. It would be suspicious if it didn’t meander.

The Meander (aka Menderes) is a river in Turkey. As you might expect, it winds all over the place. But it doesn’t do this out of frivolity. The path it has discovered is the most economical route to the sea.

The river’s algorithm is simple. At each step, flow down. For the essayist this translates to: flow interesting. Of all the places to go next, choose the most interesting.

So what’s interesting? For me, interesting means surprise. Interfaces, as Geoffrey James has said, should follow the principle of least astonishment. A button that looks like it will make a machine stop should make it stop, not speed up. Essays should do the opposite. Essays should aim for maximum surprise.

I found the best way to get information … was to ask what surprised them. How was the place different from what they expected? This is an extremely useful question. You can ask it of the most unobservant people, and it will extract information they didn’t even know they were recording.

[T]he ability to ferret out the unexpected must not merely be an inborn one. It must be something you can learn. How do you learn it?

To some extent it’s like learning history. When you first read history, it’s just a whirl of names and dates. Nothing seems to stick. But the more you learn, the more hooks you have for new facts to stick onto– which means you accumulate knowledge at what’s colloquially called an exponential rate. Once you remember that Normans conquered England in 1066, it will catch your attention when you hear that other Normans conquered southern Italy at about the same time. Which will make you wonder about Normandy, and take note when a third book mentions that Normans were not, like most of what is now called France, tribes that flowed in as the Roman empire collapsed, but Vikings (norman = north man) who arrived four centuries later in 911. Which makes it easier to remember that Dublin was also established by Vikings in the 840s. Etc, etc squared.

There are an infinite number of questions. How do you find the fruitful ones?

I write down things that surprise me in notebooks. I never actually get around to reading them and using what I’ve written, but I do tend to reproduce the same thoughts later. So the main value of notebooks may be what writing things down leaves in your head.

Whatever you study, include history– but social and economic history, not political history. History seems to me so important that it’s misleading to treat it as a mere field of study. Another way to describe it is all the data we have so far.

Gradualness is very powerful. And that power can be used for constructive purposes too: just as you can trick yourself into looking like a freak, you can trick yourself into creating something so grand that you would never have dared to plan such a thing. Indeed, this is just how most good software gets created.

If there’s one piece of advice I would give about writing essays, it would be: don’t do as you’re told. Don’t believe what you’re supposed to. Don’t write the essay readers expect; one learns nothing from what one expects. And don’t write the way they taught you to in school.

Popular magazines made the period between the spread of literacy and the arrival of TV the golden age of the short story. The Web may well make this the golden age of the essay. And that’s certainly not something I realized when I started writing this.

abstracts from ‘the art of seduction’

Yesterday I promised you can read the abstracts from Robert Greene’s The Art of Seduction today.

  • Part One – The Seductive Character
    • The Siren

      A man is often secretly oppressed by the role he has to play – by always having to be responsible, in control, and rational. The Siren is the ultimate male fantasy figure because she offers a total release from the limitations of his life. In her presence, which is always heightened and sexually charged, the male feels transported to a realm of pure pleasure. In a world where women are too timid to project such an image, learn to take control of the male libido by embodying his fantasy.

    • The Rake

      A woman never quite feels desired and appreciated enough. She wants attention, but a man is too often distracted and unresponsive. The Rake is a great female fantasy-figure – when he desires a woman, brief though that moment may be, he will go to the ends of the earth for her. He may be disloyal, dishonest, and amoral, but that only adds to the appeal. Stir a woman’s repressed longings by adapting the Rake’s mix of danger and pleasure.

    • The Ideal Lover

      Most people have dreams in their youth that get shattered or worn down with age. The find themselves disappointed by people, events, reality, which cannot match their youthful ideals. Ideal Lovers thrive on people’s broken dreams, which become lifelong fantasies. You long for romance? Adventure? Lofty spiritual communion? The Ideal Lover reflects your fantasy. He or she is an artist in creating the illusion you require. Ina  world of disenchantment and baseness, there is limitless seductive power ion following the path of the Ideal Lover.

    • The Dandy

      Most of us feel trapped within the limited roles that the world expects us to play. We are instantly attracted to those who are more fluid than we are – those who create their own persona. Dandies excite us because they cannot be categorized, and hint at a freedom we want for ourselves. They play with masculinity and femininity; they fashion their own physical image, which is always startling. Use the power of the Dandy to create an ambiguous, alluring presence that stirs repressed desires.

    • The Natural

      Childhood is the golden paradise we are always consciously or unconsciously trying to re-create. The Natural embodies the longed-for qualities fo childhood – spontaneity  sincerity, unpretentiousness  In the presence of Naturals, we feel at ease, caught up in their playful spirit, transported back to that golden age. Adopt the pose off the Natural to neutralize people’s defensiveness and infect them with helpless delight.

    • The Coquette

      The ability to delay satisfaction is the ultimate art of seduction – while waiting, the victim is held in thrall. Coquettes are the grand masters of the game, orchestrating a back-and-forth movement between hope and frustration  They bait with the promise of reward – the hope of physical pleasure, happiness, fame by association, power – all of which , however, proves elusive; yet this only makes their targets pursue them the more. Imitate the alternating heat and coolness of the Coquette and you will keep the seduced at your heels.

    • The Charmer

      Charm is seduction without sex. Charmers are consummate manipulators, masking their cleverness by creating a mood of pleasure and comfort. Their method is simple: The deflect attention from themselves and focus it on their target. They understand your spirit, feel your pain, adapt to your moods. In the presence of the Charmer you feel better about yourself. Learn to cast the Charmer’s spell by aiming at people’s primary weaknesses: vanity and self-esteem.

    • The Charismatic

      Charisma is a presence that excites us. It comes from an inner quality – self-confidence, sexual energy, sense of purpose, contentment – that most people lack and want. This quality radiates outward, permeating the gestures of Charismatics, making them seem extraordinary and superior. They learn to heighten their charisma with a piercing gaze, fiery oratory, an air of mystery. Create the charismatic illusion by radiating intensity while remaining detached.

    • The Star

      Daily life is harsh, and most of use constantly seek escape from it in fantasies and dreams. Stars feed on this weakness; standing out from others through a distinctive and appealing style, they make us want to watch them. At the same time, they are vague and ethereal, keeping their distance, and letting us imagine more than is there. Their dreamlike quality works on our unconscious. Learn to become an object of fascination by projecting the glittering but elusive presence of the Star.

    • The Anti-Seducer

      Seducers draw you in by the focused, individualized attention they pay to you. Anti-seducers are the opposite: insecure, self-absorbed, and unable to grasp the psychology of another person, they literally repel. Anti-Seducers have no self-awareness, and never realize when they are pestering, imposing, talking too much. Root out anti-seductive qualities in yourself, and recognize them in others – there is no pleasure in dealing with the Anti-Seducer.

    • The Seducer’s Victims – The Eighteen Types
      1. The Reformed Rake or Siren
      2. The Disappointed Dreamer
      3. The Pampered Royal
      4. The New Prude
      5. The Crushed Star
      6. The Novice
      7. The Conqueror
      8. The Exotic Fetishist
      9. The Drama Queen
      10. The Professor
      11. The Beauty
      12. The Aging Baby
      13. The Rescuer
      14. The Roué
      15. The Idol Worshiper
      16. The Sensualist
      17. The Lonely Leader
      18. The Floating Gender
  • Part Two – The Seductive Process
    • Phase One: Separation – Stirring Interest and Desire
      • 1 Choose the Right Victim

        Everything depends on the target of your seduction. Study your prey thoroughly, and choose only those who will prove susceptible to your charms. The right victims are those for whom you can fill a void, who see in you something exotic. They are often isolated or unhappy, or can easily be made so – for the completely contented person is almost impossible to seduce. The perfect victim has some quality that inspires strong emotions in you, making your seductive maneuvers seem more natural and dynamic. The perfect victim allows for the perfect chase.

      • 2 Create a False Sense of Security – Approach Indirectly

        If you are too direct early on, you risk stirring up a resistance that will never be lowered. At first there must be nothing of the seducer in your manner. The seduction should begin at an angle, indirectly, so that the target only gradually becomes aware of you. Haunt the periphery of you target’s life – approach through a third party, or seem to cultivate a relatively neutral relationship, moving gradually frin friend to lover. Lull the target into feeling secure, then strike.

      • 3 Send Mixed Signals

        Once people are aware of your presence, and perhaps vaguely intrigued, you need to stir their interest before it settles on someone else. Most of us are much to obvious – instead, be hard to figure out. Send mixed signals: both tough and tender, both spiritual and earthly, both innocent and cunning. A mix of qualities suggests depth, which fascinates as it confuses  An elusive  enigmatic aura will make people want to know more, drawing them into your circle. Create such a power by hinting at something contradictory within you.

      • 4 Appear to be an Object of Desire – Create Triangles

        Few are drawn to the person whom others avoid or neglect; people gather around those who have already attracted interest. To draw your victims closer and make them hungry to possess you, you must create an aura of desirability – or being wanted and courted by many. It will become a point of vanity for them to be the preferred object of your attention, to win you away from a crowd of admirers. Build a reputation that precedes you: If many have succumbed to your charms, there must be a reason.

      • 5 Create a Need – Stir Anxiety and Discontent

        A perfectly satisfied person cannot be seduced. Tension and disharmony must be instilled in your targets’ minds. Stir within them feelings of discontent, and unhappiness with their circumstances and with themselves. The feelings of inadequacy that you create will give you space to insinuate yourself, to make them see you as the answer to their problems. Pain and anxiety are the proper precursors to pleasure. Learn to manufacture the need that you can fill.

      • 6 Master the Art of Insinuation

        Making your targets feel dissatisfied and in need of your attention is essential, but if you are too obvious, they will see through you and grow defensive  There is no know defense, however, against insinuation – the art of planting ideas in people’s minds by dropping elusive hints that take root days later, even appearing to them as their own idea. Create a sublanguage – bold statements followed by retraction and apology, ambiguous comments, banal talk combined with alluring glances – that enters the target’s unconscious to convey your real meaning. Make everything suggestive.

      • 7 Enter Their Spirit

        Most people are locked in their own worlds, making them stubborn and hard to persuade. The way to lure them out of their shell and set up your seduction is to enter their spirit. Play by their rules, enjoy what they enjoy, adapt yourself to their moods. In doing so, you will stroke their deep-rooted narcissism and lower their defenses. Indulge your targets’ every mood and whim, giving them nothing to react against or resist.

      • 8 Create Temptations

        Lure the target deep into your seduction by creating the proper temptation: a glimpse of the pleasures to come. As the serpent tempted Eve with the promise of forbidden knowledge, you must awaken a desire in your targets that they cannot control. Find that weakness of their, that fantasy that has yet to be realized, and hint that you can led them toward it. The key is to keep it vague. Stimulate a curiosity stronger than the doubts and anxieties that go with it, and they will follow you.

    • Phase Two: Lead Astray – Creating Pleasure and Confusion
      • 9 Keep Them in Suspense – What Comes Next?

        The moment people feel they know what to expect from you, your spell on them is broken. More: You have ceded them power. The only way to lead the seduced along and keep the upper hand is to create suspense, a calculated surprise. Doing something they do not expect from you will give them a delightful sense of spontaneity – they will not be able to foresee what comes next. You are always one step ahead and in control. Give the victim a thrill with a sudden change of direction.

      • 10 Use the Demonic Power of Words to Sow Confusion

        It is hard to make people listen; they are consumed with their own thoughts and desires, and have little time for yours. The trick to making them listen is to say what they want to hear, to fill their ears with whatever is pleasant to them. This is the essence of seductive language. Inflame people’s emotions with loaded phrases, flatter them, comfort their insecurities, envelop them in sweet words and promises, and not only will they listen to you, they will lose their will to resist you.

      • 11 Pay Attention to Detail

        Lofty words of love and grand gestures can be suspicious: Why are you trying so hard to please? The details of  seduction – the subtle gestures, the offhand things you do – are often more charming and revealing. You must learn to distract your victims with a myriad of pleasant little rituals – thoughtful gifts tailored just for them, clothes and adornments designed to please them, gestures that show the time and attention you are paying them. Mesmerized by what they see, they will not notice what you are really up to.

      • 12 Poeticize Your Presence

        Important things happen when your targets are alone: The slightest feeling of relief that you are not there, and it is all over. Familiarity and overexposure will cause this reaction. Remain elusive, then. Intrigue your targets by alternating an exciting presence with a cool distance, exuberant moments followed by calculated absences. Associate yourself with poetic images and objects, so that when they think of you, they begin to see you through an idealized halo. The more you figure in their minds, the more they will envelop you in seductive fantasies.

      • 13 Disarm Through Strategic Weakness and Vulnerability

        Too much maneuvering on your part may raise suspicion. The best way to cover your tracks is to make the other person feel superior and stronger. If you seem to be weak, vulnerable, enthralled by the other person, and unable to control yourself, you will make your actions look more natural, less calculated. Physical weakness – tears, bashfulness, paleness – will help create the effect. Play the victim, then transform your target’s sympathy into love.

      • 14 Confuse Desire and Reality – The Perfect Illusion

        To compensate for the difficulties in their lives, people spend a lot of their time daydreaming, imagining a future full of adventure, success, and romance. If you can create the illusion that through you they can live out their dreams, you will have them at your mercy. Aim at secret wishes that have been thwarted or repressed, stirring up uncontrollable emotions, clouding their powers of reason. Lead the seduced to a point of confusion in which they can no longer tell the difference between illusion and reality.

      • 15 Isolate the Victim

        An isolated person is weak. By slowly isolating your victims, you make them more vulnerable to your influence. Take them away from their normal milieu, friends, family, home. Give them the sense of being marginalized, in limbo – they are leaving one world behind and entering another. Once isolated like this, they have no outside support, and in their confusion they are easily led astray. Lure the seduced into your lair, where nothing is familiar.

    • Phase Three: The Precipice – Deepening the Effect Through Extreme Measures
      • 16 Prove Yourself

        Most people want to be seduced. If they resist your efforts, it is probably because you have not gone far enough to allay their doubts – about your motives, the depth of your feelings, and so on. One well-timed action that shows how far you are willing to go to win them over will dispel their doubts. DO not worry about looking foolish or making a mistake – any kind of deed that is self-sacrificing and for your targets’ sake will so overwhelm their emotions, they won’t notice anything else.

      • 17 Effect a Regression

        People who have experienced a certain kind of pleasure in the past will try to repeat or relive it. The deepest-rooted and most pleasurable memories are usually those from earliest childhood, and are often unconsciously associated with a parental figure. Bring your targets back to that point by placing yourself in the oedipal triangle and positioning them as the needy child. Unaware of the cause of their emotional response, they will fall in love with you.

      • 18 Stir up the Transgressive and Taboo

        There are always social limits on what one can do. Some of these, the most elemental taboos, go back centuries; others are more superficial, simply defining polite and acceptable behavior. Making your targets feel that you are leading them past either kind of limit is immensely seductive. People yearn to explore their dark side. Once the desire to transgress draws your targets to you, it will be hard for them to stop. Take them farther than they imagined – the shared feeling of guilt and complicity will create a powerful bond.

      • 19 Use Spiritual Lures

        Everyone has doubts an insecurities – about their body, their self-worth, their sexuality. If your seduction appeals to the physical, you will stir up these doubts and make your targets self-conscious. Instead, lure them out of their insecurities by making them focus on something sublime and spiritual: a religious experience, a lofty work of art, the occult. Lost in a spiritual mist, the target will feel light and uninhibited. Deepen the effect of your seduction by making its sexual culmination seem like the spiritual union of two souls.

      • 20 Mix Pleasure with Pain

        The greatest mistake in seduction is being too nice. At first, perhaps, your kindness is charming, but it soon grows monotonous; you are trying too hard to please, and seem insecure. Instead of overwhelming your targets with niceness, try inflicting some pain. Make them feel guilty and insecure. Instigate a breakup – now a rapprochement, a return to your earlier kinds, will turn them weak at the knees. The lower the lows you create, the greater the highs. To heighten the erotic charge, create the excitement of fear.

    • Phase Four: Moving in for the Kill
      • 21 Give Them Space to Fail – The Pursuer is Pursued

        If your targets become too used to you as the aggressor, they will give less of their own energy, and the tension will slacken. You need to wake them up, turn the table. Once they are under your spell, take a step back and they will start to come after you. Hint that you are growing bored. Seem interested in someone else. Soon they will want to possess you physically, and restraint will go out the window. Create the illusion that the seducer is being seduced.

      • 22 Use Physical Lures

        Targets with active minds are dangerous: If they see through your manipulations, they may suddenly develop doubts. Put their minds gently to rest, and waken their dormant senses, by combining a nondefensive attitude with a charged sexual presence. While your cool, nonchalant air is lowering their inhibitions, your glances, voice, and bearing – oozing sex and desire – are getting under their skin and raising their temperature. Never force the physical; instead infect your targets with heat, lure them into lust. Morality, judgement, and concern for the future will all melt away.

      • 23 Master the Art of the Bold Move

        A moment has arrived: Your victim clearly desires you, but is not ready to admit it openly, let alone act on it. This is the time to throw aside chivalry, kindness, and coquetry and to overwhelm with a bold move. Don’t give the victim time to consider the consequences. Showing hesitation or awkwardness means you are thinking of yourself, as opposed to being overwhelmed by the victim’s charms. One person must go on the offensive, and it is you.

      • 24 Beware the Aftereffects

        Danger follows in the aftermath of a successful seduction. After emotions have reached a pitch, they often swing in the opposite direction – toward lassitude, distrust, disappointment. If you are to part, make the sacrifice swift and sudden. If you are to stay in a relationship, beware a flagging of energy, a creeping familiarity that will spoil the fantasy. A second seduction is required. Never let the other person take you for granted – use absence, create pain and conflict, to keep the seduced on tenterhooks.

  • Appendix A: Seductive Environment / Seductive Time
  • Appendix B: Soft Seduction: How to Sell Anything to the Masses

The above material is all copyright © Robert Greene 2001.

virtualization myth – reduction of servers

Ars Technica has had a great series of articles recently on virtualization (1 2 3 4 5).

But a statement made in part 5 repeated what has been too-often stated as a benefit of virtualization: the reduction of servers, and associated management tasks –

The benefits of performing a large-scale P2V conversion are pretty clear: server consolidation leading to reduced space and power usage and decreased heat output; easier centralized management; new redundancy and high-availability options (including the ability to restore or clone entire VMs at a time); and the opportunity to rebuild the OS of legacy systems, to just name a few. It is very possible to consolidate even a dozen racks’ worth of servers into a single rack, or just two blade chassises. With gains like that, it is no wonder that virtualization is quickly becoming entrenched in the enterprise.

Virtualization does NOT guarantee reduction of servers and management tasks – it can enable the reduction of physical servers in the infrastructure, but because of the ease of spinning-up a new server for testing, development, or just “because”, virtualization has actually lead to a proliferation of servers on the network when they would not have been previously feasible.

If build time is 10 minutes for a VM (typical in environments I have seen/used), then any time someone needs/wants a new server, it can be ready in a few minutes. That’s amazing. The problem is that when it is no longer needed, it needs to be powered-down and have its assigned resources returned to the pool. Sadly, this rarely happens.

There are indeed tools that can help enable this (I was recently trained on one such tool (and, I think, it’s the single best option for the job)), but out-of-the-box, virtualization doesn’t help anything except to reduce the physical footprint of the data center.

from `fortune`

The five rules of Socialism:
(1) Don’t think.
(2) If you do think, don’t speak.
(3) If you think and speak, don’t write.
(4) If you think, speak and write, don’t sign.
(5) If you think, speak, write and sign, don’t be surprised.
— being told in Poland, 1987