Sunday, June 24, 2012

Including a Web API in knockout (going from hard coded to dynamic) (Part 1)

Technologies

ASP.NET MVC 4.0 Release candidate, Web API, Knockout.js, C#

Goal

Make a web architecture that separates the API from the UI and will move toward mobile.  Use the technologies listed above, together.  Move toward using Upshot.js, Entity Framework, and Knockout mapping if they help.

Background

In my last post I got Knockout working in MVC 4.0.  I’m happy with that but the way the sample was created that I was following, it was hard-coding the JSON on the client:
$(function () {

    var data = 
        [
            { Id: 1, Name: "Ball Handling" },
            { Id: 2, Name: "Passing" },
            { Id: 3, Name: "Shooting" },
            { Id: 4, Name: "Rebounding" },
            { Id: 5, Name: "Transition" },
            { Id: 6, Name: "Defense" },
            { Id: 7, Name: "Team Offense" },
            { Id: 8, Name: "Team Defense" }
        ];

    var viewModel = {

        tags: ko.observableArray(data),
        tagToAdd: ko.observable(""),

        //behaviors
        addTag: function () {
            this.tags.push({ Name: this.tagToAdd() });
            this.tagToAdd("");
        }

    };

    ko.applyBindings(viewModel);

});

Since I want to have a dynamic application that has a database and a web API, I need to make sure that I can get data from my server.  And I don’t know how to do that.  So here’s how!

What I want to do is replace the block where var data = “bla bla bla” with var data = data from my web API.  But first I need a web API.  Well, good thing, I already created a new Web API project in Visual Studio, so if I’m smart enough, I should just be able to call it………

wr1b1zhf

Getting it done, the steps


My first question is how does the UI “see” the API?  In particular, what’s the API’s address if Visual Studio has a dynamic server name like localhost:30983445. 

I ran into this page about single page web apps and thought to myself that maybe I had been doing it wrong.  Maybe I want to create a single-page web application and all of this wiring exists!?

So I started learning more about SPA (Single Page Applications) by watching this video with Steve Sanderson.  It’s an architecture.

So I went to my Visual Studio to find the SPA template and it was not there.  So I did some searching and found on this forum this, "Alright folks.. I found the answer. Single page templates have been withdrawn from MVC4 RC release and will not be available in the final release too. The team have identified that there are incompatibilities and they would like to work on it further before its released."  Son of a!!!!!!!!!

The page also gave instructions on how to hack around it so I started doing that.

I installed the Single Page Application Nuget Package (details on this page) into my non-Web API project.

It seems to have done it’s job.  I noticed it uninstalled some knockout stuff.  I hope that’s not an issue:
Successfully uninstalled 'jQuery 1.6.2'.
Successfully uninstalled 'knockoutjs 2.0.0'.

I was psyched to download a demo SPA app from Bart Jolling but it didn’t run.  I figured it had to do with the move from Beta to release candidate.  So I kept watching the video.

At 21 minutes, 40 seconds in the video, Steve says that Web API URLs have  a /API prefix.  So maybe this is the answer to my question.  I go and test this a little.

I started thinking that the place I need to implement my knockout is in my Web API project.  It turns out the the Web API projects can be both the web API and client.  I don’t know how good this practice is but it gets me past this current scenario so I move all of my modifications from the other project into my Web API project to see if I’m at least on the same, stable ground there.

I add the scripts that I think I have to have to _Layout.cshtml:
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/themes/base/css", "~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
</head>
<body>
    @RenderBody()

    @Scripts.Render("~/bundles/jquery")
    <script type="text/javascript" src="http://github.com/downloads/SteveSanderson/knockout/jquery.tmpl.js"></script>
    <script type="text/javascript" src="~/Scripts/knockout-2.1.0.js"></script>
    <script type="text/javascript" src="~/Scripts/knockout.mapping-latest.js"></script>
    @RenderSection("scripts", required: false)
</body>
</html>

