Sunday, July 23, 2017

The past is an outfit that doesn't fit us anymore

I know a lot of Bernie Sanders followers are going to execrate me for this post and and I might be on the wrong side of a lot of right people the I admire, but Bernie and to some extent Hillary, were like a Jodorowski movie or supporting Lula and the Brazilian Labor party in 2017.  They are our grandparents or our aging parents that tell us their stories of their youth, their recounted past that time had smoothed the rough edges and it is now exciting the kids to give it a try.

In a sense, they highjacked the thirsty for change of the younger generation, piggybacked on the new crowd technology, reviving their bruised ego to give it another chance in history.

I decided to support Hillary, because at least having a woman in the white house would be a big change. Instead, the electoral college decided to go for another big change and elect a shrewd crook with dishonesty and authoritarian rule unheard of in our history.

It's a mistake to think that the revolutionary work done by Hillary, Bernie and their generation has a lot in common with Occupy Wall street. Failing to recognize the differences is what defeated the progressive view they wanted to win.

The same way in Brazil, the country definitely owns a lot to the relentless work done by Lula and the Labor party, but their past shouldn't forgive the criminal acts that were performed with their knowledge, or participation, or connivence. Because if this is fair, then it is also fair to forgive the trespasses of the Cardosos, the Neves, the Temers, etc. They were all affected and fought one way or another during the military dictatorship. They all did good things for the country and later on, when drowning on the inebriation of the power, got corrupted. Forgive them and give them another chance is not the solution.

I know it seems that now the world is beyond a rational solution, but guess what, the same organ the we use for reasoning is the one responsible for our feelings and until we not only recognize feelings as part of our reasoning but we learn how to acknowledge and use them as such, we will be stuck in this collective cognitive dissonance.

To the Jodorowski fans out there, I'm among them. I supported his work in crowdfunding platforms, I treasure my Jodorowski dollars and my movie posters. I smile with warm feelings watching his movies, but it is not for their innovative aesthetics, but for the nostalgia of the time in my teenager years when this type of aesthetics was cutting edge, never seen before. I enjoy seeing the hidden unintended meanings I can get by admiring how his son engages with him, participating on his work. How sweet and ludic their relationship seems to be on the screen. He aged much better than Woody Allen, for sure. But today's indie movie scene has a lot better and more enticing story telling that appeal to the younger generations. His movies look like the old pair of jeans that I found in the attic that still fit, but look undeniably old. They might fit on me, but I am the one that don't fit in them anymore.










Thursday, April 21, 2016

Extreme decluttering in baby steps

People that know me can testify about how attached I am to my things, specially books. The problem is that, as of late, the entropy level at home is just so high that things are getting unmanageable. I'm on the verge of becoming what most people qualify  as a hoarder.

So I had to take drastic measures. I'm giving away several books:
  • Old computer books about older versions of Java
  • Computer books about waterfall methodology
  • Feng-Shui books
 That's it. A big milestone for me. Finally I'm able to admit to myself that my house is beyond any possibility of Feng-Shui transformation and no benefit can be achieved by my family or myself from me struggling with guilt every time I have to move these Feng-Shui books out of the way when I'm looking for something that has been lost in the huge pile of mess that is any horizontal surface in my house.

Not that eliminating ALL Feng-Shui books will make any significant dent in the havoc that surrounds my life right now. But it is a step towards reconciliation with myself. A baby step, I know, but still a step forward.

Thursday, April 9, 2015

Hiring talents, the Walmart conundrum

Monday my boss called a meeting between UX guys and the mobile developers and him to decide on the new feature of capturing multipage document.I was the only one that got to the meeting with one suggestion of UI flow and coding solution that would require no webservice change at all.I made a drawing on the whiteboard and I said I could make a mockup.he told us to think about it and asked the UI guys to come up with ideas too.2 h after the meeting I had a small prototype, already integrated with the app, that they could test out the UI of my idea.The next day, I had a fully functional prototype of the solution, including the conversion of all the pages in a single pdf file.I sent the workable prototype for them to install on their devices and my boss replied to my message asking the other two mobile developers to send their mockups as well.He called another meeting for today and he started the meeting by showing my prototype on his phone and he started asking for small changes here and there and assigning tasks here and there when I told him I had two other mockups to show.Again, I showed two working apps with a completely different flow, that were even better than the first one and that blew his mind...Considering that I got two production bugs to fix and I also fixed 3 other bugs that QA didn't get but I found in production and I fixed all of them as well, not bad for a week.

