task

What’s Important Now (WIN) alvin March 21, 2018 - 12:26pm

I know, it’s a little corny, but instead of writing out a “To-Do List” — which implies hard labor and/or something I force myself to do — these days I write “WIN” on the top of my index cards. WIN stands for, “What’s Important Now”, and I find that this change in wording changes my attitude towards the things that need to be done. Rather than thinking, “Ugh, okay, what do I have to do next,” I now think of these tasks as important to me, my future, and my success.

Looking at some differences between Scalaz Task and Scala Future

Table of Contents1 - The Scala Future example2 - The Scalaz Task example3 - What happens when you call the Future twice?4 - What happens when you call the Task twice?5 - Is one approach correct?6 - Source code

Some time ago I was searching for something and came across this Reddit thread about this tweet from Timothy Perrett, who leads Scala teams at Verizon:

“The fact that #scala Future is not lazy just blows my mind. After years of using Scalaz Task, Future is now totally unusable.”

The last part of that tweet is a bit of hyperbole to me, as I’ve been using the Scala Future for a long time myself, and I’ve had no problems using it. That being said, the examples at the top of the Reddit page were interesting, so I decided to try to understand the differences.

How to “publish” a Scala/SBT library

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.15, “Publishing an SBT Library.”

Problem

You’ve created a Scala project or library with SBT that you want to share with other users, creating all the files you need for an Ivy repository.

On the Scala Future, and semantics

In programming, semantics can be important. While in many cases I don’t care too much how developers name classes and variables, in some cases monikers can cause problems. (Perhaps even in that sentence.)

Setting Mac iCal event reminders

Mac iCal event reminders FAQ: How do I configure a Mac iCal reminder to remind me of birthdays, due dates for bills, and so on?

If you're new to the Mac world, and want to be able to set up reminders for various things like birthdays, pay bills, or attend events, the good news is that you can do this with the free software already installed on your Mac. The iCal Mac calendar application is just what you need.

Java, ProGuard, and Ant - How to obfuscate Java class files with ProGuard alvin August 5, 2010 - 9:46pm

Java obfuscator/obfuscation FAQ: How can I obfuscate my Java class files so they can't easily be decompiled? (Or, how do I use ProGuard to obfuscate my Java class files?)

An Ant 'exclude classes' example

Problem: You want to build your Java project using Ant but you need to be able to skip certain files -- typically unit test files -- during the compilation or deployment processes.

Solution: You can skip files during the Ant compilation process by using the Ant exclude pattern. Here's an example that shows several exclude patterns in some XML code taken directly from an Ant build script:

Ant - How to use a date or timestamp in an Ant build script

Summary: An Ant date and timestamp (tstamp) task example.

I was just digging through some Ant build scripts I've created, and I noticed a segment of a build script that first creates a timestamp, and then uses that timestamp in the process of creating a manifest file. (This build script is used for building a Java Swing application.)

Here's the code from my Ant script that does this timestamp magic:

How to compile a Java program with Ant

While I'm digging around through Ant build scripts today, here's a sample Ant target I created that demonstrates how to compile a Java program, while also showing a few other things, including how to exclude your JUnit tests during the compile process.