I went into the Index.cshtml page and tried to paste my same code but it was angry.  So I started to think maybe it would work if the more robust Mobile Template was the main project and it had the Web API stuff embedded in it.  This is seeming more plausible: from that project I get this option:

5xo2ppkf

So I decided to try to solve my project within the Mobile template to make it have a web API inside of it.  My goal was to only prove that I could get anything from my web API so I just pasted in the stuff from the default ValuesController that comes out of the box in the Web API template:
public class ValuesController : ApiController
{
    // GET api/values
    public IEnumerable<string> Get()
    {
        return new string[] { "value1", "value2" };
    }

    // GET api/values/5
    public string Get(int id)
    {
        return "value";
    }

    // POST api/values
    public void Post(string value)
    {
    }

    // PUT api/values/5
    public void Put(int id, string value)
    {
    }

    // DELETE api/values/5
    public void Delete(int id)
    {
    }
}

Now I needed to test if I would be able call /api/values/get/5 and have it return “values”.  (or even if that URL existed).  At this point I deleted the API project since I was no longer planning to use it and wanted a clean solution and no noise.  So I was very stoked to see this:

image

It’s returning XML from my Web API within my Mobile App.  It’s looking good.

Continued in next post….(I ran out of space on this Blogger site!!!!!!!!! WTH).

Saturday, June 23, 2012

Scenario 1: Getting MVC 4.0 Release Candidate working with Knockout.js

Goal

To prove that I can make MVC 4.0 work with Knockout.js

Workflow

  1. Create the projects in Visual Studio 2010.
  2. Followed this guy’s steps for installing Knockoutjs using Nuget.  His instructions weren’t very complete, so I’m providing more detailed info here.

The _Layout.cshtml contents that worked for me are as follows.  Note the order of the scripts at the bottom:

        </div>

@Scripts.Render("~/bundles/jquery", "~/bundles/jquerymobile")
<script type="text/javascript" src="http://github.com/downloads/SteveSanderson/knockout/jquery.tmpl.js"></script>
<script type="text/javascript" src="~/Scripts/knockout-2.1.0.js"></script>
@RenderSection("scripts", required: false)
</body>
</html>

I put the codeFile.js reference into the scripts section so it renders last.


@{
ViewBag.Title = "Test Page";
}

@section scripts
{
<script src="../../Scripts/codeFile.js" type="text/javascript"></script>
}


<div id="tagsList" class="box">
<div class="box-head">

After that, I got it to run (woo hoo, neat!):


asdf


Lessons learned



  • Use sections for scripts on the Razor pages

  • Use Nuget to get packages

  • Be clear in writing your stuff.  The guy that published his article was fast and it helped but it wasn’t very clear so I toiled too much. 

Next steps



  • Tweak this guy’s code so it works with my app / domain.

To do’s



  • Haven’t yet verified that I have knockout.mapping working

Other stuff I did and learned during this post



  • Checked out JSFiddle, which is pretty interesting.
  • Added Sharper Photo to Live Writer.
  • Downloaded and installed PreCode for pasting code in my blog in Live Writer. 
  • I found that Syntax Highlighter for Windows Live Writer sucks. 
  • Sharper Photo plug in for Live Writer sucks.  I’m downloading Clipboard Live now and hope it’s better.

Starting a new, fun project

I'm going to be building a new web and mobile app using Microsoft technologies as the core.  I'm excited about it.  My architecture is as follows:

  • ASP.NET MVC 4.0
  • Web API middle-tier
  • knockout.js
  • SQL Server
  • LINQ to SQL
I think this is the right architecture for me.  I'm excited.  


I'm also excited about the coming of Windows 8 and related apps.  I think that I'm in a good place skills-wise to really contribute as Windows 8 shows power in the market.


Now that Silverlight is further out of the picture and MVC seems so.  Here's an article on the changes coming from a developer perspective given the coming of Windows 8 and the going of Windows Phone 7.


I'm going to update my blog as I learn new things on this development project.


Another thought I'm having is that I'm going to build my web API with a tendency toward building the model on the server site, incrementally, rather than trying to post a big blob once my user's done creating something.  This might be bad architecture but I don't know another way.

