Tuesday, December 5, 2017

Do whatever makes you happy is a lie

sustainability is what it’s all about.

Except for really rare cases (and you shouldn’t think you are one), doing what makes you happy is unsustainable

Rather than doing what you love,
just don’t do what you hate.


Dismiss those possibilities that clearly suck the life out of you, and choose something that you know will not be a burden for you. Probably it won’t be your dream job, but it will give you mental and financial stability to do what you love on your free time. It will give your passion some solid ground to build upon.

source

Sunday, March 31, 2013

A919Tool

requirements: root

this is an alternative app to Rebooter, Sd-booster, Screen-off and lock, Torch,
EasyTouch, and AdrenalineBoost_V3 applications/scripts.
this is your 6-in-1 minimalist app, no ads, no bloatwares. Just simply your phone's bestfriend :)



To upgrade/uninstall:
goto Settings>Security>Device Administrators, then deactivate A919Tool.
you can now uninstall the app in Settings>Apps.

The 2 services used by the app only consumes 3.8Mb (small memory footprint)

  • Toggle on/off Capacitive LED buttons (saves your phone's precious battery juice).

  • Toggle on/off Quadrant I/O-nizer (placebo for those folks who likes to brag a high quadrant score).
(run your quadrant-standard/advanced-app after activating)

  • Reboot, Reboot to Recovery, and Shutdown function.

  • Screen Off function (to enable screen off feature, app must be given device admin permission to lock screen.  goto Settings>Security>Device Administrators).

  • SD Card Read Ahead Cache value setter

  • Autorun feature and Autorun notification icon in toolbar :)
  (note: Autorun service in memory is de-allocated as required by
Android OS, no need to force kill it, if you don't want the
service to run on boot, just uncheck 'Run on startup' in the app's settings)

  • Added Screen-Off Button (Overlay) so you can turn off your screen using any homescreen of your launcher. (medyo dumugo ilong ko dito hehe)
 

  • Flashlight function.

  • HyperAccelerate (boost free RAM).  Replacement for the cumbersome AdrenalineBoost_V3 and !FastEngineFlush.sh (V6 SuperCharger). No need for flashing via CWM or running via Terminal/Console.  Instantly free up RAM with just a click of a button :D  NOTE: this is NOT yet another task killer application, it's a totally different app feature that reclaims RAM without killing running apps and services.

  • Nitrous Oxide Service (HyperAccelerate On-Demand), Boost RAM whenever, wherever :)

Get it on Google Play

Wednesday, March 30, 2011

test java


/**
* Deutsche Knowledge Services
* ADSS - BPMS Team
* Copyright 2009
*/
package com.db.dks.bpms.presence.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
* Singleton class used to provide configuration settings from the
* application.properties file
*
* @author quitedw
*
*/
public class ApplicationManager {

private static final Log log = LogFactory.getLog(ApplicationManager.class);

private Properties properties;

private static volatile ApplicationManager instance;

private ApplicationManager() {
try {
loadParameters("/application.properties");
} catch (Exception e) {
log.error("Error loading application properties file!");
}
}

public static ApplicationManager getInstance() {
if (instance == null) {
synchronized (ApplicationManager.class) {
if (instance == null) {
instance = new ApplicationManager();
}
}
}
return instance;
}


public Properties getProperties() {
return properties;
}


private void loadParameters(String fileName) throws Exception {
log.info("Loading application properties...");

InputStream is = null;
try {
is = this.getClass().getResourceAsStream(fileName);

if (null != is) {
properties = new Properties();
properties.load(is);
log.info("successfully loaded: " + fileName);
} else {
throw new Exception("Cannot load application properties file!");
}
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
log.error("error closing InputStream: ", e);
}
}
}
}

}

Wednesday, September 2, 2009

axis2 service name refactoring tips

took me yesterday and the whole day today trying to fix the generated wsdl of the service i deployed inside axis2 webapp's deployment folder.

seems that the and inside the wsdl file.

another painful lesson learned!

Wednesday, August 26, 2009

installing Oracle on DHCP computers