When a company wants to get into a new technology and they don't have the expertise in that area, they think that the best way is to hire the best talent possible.but they don't have enough knowledge to evaluate if the one showing oneself as the best is indeed the best at the same time they feel insecure for not being able to grasp everything the expert is providing.then comes the bitter feeling in the company that the expert is too smart for their liking.

If they hire the expertise from 3rd party vendors, the integration with the current culture fails. It's almost impossible to satisfy them, because they don't know what questions to ask and are giving several answers to grade when the product is delivered. Or if they hire someone like me, the expert ends up doing guerrilla development, because I have to constantly sneak new ideas and push them forward from behind the lines, making obscure alliances, or being ostracized, unmotivated up to the point that both parts decide to split.

Thursday, July 17, 2014

My quest to automate Mobile deployments - How to prompt for user input during Xcode builds

At work, as the sole mobile developer in the office, I have to juggle between writing code, understanding 3rd party code that was acquired by the company and also deploying the code (mine and 3rd party). I had to upload binaries to TestFlight for QA testers, for show and tell to executives, manage iTunesConnect deployments, at the same time I have to keep the local git repository in sync with the corporate TFS repository.

As it happens, my company uses TFS that is not git friendly yet. I quickly found git-tf to bridge the two repositories, but the job of manually syncing the local and remote repositories all the time and all the manual deployments were taking up too much of my development time.

Another thing that was making the deployments complex was the amount of changes I had to make in the configuration and the code when migrating from one environment to another.

So I quickly started working on a solution to automate my tasks as much as possible. Not because I'm lazy, but mainly because if we write the proper automation tasks, we avoid mistakes.

Here are my challenges:

1. Push notifications

Our apps use push notification and we use Urban Airship as our push notification server. As is well known, UA and APNS (Apple Push Notification Server) have two environments: Debug and Production. UA provides a configuration file where you can put the keys for both of these environments and at run time, it configures itself accordingly. The problem is that at my company, we have to handle 4 environments: Development, QA, User Acceptance Test and Production. All the pre-production environments have to use APNS debug, since they are not production, so I had to handle 3 different debug configurations for UA config file.

2. TFS integration

All the "other" code in the company is developed in .NET world. They get along quite well with TFS, SQL server, Visual Studio, Windows, but when it comes to git and Macs, the support is questionable. The company didn't like the idea of having a separate git server for mobile developments. They prefer the code to be imported into TFS and from there they can merge/branch according to the deployment environment.

As they have a lot invested in and knowledge of the TFS infrastructure, they want to benefit from it as much as possible.

3. Lack of Macs

Due to the cost of Macs, the company prefers to have mostly Windows workstations and laptops handed out to developers. We have very few Macs and usually they are handed out to executives that run a Windows VM on it all the time. They conceded that developers of iOS code need a Mac, but it was hard for them to accept that all dev ops would need a Mac too in order to build and deploy code to TestFlight and App Store. Having a Mac there is a sign of status that they were just not ready to spread to all levels of development and IT tasks.

4. Back-end integration

Our apps talk to Salesforce APIs on the back-end and again, each environment requires different endpoints and sometimes slightly different state machine to entertain the SOAuth dialog and certain customizations in the login process, like allowing the user to reset password from the login dialog ("forgot password link") and the always connected app.

5. Corporate network

My company is in the financial sector, so security is very strict. The network has all types of firewalls, traffic filters and restrictions they put in place for all users. The users are defined in Active Domain and the network is very Mac hostile. We have to change our passwords very often and every time it takes place, it is a nightmare on the Mac side. I have to either clear all sorts of cookies, certificates and passwords stored on the keychain and start over, entering the new password again a thousand times, or I have to painstakingly go through my key chain and update all the stale passwords.  If you add to that the bug on Mavericks when your Mac is connected to redundant gateways, which disconnects every minute or so, remote tasks are very hard to accomplish on Macs here.

6. Maintaining the version string consistent across deployments