Monday, June 04, 2012

Work styles: Disruptive, collaborative, or both?

Pick your poison.  But why not do both in harmony?
Our work styles can be seen as disruptive (creating major change without regard to the current situation), collaborative (partnering deeply with peers to get things done), or a mixture of both.

Disruptive.  The disruptive style is cool and exciting.  It's about innovation and major change.  When I was in 8th Grade, when asked what I wanted to do when I grew up, I told my teacher, Mrs. Moore, that I wanted to either be a heavy equipment operator or a brain surgeon.  She laughed and asked me if I realized as she did that those two fields were markedly different.  I did not and I responded, "I really want to change things dramatically."  I suppose both on macro (bulldozer) and micro (brain) scales.  This still holds true to me.

Collaborative.  The collaborative work style is a really critical, key and important one that I have had to learn over the years.  As an aggressive person who wants to change things drastically I've learned that I have to collaborate and partner with others to get things done.  Leading without followers is not possible.  Sometimes I have to take the back seat and let others drive.

Having both of these capabilities as a disruptive, innovative person and a collaborative person provides balance and synergy between two forces.  Both are good for change but together they provide a pace that is realistic,  sustainable, and powerful.

Three categories of spending: preferred, emergency, unnecessary

Money and spending are part of our lives every day.  Having new ways to think about money and how we spend it can really help us set budgets, spend, earn, and save wisely.
Figuring out how to manage your money is an ongoing battle but having simple processes to follow to help you think effectively about money can really help.  Three categories of money are Emergency (those funds you need when things aren't well), Unnecessary (frivolous uses of funds), and Preferred (how you'd rather spend your money).

Preferred.  In the Preferred category we are spending our money on things we prefer that add value to our lives.  These are the things we are proud of, need, and make us more whole as people.  They are our investments into ourselves and those around us that we are happy to make.

Emergency.  In the Emergency category we need to spend money on things that came up unexpectedly like car repairs, job loss, or fixes of any kind.  This is a "risk pool" of funds that we need to have to feel safe when things go wrong. Many of us do not have a big enough emergency pool but we're working to build it.

Unnecessary.  Finally, the Unnecessary category of money is what we don't need to spend.  We shouldn't be allocating funds to this category but we probably do all of the time (expensive meals, drinking too much, unnecessary services). Many of us probably have a larger-than-we'd-like set of things in this category and we need to analyze and consider using this category less and the other two more.

Through the proper categorization and consideration of the way we use funds, we can get to a budget and set of categories and thought processes that we prefer about money.  Good luck.

We'll get you the technology, people and processes you need for your objectives

EfficiTrends seeks to be your personal and extremely knowledgeable concierge for your journey, whatever it might be.
"We'll get you the technology, people and processes you need for your objectives."  Everyone struggles with one or more parts of this equation.  Let's try to further understand the various parts of this and how I and people like me can help you with your project, whatever it might be.

A) "We'll ..."  (Who we are).  We are EfficiTrends.  We are a consulting group.  We help people and businesses become more effective at achieving their goals.  We are a small but growing team of free-thinking, creative, experienced professionals who can help people of many walks get things done.

B)  "We'll get you the ..." (Service delivery method).  Our service is fast, collaborative, and proactive.  We try to anticipate your needs before you have them.  We go into our networks, experience, and knowledge base to get you the stuff you need for your objectives.  We are very aggressive at identifying and acquiring the stuff you need to be successful.  We bring this valuable stuff to you, whatever it might be.

C) "We'll get you the technology ..."  Technology is a key, core part of the EfficiTrends business.  We live and breathe technology and believe that it can and will have a very positive affect on your lives, those of your customers, and staff.  We are advocates of technology but do not only run from that perspective.  Hence:

D)  "We'll get you the technology, people ..."  Sometimes technology isn't enough and we need to bring in people and subject matter experts to support the technology purchase decision or dialog.  Our people will help you become more comfortable with your situation, whatever it might be and get you through the change curve required.