To install a loopback adapter on Windows 2003 or Windows XP:
Open the Windows Control Panel.
Double-click Add Hardware to start the Add Hardware wizard.
In the Welcome window, click Next.
In the Is the hardware connected? window, select Yes, I have already connected the hardware, and click Next.
In the The following hardware is already installed on your computer window, in the list of installed hardware, select Add a new hardware device, and click Next.
In the The wizard can help you install other hardware window, select Install the hardware that I manually select from a list, and click Next.
From the list of hardware types, select the type of hardware you are installing window, select Network adapters, and click Next.
In the Select Network Adapter window, make the following selections:
Manufacturer: Select Microsoft.
Network Adapter: Select Microsoft Loopback Adapter.
Click Next.
In the The wizard is ready to install your hardware window, click Next.
In the Completing the Add Hardware Wizard window, click Finish.
If you are using Windows 2003, restart your computer.
Right-click My Network Places on the desktop and choose Properties. This displays the Network Connections Control Panel.
Right-click the connection that was just created. This is usually named "Local Area Connection 2". Choose Properties.
On the General tab, select Internet Protocol (TCP/IP), and click Properties.
In the Properties dialog box, click Use the following IP address and do the following:
IP Address: Enter a non-routable IP for the loopback adapter. Oracle recommends the following non-routable addresses:
192.168.x.x (x is any value between 0 and 255)
10.10.10.10
Subnet mask: Enter 255.255.255.0.
Record the values you entered, which you will need later in this procedure.
Leave all other fields empty.
Click OK.
Click OK.
Close Network Connections.
Restart the computer.
Add a line to the SYSTEM_DRIVE:\WINDOWS\system32\drivers\etc\hosts file with the following format, after the localhost line:IP_address hostname.domainname hostname
where:
IP_address is the non-routable IP address you entered in step 16.
hostname is the name of the computer.
domainname is the name of the domain.
For example:10.10.10.10 mycomputer.mydomain.com mycomputer

Sunday, July 26, 2009

pragmatic tips

Care About Your Craft
Why spend your life developing software unless you care about doing it well?

Provide Options, Don’t Make Lame Excuses
Instead of excuses, provide options. Don’t say it can’t be done; explain what can be done.

Be a Catalyst for Change
You can’t force change on people. Instead, show them how the future might be and help them participate in creating it.

Make Quality a Requirements Issue
Involve your users in determining the project’s real quality requirements.

Critically Analyze What You Read and Hear
Don’t be swayed by vendors, media hype, or dogma. Analyze information in terms of you and your project.

DRY—Don’t Repeat Yourself
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

Eliminate Effects Between Unrelated Things
Design components that are self-contained, independent, and have a single, well-defined purpose.

Use Tracer Bullets to Find the Target
Tracer bullets let you home in on your target by trying things and seeing how close they land.

Program Close to the Problem Domain
Design and code in your user’s language.

Iterate the Schedule with the Code
Use experience you gain as you implement to refine the project time scales.

Use the Power of Command Shells
Use the shell when graphical user interfaces don’t cut it.

Always Use Source Code Control
Source code control is a time machine for your work—you can go back.

Don’t Panic When Debugging
Take a deep breath and THINK! about what could be causing the bug.

Don’t Assume It—Prove It
Prove your assumptions in the actual environment—with real data and boundary conditions.

Write Code That Writes Code
Code generators increase your productivity and help avoid duplication.

Design with Contracts
Use contracts to document and verify that code does no more and no less than it claims to do.

Use Assertions to Prevent the Impossible
Assertions validate your assumptions. Use them to protect your code from an uncertain world.

Finish What You Start
Where possible, the routine or object that allocates a resource should be responsible for deallocating it.

Configure, Don’t Integrate
Implement technology choices for an application as configuration options, not through integration or engineering.

Analyze Workflow to Improve Concurrency
Exploit concurrency in your user’s workflow.

Always Design for Concurrency
Allow for concurrency, and you’ll design cleaner interfaces with fewer assumptions.

Use Blackboards to Coordinate Workflow
Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants.

Estimate the Order of Your Algorithms
Get a feel for how long things are likely to take before you write code.

Refactor Early, Refactor Often
Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.

Test Your Software, or Your Users Will
Test ruthlessly. Don’t make your users find bugs for you.

Don’t Gather Requirements—Dig for Them
Requirements rarely lie on the surface. They’re buried deep beneath layers of assumptions, misconceptions, and politics.

Abstractions Live Longer than Details
Invest in the abstraction, not the implementation. Abstractions can survive the barrage of changes from different implementations and new technologies.