Uploads to the App Store require that the version strings (long and short) increase from one release to another. We also need to be able to identify uniquely each bundle uploaded to TestFlight or installed on a device. We need to look at the app and quickly identify which distribution is installed and which build generated that distribution. 

Solutions:

Just trying to make my life easier, I started looking into ways to simplify my tasks with automation.

1. Push Notification

For the push notification, I wrote script steps into the build action on the scheme that updates the UA config file before the archive.
Here is an example:

# Archive pre-actions  
# set UA config to development
/usr/libexec/PlistBuddy -c "Set APP_STORE_OR_AD_HOC_BUILD YES" "${PROJECT_DIR}/AirshipConfig.plist"
if [ "$CONFIGURATION" == "Ad-Hoc" ]; then
    /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
    /usr/libexec/PlistBuddy -c "Set PRODUCTION_APP_KEY " "${PROJECT_DIR}/AirshipConfig.plist"
    /usr/libexec/PlistBuddy -c "Set PRODUCTION_APP_SECRET " "${PROJECT_DIR}/AirshipConfig.plist"
    /usr/libexec/PlistBuddy -c "Set APP_STORE_OR_AD_HOC_BUILD YES" "${PROJECT_DIR}/AirshipConfig.plist"
fi
if [ "$CONFIGURATION" == "Production" ]; then
echo "actions before archiving for Production upload" >> ~/Public/${CONFIGURATION}MobilePartnerarchive.txt
# change UA config
    /usr/libexec/PlistBuddy -c "Set PRODUCTION_APP_KEY " "${PROJECT_DIR}/AirshipConfig.plist"
    /usr/libexec/PlistBuddy -c "Set PRODUCTION_APP_SECRET " "${PROJECT_DIR}/AirshipConfig.plist"
    /usr/libexec/PlistBuddy -c "Set APP_STORE_OR_AD_HOC_BUILD YES" "${PROJECT_DIR}/AirshipConfig.plist"
fi

In this example, both ad-hoc and production of an enterprise program app use UA/APNS production, but they have different app bundle ids, which means they need to point to different topics in UA/APNS server,. For that reason, I need different keys/secrets for each distribution. In this example, we can populate the keys and secrets right before the archive, maybe using a script that captures them from the keychain on the build machine using the dev ops build user. The developer will never have access to these keys/secrets on her keychain.

2. TFS integration

For TFS integration I installed git-tf on the Mac. It is tricky to configure all the required java stuff and the symlinks to make it easy to update the versions in the future. You have to clone the TFS repository on the command prompt and if you don't configure the clone afterwards to store your credentials on the git configuration file, you will have to provide them every time you execute any git-tf command. You also have to create your .gitignore, to avoid grabbing all the Xcode temporary files into your TFS repository. 

I couldn't find a way to call these commands from within Xcode when I'm in the source control menu. I think Xcode should provide a way to customize the actions there, similar to the schemes, providing hooks for pre- and post- action. This would have made my life a lot easier. You won't believe how many iOS and Windows developers are not familiar with command prompt in the terminal window.

The other bothersome feature was the fact that configuring git-tf to store the credentials would store the password unencrypted, and this configuration had to be changed manually every time we had to change our passwords in AD.

I started by writing scripts that would store the password on the keychain when cloning the repository and then would read the key chain to provide the password when checking in code to TFS or pulling in updates. They were still scripts that would run on the Terminal window and the developer had to remember to checkin code to TFS when she was ready to merge to other branches.

This also didn't solve the problem of automatically changing the password when the user had to change the password in Active directory. I'm still thinking about how to solve this problem of the password update triggered by AD.

The next step was to make the checkin to happen from within Xcode, without the need to run any scripts in the terminal window.

I usually checkin the code when I'm ready to deploy a binary to TestFlight, which means that I had generated an archive. As it happens, sometimes I would upload a binary to TestFlight and I would forget to checkin code to TFS, which would make the TestFlight code out of sync with TFS. I then decided to create a post archive script to checkin to TFS every time I generate an archive. 

Unfortunately, git-tf does not return an error if the connection with TFS fails due to invalid credentials. In fact, if we keep providing an invalid password, it keeps asking for the password again 4 times before it ends without returning any error to the calling script. Which means that it can even lock the account depending on the policies of your company.