E)  "We'll get you the technology, people, and processes ..."  Processes are all about value.  They're about sustainability.  Whether these processes are thought processes or business processes, we want you to have them because they are valuable and measurable.

F) "We'll get you the technology, people, and processes you ..."  (The customer).  Our customers are a huge part of our service offering.  They're everything, in fact!  Without you, we wouldn't be here and we do everything possible to keep you engaged and driving the dialog.

G)  "We'll get you the technology, people, and processes you need for your objectives."  Your objectives can be hard to nail down.  Sometimes they're completely obvious and transparent like "I need a car to pick me up at my house located at 4834 Elm Street in Seattle on June 5, 2012 at 8 AM PST."  But even then that could have some gaps in it.  What kind of car?  Where is the car going to?  How much gas is needed in the tank?  Do you have any special needs?  EfficiTrends is excellent at analysis of all kinds from data to requirements to business process.  We look deep into you and your business to understand the opportunities that are lying within and beneath.

EfficiTrends will get you the technology, people, and processes you need for your objectives.  What are your objectives and how can we help you today?

Thursday, May 10, 2012

Two types of workflow: software and human system

There are two sides to workflow: software workflow and human interaction systems (aka business processes).  Understanding both of these helps us understand our systems overall.  We need to be expert at both to really understand what's going on at all in today's complex systems and organizations.
There are two main types of workflows in our lives: software workflows and human system workflows.  Software workflows are the experiences we have on our devices (computer, laptop, smartphone, etc.).  Human workflows are a view of our organizations that are about the overall mix of people, artifacts, inputs, processes, roles, and outputs.  The latter is the more abstract and grand view, while the former is critically important to helping us understand the actual human workflows that exist today and will tomorrow because the software workflows are constantly and rapidly innovating and changing.

Software workflows are very fun to define, create, implement and realize.  Making software is a thrilling and fun experience.  Adding a set of systems or softwares together into an information systems happens frequently and creates greater value to human workflows.

Human workflows are abstract views of our organizations and systems and first focus on the actual people in terms of their roles, what artifacts they create and pass around, what processes and tasks they perform, how they measure their work, how they define flow, and a variety of other things.  Human workflows are critical to know and understand for organizations to be focused on the customer, value, efficiency and sales.

Overall, between these two methods of workflow definition, we can understand our organizations and their related complexities.  There are tools out there like Configuration Management Databases and Windows Workflow Foundation to map the software workflows and IDS Scheer ARIS to map the human interaction workflows.  Together we can use these information systems to store data about our organizations and get  better information out about what is going on as analysts and decision makers.

Friday, April 27, 2012

Technology, then people, then process

Some people say process leads technology but I think it's usually technology that leads most peoples' decisions because it's so shiny. 

There's an order to getting things done with technology that should be followed to be successful and not spend too much or buy the wrong thing.  What we ultimately want in life and business is processes or flows that serve us in efficient, effective, fun, valuable, and entertaining ways.  To get these flows (ideal experiences), though, we have to follow a very structured process and invest in technology and experts.  The process starts with technology identification and selection, then leads to people and experts, and then finishes with you (hopefully) getting the processes that you want.

Technology.  The technology selection part is fun.  My mom's looking to get an iPad soon and she's excited about that.  Looking at technologies is fun and we can learn a lot by studying them but we have to first know our goals and criteria.  We can and should build our ideal process requirements in this phase.

Then people.  The people part of the process can also be fun and enlightening.  This phase is about bringing in experts or geniuses to support you in learning and achieving your goals and objective processes.  You'll find that many of the geniuses out there have a vested interest in *their* technologies or solutions and are not necessarily customer advocates.  True business analysts, managers, and customer advocates inquire with the customer then select only those technologies and suppliers that can meet their long-term, strategic needs.

Then process.  The process part is also fun and where the rubber starts to meet the road.  In this phase, it is about putting the technologies and people you bought into a practice and flow and making it work for you for your objectives whatever they might have been.

In review, working with technology is fun but we have to make sure we surround ourselves with advocates for us who help us get the technologies we need to achieve our process objectives.