Don’t Think Outside the Box—Find the Box
When faced with an impossible problem, identify the real constraints. Ask yourself: ``Does it have to be done this way? Does it have to be done at all?’‘

Some Things Are Better Done than Described
Don’t fall into the specification spiral—at some point you need to start coding.

Costly Tools Don’t Produce Better Designs
Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits.

Don’t Use Manual Procedures
A shell script or batch file will execute the same instructions, in the same order, time after time.

Coding Ain’t Done ‘Til All the Tests Run
‘Nuff said.

Test State Coverage, Not Code Coverage
Identify and test significant program states. Just testing lines of code isn’t enough.

English is Just a Programming Language
Write documents as you would write code: honor the DRY principle, use metadata, MVC, automatic generation, and so on.

Gently Exceed Your Users’ Expectations
Come to understand your users’ expectations, then deliver just that little bit more.

Think! About Your Work
Turn off the autopilot and take control. Constantly critique and appraise your work.

Don’t Live with Broken Windows
Fix bad designs, wrong decisions, and poor code when you see them.

Remember the Big Picture
Don’t get so engrossed in the details that you forget to check what’s happening around you.

Invest Regularly in Your Knowledge Portfolio
Make learning a habit.

It’s Both What You Say and the Way You Say It
There’s no point in having great ideas if you don’t communicate them effectively.

Make It Easy to Reuse
If it’s easy to reuse, people will. Create an environment that supports reuse.

There Are No Final Decisions
No decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change.

Prototype to Learn
Prototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn.

Estimate to Avoid Surprises
Estimate before you start. You’ll spot potential problems up front.

Keep Knowledge in Plain Text
Plain text won’t become obsolete. It helps leverage your work and simplifies debugging and testing.

Use a Single Editor Well
The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.

Fix the Problem, Not the Blame
It doesn’t really matter whether the bug is your fault or someone else’s—it is still your problem, and it still needs to be fixed.

``select’’ Isn’t Broken
It is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application.

Learn a Text Manipulation Language
You spend a large part of each day working with text. Why not have the computer do some of it for you?

You Can’t Write Perfect Software
Software can’t be perfect. Protect your code and users from the inevitable errors.

Crash Early
A dead program normally does a lot less damage than a crippled one.

Use Exceptions for Exceptional Problems
Exceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things.

Minimize Coupling Between Modules
Avoid coupling by writing ``shy’’ code and applying the Law of Demeter.

Put Abstractions in Code, Details in Metadata
Program for the general case, and put the specifics outside the compiled code base.

Design Using Services
Design in terms of services—independent, concurrent objects behind well-defined, consistent interfaces.

Separate Views from Models
Gain flexibility at low cost by designing your application in terms of models and views.

Don’t Program by Coincidence
Rely only on reliable things. Beware of accidental complexity, and don’t confuse a happy coincidence with a purposeful plan.

Test Your Estimates
Mathematical analysis of algorithms doesn’t tell you everything. Try timing your code in its target environment.

Design to Test
Start thinking about testing before you write a line of code.

Don’t Use Wizard Code You Don’t Understand
Wizards can generate reams of code. Make sure you understand all of it before you incorporate it into your project.

Work with a User to Think Like a User
It’s the best way to gain insight into how the system will really be used.

Use a Project Glossary
Create and maintain a single source of all the specific terms and vocabulary for a project.

Start When You’re Ready
You’ve been building experience all your life. Don’t ignore niggling doubts.

Don’t Be a Slave to Formal Methods
Don’t blindly adopt any technique without putting it into the context of your development practices and capabilities.

Organize Teams Around Functionality
Don’t separate designers from coders, testers from data modelers. Build teams the way you build code.

Test Early. Test Often. Test Automatically.
Tests that run with every build are much more effective than test plans that sit on a shelf.

Use Saboteurs to Test Your Testing
Introduce bugs on purpose in a separate copy of the source to verify that testing will catch them.

Find Bugs Once
Once a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on.

Build Documentation In, Don’t Bolt It On
Documentation created separately from code is less likely to be correct and up to date.

Sign Your Work
Craftsmen of an earlier age were proud to sign their work. You should be, too.

Tuesday, July 21, 2009

catching the boat late...

currently reading: the pragmatic programmer, from journeyman to master... (published last 1999)

orthogonal, DRY, Tracer Bullets, Draconian... now i know where they got those words! =)