Since I didn't resolve the changing password problem, I decided to add a script that would always prompt the user for a password. At least the developer doesn't need to go to the terminal to run a script to checkin.  Because I don't know how to show a prompt in Xcode without using AppleScript, that's the language I had to use to accomplish that.

Here is an example:

set automatedBuild to do shell script "echo ${AUTOMATED_BUILD:='NO'}"

if (automatedBuild ≠ "YES") then
    set archiveComment to "Xcode generated"
    set dialogResult to display dialog "Enter TFS password:" default answer "" hidden answer yes buttons {"OK"}
    set userName to text returned of dialogResult
    do shell script "/bin/bash --login -c \"cd $SRCROOT/.. ; echo "& userName & " | git-tf checkin \" 2>&1  "
    display dialog "Code saved to TFS..." buttons {"OK"}
end if

set archiveDir to do shell script "ls -dt1 $HOME/Library/Developer/Xcode/Archives/*/*.xcarchive |head -n1"
try
do shell script "/usr/libexec/PlistBuddy -c \"Add :Comment string " & quoted form of archiveComment & "\" " & quoted form of archiveDir & "/Info.plist"
on error

end try
do shell script "/usr/libexec/PlistBuddy -c \"Set :Comment " & quoted form of archiveComment & "\" " & quoted form of archiveDir & "/Info.plist"
do shell script "/usr/libexec/PlistBuddy -c 'Save'  " & quoted form of archiveDir & "/Info.plist"
do shell script "/usr/libexec/PlistBuddy -c \"Set :Name 'QAbuild'\" " & quoted form of archiveDir & "/Info.plist"
do shell script "/usr/libexec/PlistBuddy -c 'Save' " & quoted form of archiveDir & "/Info.plist"

This script assumes that the user has configured git-tf with her username, but it is not hard to change it to get the user name from the user running the archive in Xcode.

This code also changes the comment and the name of the archive file, so we can see on Xcode Organizer that this build was generated by Xcode and not by our automated build script.

I have the test of the Automated Build flag because the same scheme is used in our automated build solution that I'll explain later.

3. Lack of Macs

As I explained, Macs are hard to get at my company. But the fact that all the code I was working with had to be built on a Mac and that I was the only person with access to it, convinced my boss to invest in a Mac Mini server to be our build server. I had now to make it possible to remotely trigger the build and deployment on that machine.

My first try was using Bots. It took me awhile to figure out how to use them. I demo'ed to my boss and he was very excited, because the dev ops could access the bots via web from their Windows boxes.

The major road block with Bots is that it requires git in order to work. I also didn't find the Xcode documentation very enticing and it lacks more meaningful examples. I did entertain the idea of scripts that would pull the code from TFS on the a git server on the build machine, but I haven't convinced dev ops of the feasibility of this solution yet. They were already developing workflows in TFS that queue the builds of all the .NET stuff and they opted for going that way.

I wrote a script that receives as arguments the environment of the build (DEV, QA, UAT, PROD), the scheme (I have some projects with more than one target) and it sets the identities, provisioning profiles, etc for xcodebuild to generate the archive directly from the command line. It also generates the .ipa file and uploads it to TestFlight if the build is for a non-production environment. The idea is to extend this build script to upload the binary to the Appstore for production environments of our public apps, but we are not quite there yet. This will remove the need for the dev ops to access a Mac except running remote tasks from Windows or accessing web servers.

Here is the example of the build script:

while getopts t:e: option
do
case "${option}" in

e) CONFIG=${OPTARG};;
t) TARGET=${OPTARG};;
?|*) printf "Usage: %s: [-t value] comments \n"  $0
exit 2;;
esac
done

if [ $OPTIND -gt 1 ]; then
shift $(($OPTIND - 1))
printf "Remaining arguments are: %s\n" "$*"
ARCHIVE_COMMENT="$*"
else
printf "Usage: %s: [-t target] [-e environment] comments \n"  $0
exit 2
fi

printf 'Building %s - %s\n' "$CONFIG" "$ARCHIVE_COMMENT"

# set Apple developer account as team
IDENTITY=""

case "$CONFIG" in