Saturday, April 21, 2012

Adjust your dreams to align with reality and what's possible (focus on next steps)

Take one step at a time and focus on the water.
Maybe it's good, maybe it's not.  To dive in or not?
Dwelling--or really spending much time at all--on analyzing the way things are or why they are the way they are is kind of a messed up, useless waste of time but apparently we have to do it as humans.  I'd rather spend my time imagining the future and figuring out what I need to do to get there.

Focusing on where we want to go and figuring out how to get there is a really important and necessary thing for us to be happy.  We have to take one step at a time and crawl, then walk, then run there.  We want to imagine ourselves warping into the future, to the place where we'd rather be.  But it takes time to get there in reality and our imaginations are way faster than time and real-world processes are.

We need to make things happen in reality through our actions and by externalizing our vision to other people and the world around us.  This takes time and keeps us grounded in the now and thinking about what steps are required to execute next.  We have to keep our pace and sense of urgency high (by developing new, more complete and current visions) to get to the future fast enough or it could be gone by the time we get there. 

So be flexible in your vision and let it change because hopefully it will only get better or more realistic as you take the steps to getting there.  Don't just be a dreamer, be an adjuster of dreams to align with reality.

See communications and delivery as separate but a part of the same customer-centric whole

It's all part of the same thing,
we just don't know the difference sometimes
but we have to create and define it.
Most projects are tough because there are two main and competing parts to them: doing the work (adding value) and communicating about the work (selling).  I wrote about these two things yesterday.  When we're in roles like project manager or business analyst, we have to do both and can't focus on just one or we'll fail. 

One time at Microsoft I focused exclusively on delivering the value and failed because I didn't spend enough time on communications and change aspects with the customer (I had no time or willingness to, either, so serves her right...). 

On the flip side, dealing exclusively on with the selling aspects is the same as analysis paralysis and we shouldn't just want to sit there and talk about it all day: that's not the goal either.  So there must be some kind of balance between these two things.

I think we're lucky: Scrum makes communications a daily occurrence through standups and has a standard process and roles for communications.  Scrum fixes the time of communications and gives most of  the time to the development team to do their work.  In the meanwhile, management and planning activities happen in parallel. 

In Scrum there's a clear and defined way of communicating and this is necessary.  Many new projects don't have this structure and need to get it as soon as they can.  So, in summary, we need to have the role of delivery, the role of sales, and then a defined and clear relationship between them.  Get it!!

Friday, April 20, 2012

Don't just do it, teach it

Teaching others how to do what we
know can be extremely satisfying
and gratifying.  And kind.
A lot of us go through our days and lives doing what we do best but don't take the time to show others how we do it or how they could do it.  We probably think they don't care but I bet they do.  I bet they would like to learn and understand our crafts. 

If we're truly passionate about what we do, then we should want to teach and show others how to do it.  Let's make it a collective point today to set aside some time with someone we like or care about to show them how we do what we do.  Really sell them on it.  Try to convince them that the thing that we do is the thing that they should do, too.  But listen, too, and maybe the thing that you independently do you can do together. 

A learning model for professional services organizations

It sure would be nice to have a manual.
It shouldn't be that hard for our groups to make one.
I'm sure many of us would say that our organizations do not provide us with sufficient training for us to be truly great at our jobs.  They also don't provide us enough knowledge-sharing and partering abilities with our peers. 

I just recently started a job that had next to no training provided to me.  Without it, I had to go find people and resources on my own to give myself even a small clue of what I needed to do.  And even then I didn't have enough information and it made it way more complicated than it needed to be.
While there, though, some colleagues and I built a model that provided us the training we knew we all needed.  We saw training being delivered in three levels: A) our roles B) our accounts and finally C) our projects. 

Role level.  We agreed that by first focusing on our roles, we would be able to help each other become excellent at what we do, individually.

Account level.  We next decided to focus on our customers and accounts.  We felt that the politics and preferences of our customers mattered a great deal and that there was a big need for teammates to be trained on accounts.