DEV) CONFIG="Debug"
PROVISIONING_PROFILE=""
PROVISIONING_PROFILE_NAME=""
;;
QA) CONFIG="Ad-Hoc"
PROVISIONING_PROFILE=""
PROVISIONING_PROFILE_NAME="c"
;;
UAT) CONFIG="UAT"
PROVISIONING_PROFILE=""
PROVISIONING_PROFILE_NAME=""
;;
PROD)CONFIG="Production"
PROVISIONING_PROFILE=""
PROVISIONING_PROFILE_NAME=""
# set Apple developer account as team
IDENTITY=""
;;
*) echo "Configuration Option not valid, building for Production"
CONFIG="Production"
PROVISIONING_PROFILE=""
PROVISIONING_PROFILE_NAME=""
IDENTITY=""
;;
esac

PROJECT=`find . -name *.xcodeproj -print`

if [ -z "$TARGET" ]
then
TARGET=$PROJECT
fi

xcodebuild -project ${PROJECT} -configuration ${CONFIG} -scheme  ${TARGET} -destination generic/platform=iOS CODE_SIGN_IDENTITY="$IDENTITY" PROVISIONING_PROFILE="${PROVISIONING_PROFILE}" archive ARCHIVE_COMMENT="${ARCHIVE_COMMENT}" AUTOMATED_BUILD=YES 

ARCHIVE_DIR=`ls -dt1 $HOME/Library/Developer/Xcode/Archives/*/*.xcarchive |head -n1`
CURRENT_DIR=`pwd`
IPA_DIR=`dirname $CURRENT_DIR`

#create ipa signed binary package

if [ -f $IPA_DIR/$CONFIG.ipa ]
then
 rm $IPA_DIR/$CONFIG.ipa
fi

xcodebuild -exportArchive -exportFormat IPA -archivePath "${ARCHIVE_DIR}" -exportPath ${IPA_DIR}/${CONFIG} -exportProvisioningProfile "${PROVISIONING_PROFILE_NAME}" 

#uploadds response to
declare -i HTTPRESPONSE

HTTPRESPONSE=`curl -X POST -sL -w "%{http_code}" http://testflightapp.com/api/builds.json -F file=@${IPA_DIR}/${CONFIG}.ipa -F api_token='' -F team_token='' -F notes="${ARCHIVE_COMMENT}" -F notify=True -F distribution_lists='DevOps' -o ${IPA_DIR}/${CONFIG}_curloutput.txt`

echo "HTTP Response is" $HTTPRESPONSE
cat ${IPA_DIR}/${CONFIG}_curloutput.txt
rm ${IPA_DIR}/${CONFIG}_curloutput.txt

if [ $HTTPRESPONSE -ne 200 ]; then
exit $HTTPRESPONSE
fi

We do have the need to change identities and provisioning profiles because some of our users need to have the same app for the different environments loaded on the a single device at the same time, so they can make comparisons. And because the apps use push notification, each distribution requires its own unique app bundle id and provisioning profile.

We also need to change identities, because we use the enterprise program for development and in-house distribution and the Developer program for deployment to the app store.

The complete solution uses a TFS workflow that accesses the Mac Mini via ssh, copies the source code from TFS and runs the build script passing the environment, the target and the TFS PBI or Bug number and description as comments. The dev ops did their TFS magic there. I just helped on the Mac side to configure the proper ssh certificates, key pairs, proper keychain. On the TFS side, when the developer merges and commits the code to the QA branch, she has to associate it with a specific task or bug that this commit is supposed to fix. When queuing the build task, it is associated to the pbi or bug as well and additional information is captured from the user in a form. Between the form and the source code in the repository, the TFS build task finds out all the necessary information to copy the source code  to the mac mini build server, run the build script and report the results back to the TFS.  All the workflow is then controlled on the TFS/Windows side accessing the Mac Mini via ssh as needed.

4. Backend integration

Our apps access Salesforce on the backend most of the time. We have different end points on the Salesforce cloud depending on the environment we are targeting. Sometimes the end point is determined based on the credentials provided and other times the endpoint requires a change on certain URLs accessed by the app. The vendor that wrote the initial version of the app (Salesforce itself) opted for a conditional compilation of hard-coded constants in the pre-compiled header. They were first supporting only two sets of configurations (Debug and Ad-Hoc) and they would just use one #ifdef Debug to determine which set to use during build time. When I took over the coding, I  had to support 4 sets. I added 2 more configurations to the project and each extra configuration sets its specific variable (DEV, QA, UAT, PROD).

I used all the conditional definitions that I could inside the build settings. I have specific bundle IDs based on conditional settings provided by build settings in Xcode. I have specific app name and display name based on Executable_Prefix that is conditionally defined in build settings as well.

My next step will be to remove the hard-coded constants from the pre-compiled header and put them into a plist file like the UA configuration for push notification. In the future, we can have in the future an API that allows us to change these settings at runtime, without the need to submit upgrades to the App Store for approval, when we change our endpoints on the backend.

5. Corporate network

This was one of the hardest things to work around, because the security restrictions and the lack of privileges developers have in our network.  For the TFS build workflow to work, we had to create a local user on the Mac Mini that was used to host the developer's certificate and signing authority certificates in its keychain that we could then unlock for the xcodebuild to access during building and archiving.

The service domain user prepares all the files for the build and switches to the local user to execute the build script. The local user only exists on the build server and it has minimal permissions on the box.

We had to do that in order to avoid sending sensitive passwords over the ssh session or inside the scripts. Even though we were authenticated on the ssh session, OS/X was still asking for a password to allow xcodebuild access to the keychain. We tried setting this access for xcodebuild in the keychain, but it didn't work. 

The upload to TestFlight part of the script would fail every other try due to proxy server authentication problems. The dev op working with me found out that the cause was a bug on Mavericks when the Mac is connected to a gateway with redundancy (see this discussion here). We added a USB to RJ45 adapter and switched to using this NIC to solve the problem. Now, even the VNC sessions with the Mac Mini work much better.

6. Maintaining the version string consistent across deployments

More than once, when I was hasting the manual deployments, I forgot to update the version short and long strings accordingly. 

First, I think Apple calling the short version string "version" and the long version string "build" was a mistake that causes a lot of confusion. TestFlight shows the releases of your builds as () but based on Apple's documentation, what they call build is in fact .  It doesn't have to be that way, you can treat both of them independently, but that's what is expected. And when you submit an update for your app to the apple store, they always expect both of them to be higher than the previously submitted binaries.

What the vendor did on their code was to keep both identical and manually increment both together when making a new deployment.

After a couple of mistakes in the manual process, I decided to incorporate the increment of these numbers to the archive script. 

We settled for a short version string in the format of M.m.r (major. minor.review) and the build or long version string as M.m.r.build.

Now, every time we run a QA archive the script increments the build number, and every time we deploy a production build, the script increments the review number. 

The major and minor numbers don't change that often, so they are still maintained manually.

Conclusion

I'm also starting to use configuration files that I can load in Xcode across different projects. I'm compiling all the different build settings from all our projects, determining the common settings, the unique settings per environment and per project that I can segregate in separate configuration file and then refer to them in Xcode.

The build script right now is project dependent. I'm also working on defining project templates or wizards that can be used by other developers when starting a project from scratch. I'm still considering if I should do it like wizards that capture the project specific definitions from a user dialog and then create the project tree for you, a template that the user clones to build his own project or a tool that traverses the project and builds the necessary scripts based on the projects definitions.

The solution is far from complete and I'm still learning the best way to use each tool. I'm also hopeful that in the near future my company will upgrade TFS to fully support git. Until then, this combination of scripts, programs and tools will help us deploy faster and better than doing everything manually. 

If you have suggestions to help us, they are all welcome. Please, leave your suggestions in the comments area, or share with us your solutions to similar problems.

Sunday, September 29, 2013

How to answer PACs emails asking for money

OK, I spent a couple of hours this evening answering to all these messages from PACs asking for money so they can "ensure that my voice will be heard". First of all, we shouldn't need anyone to ensure that our voices should be heard by politicians that should be working for us on the first place. So what did I tell them?

I told them that I'm going to donate the money they are asking but not to their wallets. I'm going to donate what they are asking to the Out of the darkness walk of North Texas. I'll even donate on their behalf and I gave them the link, so they can donate more if they want to hear my voice themselves. I don't need intermediaries to talk to the politicians. I write to them directly. Their computer is just as good as the PACs computers in answering me.