Project level.  The final thing we knew we'd need to focus on was our projects.  We agreed that our projects should be the simple part of this.  We all know what we have to deliver and fit in, so the training here really should be minimal.

By training and accumulating knowledge at these three levels a professional services organization can learn, continuously improve, and deliver the maximum values to its customers.

Software suppliers as a service

We need to shape our organizations wisely and can't have
too many crazy cooks in the kitchen.  We need to create
the role of the master chef for our enterprises.
I've been brought into a few situations recently to help companies where the software they bought was not performing as they had expected it to.  They thought it was going to be great based on what the vendor had told them but when it came down to business and reality, it wasn't doing the job.

There's a problem in industry today and it's probably always been there.  I think our organizations went a little bit crazy in implementing tools and technologies but never thought about the big picture, the architecture, processes, or operations that would support the organization in the long term.

Our organizations have to become more lean and agile but they also have to partner very wisely.  Rather than implementing tool after tool, they have to question the process and way by which they are doing this.  Are they doing it in a controlled way?  Are they doing it in a sustainable and continuously improving way?

There are a lot of tools and vendors out there and they all might be pretty good but organizations need a single service that helps them contain and control technology acquisition costs and partners.  Let's not run amuck and buy a bunch of tools without control or process.  Thanks.

Think of services instead of projects

Hitting the drum once is fun and nice and all (and important)
but playing a sweet drum solo is really what you prefer.
Projects are a convenient way to think about things: they have a beginning, middle, and an end.  How cute.  But the truth is, though, that we shouldn't want to think about the end because this means no pay and no relationship!  I'm not talking about death or anything that serious here, I'm talking about the end of our projects when the value has been delivered and the relationship with the customers and project team is over.  What I'm trying to get at here is that we should rather think in terms of long term and strategic (at the program and account level) than at the project level. 

All this said, we really can't have long-term and strategic without projects and immediate value delivery mechanisms.  The truth is that most value is and can be delivered through projects but we have to learn and enact ways to do projects continuously and forever for our customers.  This takes teams to do. 

Let's start imagining things that are built to last and repeat forever rather than one and done.  Forget the old-school ways.

Do two things: add value and sell

Doing two things, even doing one, is hard sometimes.
But it's required.
As contributors to the world I believe we have to do two very basic things to be effective and successful.  Some of us are good at none of these, some are good at just one, and there are a few (possibly lucky?) others out there who can do both.  Those two things are 1) adding value and 2) selling.

Adding value is about doing things that make peoples' lives and businesses richer.  In order to add value we have to know our audience, know our customer, and know ourselves, then choose to do something that is both reasonably interesting and unique to make a difference.  Adding value can be a very high bar and our audiences can be very picky: they don't always laugh, care, or buy.

Selling is all about the spit and polish we put on the value.  Selling is the sizzle on the steak.  Selling is having the guts and courage to do what we think we need to do and doing it.  Selling is about being steadfast, dominating, persistent and controlling.  We don't want to overdo it on selling but we can't add enough value.

Selling and adding value are required to be successful in life and business and for many of us it is a daily struggle to do both...or even just one.

Choice is a powerful thing

Judges.  They are all around us and we are also one.
We might like to think that we can affect, influence, and even control all of the stuff around us--and we can to a large part--but sometimes we can't have as much control and influence as we'd ultimately prefer.

Decisions start and stop all things.  Decisions can come from within us or outside of us.  In this way, there are two competing forces: us and them.  Everything boils down to decisions and it is decisions that are the things that are affecting and creating the workflows, processes, and policies that surround us.  Decisions are the things that ultimately set our course of action in life.

When a leader or person in a powerful position above us or in relation to our project makes a decision, all things are put into motion and dependent upon that decision or opinion.  As project managers we have to be very aware of the decisions and opinions being made around us and make our own decisions of how we'd like to react given them. 

There are several ways we can decide to treat these decisions and opinions being made around us: A) we can work in compliance and agreement with them, B) we can work around or be ignorant to them, or C) we can directly against and in combat of that decision. 