Here is a sample of my dialog with them:




Teresa --

It's been a while since I've written, but it's a good time to check in.

For the first time in a long time, our side gained some real momentum over the summer -- on everything from immigration reform to climate change.

This is why we organize in between elections.

We all have a personal stake in what happens over the next few years.

Teresa, what is the number one issue you care about?

http://my.barackobama.com/Just-One-Question

We have some big challenges ahead, and how you decide to be part of them will be as important as ever.

Barack is going to keep fighting for the things we believe in, and if he can count on you, too -- well, that's when we get things done.

Thank you,

Michelle

P.S. -- Don't forget to share more about what makes you tick.


Hello Michelle,

I'm flattered that your computer remembers my name and drops me a message on your behalf from time to time. I didn't train my computer to return your attentiveness in the same way.

But here it is. I'll do it myself. I'm participating on the Out of Darkness walk here in North Texas and here is your chance to reward my patience and hard work to support politicians that do very little to organize this country to be fair with the majority of its people.

We would appreciate donations to our walk, so AFSP can continue to fund the cause of suicide prevention, filling a gap that the government is very quick to create and very slow to fill.

Please, consider a donation to honor all our children and citizens lost to suicide and all the ones affected by it.

http://afsp.donordrive.com/index.cfm?fuseaction=donordrive.participant&participantID=472223


Teresa , mom of Flavio 05/12/1984-07/22/2009
http://flavio-riosabreu.gonetoosoon.org






Teresa --

It's not every day you get a note from the First Lady.

We're asking because we really want to know -- what's the issue that drives you to be part of this movement?

http://my.barackobama.com/Just-One-Question

Thanks,

Organizing for Action

----------Original Message----------
From: Michelle Obama
Subject: Teresa, it's me

Teresa --

It's been a while since I've written, but it's a good time to check in.

For the first time in a long time, our side gained some real momentum over the summer -- on everything from immigration reform to climate change.

This is why we organize in between elections.

We all have a personal stake in what happens over the next few years.

Teresa, what is the number one issue you care about?

http://my.barackobama.com/Just-One-Question

We have some big challenges ahead, and how you decide to be part of them will be as important as ever.

Barack is going to keep fighting for the things we believe in, and if he can count on you, too -- well, that's when we get things done.

Thank you,

Michelle

P.S. -- Don't forget to share more about what makes you tick.

Yes, it's not every time that I get a note from the first lady and guess what? I never sent her a personal note either.

But here it is. I'm participating on the Out of Darkness walk here in North Texas and here is your chance to reward my patience and hard work to support politicians that do very little to organize this country to be fair with the majority of its people.

We would appreciate donations to our walk, so AFSP can continue to fund the cause of suicide prevention, filling a gap that the government is very quick to create and very slow to fill.

Please, consider a donation to honor all our children and citizens lost to suicide and all the ones affected by it.

http://afsp.donordrive.com/index.cfm?fuseaction=donordrive.participant&participantID=472223


Teresa , mom of Flavio 05/12/1984-07/22/2009
http://flavio-riosabreu.gonetoosoon.org






Teresa --

We're about to close our books on this quarter -- so we've been making sure our records are up to date.

Here's what we have down for you, at this exact email address:

    -- OFA status: Active supporter (Thanks!)
    -- Donor: Pending
    -- Suggested donation: $5

If you chip in today, before the big fundraising deadline on September 30th, your name will appear on our brand-new OFA Donor Wall on BarackObama.com -- featuring the names of everyone who is stepping up at this critical time.

Thanks to you, our movement is as strong as ever.

We're making big plans for the next few months -- that's why you should get your perfect record of support started now.

Chip in $5 or more today:

https://donate.barackobama.com/September-2013-Deadline

Thanks,

Jon

Jon Carson
Executive Director
Organizing for Action

----------------
The other side will spend millions to maintain the status quo. We're fighting for change -- chip in $5 or more to support OFA today.

Jon,

Guess what? My son is already on a wall. And I truly hope that none of your children end up there, because this wall in Columbia,TN is to remember the loved ones who died by suicide. Take a good look at all the beautiful faces there and try to imagine all the sad faces of their loved ones left behind.

http://www.facesofsuicide.com

http://www.suicidememorialwall.com

My son's name is Flávio Augusto Rios-Abreu and he died on July 22nd, 2009.

If you have time, please, go to Columbia,TN to look at the Suicide Memorial Wall and spend sometime with Mrs. Beal. She will be glad to tell you her story and so many stories similar to mine.

Here is what I can do for you: I'm willing to donate not $5, but $20 on behalf of OFA to the Out of the Darkness Walk in North Texas, to remember the ones touched by suicide. AFSP will make a better use of this money in suicide prevention than all the politicians in Washington have done so far.

In case you want to contribute as well with this great cause, here is my donor page: http://afsp.donordrive.com/index.cfm?fuseaction=donordrive.participant&participantID=472223

Thanks,

Teresa , mom of Flavio 05/12/1984-07/22/2009
http://flavio-riosabreu.gonetoosoon.org




Teresa -

It's tempting to look only at where we are and get mired down in our day to day struggles. It's easy to lose sight of how far we've come.

We won a minimum wage, outlawed child labor, and established safety standards for work. We fought for Social Security and Medicare, lifting countless seniors out of poverty. We expanded public schools, established public universities, and held open the doors of higher education for the first time.

In Robert Reich's new documentary film exposing the roots of income inequality in America, the former Secretary of Labor makes a really powerful point: "Anyone of you who feels cynical, just consider where we have been."

To which I would add; consider where we can go again.

Please fuel our campaign to win with a contribution right now.

It's time for us to dream big dreams again.

Democracy for America members have been leaders in the fights to protect Medicare, Medicaid and Social Security from cuts. We're going on offense in calling for an expansion of Social Security benefits and backing it up with polling showing popular support in Republican districts across the country.

We're joining with low-wage workers nationwide, demanding McDonald's and other highly profitable fast food restaurants pay a livable wage. We'll be delivering over 55,000 signatures to McDonald's headquarters and local franchises over the next month backing up striking workers and increasing the pressure on them to do the right thing.

We will expose Republicans for voting to cut 40 billion dollars from the food stamps program. We'll make TV ads sharing personal stories of working moms, children, and veterans who rely on assistance so they don't have to choose between food and rent.

We're fighting for an economy that works for everyone, not just the very wealthy few.

Together, we have to take this fight on with the resources needed to win. Please contribute $25 right now to make it happen.

We'll fight to ensure that your voice, and the voices of Americans from every walk of life, are heard above large corporations and their DC lobbyists.

Thank you, Teresa, for working together to win.

-Howard

Governor Howard Dean, Founder
Democracy for America

Hello Governor Dean,

I have a son who was born only 2 days before Mark Zuckerberg and like the Facebook genius founder, he is a brilliant young man that can see way ahead of its time and is destined to great accomplishments.

But differently than Zuckerberg, my son won't have any chance in this life, because he died in July 22nd, 2009 to suicide.

Too many factors can lead a person to suicide, but no matter the reasons, the consequences of suicide to society is enormous.

It's sad that our political class and our elites don't pay attention to that and do very little to prevent suicide. I too want things to happen, but I realized that donating to organizations like yours is doing very little to promote the changes the I want to be promoted to prevent the tragedy that happen to me to be repeated in other families. We need to take suicide prevention more seriously and we need to care for the loved ones left behind.

Here is what I'm going to do for you. I'll donate the $25 that you are asking from me to the Out of the Darkness Walk of North Texas. I'll even donate it in your behalf. And here is a chance for you to donate even more:

http://afsp.donordrive.com/index.cfm?fuseaction=donordrive.participant&participantID=472223

Don't fight to ensure that my voice will be heard, instead, donate money for AFSP to continue its wonderful work of love.

Thank you,


Teresa , mom of Flavio 05/12/1984-07/22/2009
http://flavio-riosabreu.gonetoosoon.org

Wednesday, April 10, 2013

Studying complex problems: how to compare partial solutions and decide which one is the best.

I finally found an excuse to study the game of spider solitaire in depth:
How to evaluate among several partial solutions of a complex problem, which one is best and how close or far they are from the best solution.