Working in compliance and agreement of the decisions is the preferred--don't rock the boat--way of doing things.  It's the easiest and probably the most effective.

Working around or ignoring decisions is another form of compliance but it is a bit more subversive.  It is passive-aggressive to know but not necessary heed the decision.

The third type of behavior in relationship with respect to a decision is total war against that decision.  When we get into this mode, we do not agree with the decision and will do everything in our power to fight or change it.

We all want control and on a day by day basis we make our own decisions about the decisions and opinions that are taking place around us and set our own path in the maze.

Only make the sausage if they'll pay for it

It doesn't really matter how you make the sausage.
But the sausage had better be good and the customer
had better be willing to pay for it.  Regardless, don't start
making it until you are confident you'll get paid for it.
Sometimes it's really nice in projects to be given the opportunity of an "open" contract but it will frequently lead to disputes if you're not careful about managing customer expectations and the budget.  If you're not a professional project manager, you should not dabble with T&M contracts because you will get burned by hard-nosed customers that demand quality for their money (and they should).

It would be nice to bill people and see if they pay or not but you have to make sure when you're doing this that you're also able to defend your price and value for what you're billing.  This means that you have to have excellent metrics and measurements of the value you're delivering and a justification for that value (the business case and justification, ie the argument *for* the price).

Whether you're managing projects on a fixed basis (even Agile is fixed since it locks scope for an iteration) or on a T&M, more loosey-goosey basis, you have to be careful.  No matter how you're making the sausage, make sure that the customer gets it, is willing to pay, and likes you enough to fork the money over.  Otherwise, you might as well not start.

Unscrew screwed situations

Don't just be any tool, be a screwdriver.  Be the one that can drive
change in one direction or another and try to make sure
it's positive change that people want.
I'm frequently brought into organizations to unscrew screwed situations.  What I do is to figure out what's going on (the situation), try to talk to all parties and sides (get info), look at all of the pieces and parts and systems (analyze), and then look at the market and objectives and fact and make decisions and recommendations and plans to help steer the organization(s) into a clearer light (lead).

Doing this is an art and science, and a risky, difficult one at that.  To do it successfully, you have to be really careful of the people and goals and get everyone thinking and looking in the same direction.  Have you have to identify key bottlenecks and remove them one by one until you can see out.  Communicating effectively up during this time is also difficult, yet critically important.

Dive into organizations and find out where they are most screwed up.  Be the change that is required to correct the problem and point it into the direction that you believe.

Name the project

Even kids know how to tell us what to do.
In organizations we become followers.
But don't.  Be perceptive and share it.
Between all the clutter and crap of organizations there is a project somewhere.  You are the person that has to identify and name these projects.  Without you, there are no projects, just chaos and disorder.  Get good at finding, naming, and talking about projects and what they are.  Get good at telling people about them, getting them excited about them and helping them understand how they can help the project succeed.  Don't be martyr or fall guy for the project but continue to represent and be clear with people on it and the way forward, to a better place.

It can't be undone

Stack 'em too high and it all could topple but it sure is fun stacking
and each time we learn something new about our techniques.
In business and our personal relationships we frequently have to make tough calls and take risks.  We should be proud of the risks we take and prepare ourselves to deal with the consequences.  As we prepare to make a big decision or take a big risk, we have to think through the consequences and potential backlash of an action.  Thinking and behaving this way is *the* way in my opinion.  It's my goal to take risks and be prepared to deal with all that comes.  This makes life fun.  Dive in!

Name your price

An agreement on price lies somewhere but
make sure you're not compromising too much!!
If you ever find yourself in a situation where you need to name your price, I feel for you.  Sometimes it can be fun to name your price and drive a hard bargain but most of us are uncomfortable with this.  As American's we're typically not really barterers, but as business people we really have to be.  Maybe you've experienced this, too, where in business you have no choice but to talk about and deal with issues relating to price.  I guess my only tip is to buck up, be strong, and don't be afraid to drive a hard bargain.  You'll win some and you'll lose some but be fair, too.