2013年12月18日星期三

Book Review: The Catalyst Leader by Brad Lomenick -- Part IX -- Conclusion

9. CONCLUSION: MOVING FORWARD, LOOKING BACK.


He constantly reminded me that my twenties would establish my seventies.

Life only moves in one direction: forward.

We need to open our ears to the wise mentors in our lives, in our companies, in our organizations, in our families, and in our churches.

Be aware of those around you who know more than you do, who have experienced more than you have in life. Give them permission to speak into your life, and then open your ears and heart to what they share.

You are never too old or too young to participate in the mentoring process. Remember and honor those who've helped you get to where you are. Your legacy is not only determined by what you do as you get old but also by who you are when you're young. Leading well means starting well.

The way you start determines how you finish.

The time has come for you to be who God has called you to be, to live out His purpose for your life.

Never let your ambition force you to create a false self. As you lead, share the real you with others.

Root yourself in an untamable love for God. Seek Him first , and let Him handle the lesser things. 

As you pursue this calling, make excellence a nonnegotiable. God deserves your best.

When the time comes to take a risk or make a difficult decision, push through the fear. He'll sustain you.

Let your convictions and principles steady you. Hold fast to your integrity, discipline, and humility. 

When stress runs high and difficulties arise, keep hoping. Remember that with God on your side, a better tomorrow is possible.

Build bridges, not walls, with those around you. There's power in partnerships.

And finally, don't believe the lie that you are the center of the universe. Seek out older leaders who can help grow you, encourage you, and guide you. And then pour your life into others.

终于把我所有划线的内容记录完成了。整整两天的时间。在写下来的时候,我有回味了一遍那些句子的含义。真的是令我又一次的震撼。 我在记录的时候,心情也是异常的心潮澎湃。我不知道神对我的呼召是不是做一名符合神心意的领袖(Leader)。 我还要寻求,我现在知道的是,我在读相关书籍的时候真的是心潮澎湃。

这是我找了好久的好书,把神融入到生活当中。主啊,希望从这本书当中我能有所得着你对我的calling,也希望您帮助我来活出您的呼召。我愿意把自己最好的献给你。阿门。

Book Review: The Catalyst Leader by Brad Lomenick -- Part VIII -- Collaborative


8. Collaborative


No matter how well we execute a project, it is God who deserves the credit.

Collaboration is integral for leaders moving forward. Collaboration is now the norm, not the exception.

We believe everyone can contribute as long as we find a common foundation.

You don't have to blow out someone else's candle to make yours shine brighter.

If you desire to advance your level of leadership, one of the best things you can do is to build bridges with two kinds of organizations. The first should be an entity that is in the same line of work, but not a direct competitor.

Christians haven't always been good at this. We have a tendency to huddle with a narrow group of like-minded individuals.

These become iron-sharpening-iron relationships that challenge and almost always strengthen leaders.

Collaboration requires clarity. Make sure expectations are explained and agreed upon on the front end. Good contracts make good partnerships. Outline boundaries, responsibilities, and what a win looks like. 

It's easier to outline expectations of collaboration at the outset than in the midst of a disagreement. So collaborate freely, but collaborate cautiously.

Technology is a tool. And it's only great when it makes us more human. Being human means doing good things.

Collaboration isn't easy, and it almost always requires sacrifice, both personally and organizationally.

In order to collaborate, you and your team will have to compromise and may even have to give up something you value. Those who choose this path must nurture the virtue of generosity and learn the art of placing others' interests above their own.

The paradox of collaboration is that when you help others succeed, you almost always create a win for yourself in the process.

The reasoning behind our collaborative philosophy is our belief that safe spaces are essential for trust. And trust is required for collaboration.

Key for collaboration: 
1. Make sure expectations are clearly laid out on the front end. Good contracts make good partnerships. Good fences make good neighbors.
2. Stay adaptive, humble, and accessible.
3. See collaboration as a need, not just an option.
4. Choose wisely. Good partnerships start with a deep knowledge of the other.
5. Be intentional in finding common areas of interest and connection. Intentionality requires you to follow up, probably again and again.
6. Make connections. Great collaborators are always connecting friends within their circles. The ultimate value of these connections is not for you; it's for others. Be others-focused.

The second principle: Make your partner look good.

Book Review: The Catalyst Leader by Brad Lomenick -- Part VII -- Hopeful


7. Hopeful


Hope is a powerful tool to help overcome poverty. True poverty is often the absence of hope.

You can gain influence by doing something. Even when you fail, it separates you, because you are willing to step out and pursue a courageous vision.

Leaders are dealers of hope, and we must give it away constantly and without bias. If a leader wants to make a mark on this world, he or she must have a compelling vision for his or her work. It must be hopeful and inspiring.

Their workplace has a clear vision that is easily understood by employees. We need more leaders and fewer managers.

Look for individuals who still believe that the impossible is possible.

Leaders -- especially ideators and dreamers -- tend to cast aggressive visions, but these visions must also be achievable.

You want a vision that stretches you, but not one that cannot be realistically achieved. Strive to be a hopeful visionary, not an unrealistic dreamer.

The most hopeful, vision-centered leaders are: optimistic about the future; Focused on the best in their people, not the worst; Never satisfied, but always content; consumed with making tomorrow better than today; Accepting of change; Inclusive, not exclusive; Personally bought in.

Because hope will outlive all other attributes we might nurture. After all, hope is one of the three forces in this world -- faith, hope and love-- that will remain when we have nothing else left (1 Corinthians 13:13)

We want to cultivate leaders who create possibilities rather than make excuses. Influencers who are willing to move outside their comfort zones. Change makers who dream about accomplishing projects so big that even their closest friends think them crazy. A catalyst leader know that God can accomplish what seems impossible to us.

As leaders, it's our responsibility to step up. cast vision, and lead with courage even when immediate pressures suffocate us.

Get outside your comfort zone. Dream about accomplishing a project so out of your abilities that it keeps you up at night. God calls us to think big. So what's on your heart or stirring in you that you keep pushing back because it doesn't seem possible? Pursue it. God can accomplish what seems impossible to us.

We realize that people won't willingly follow you until they can see the role they play in the future you envision. When you are optimistic, enthusiastic, and energetic, your team and those you serve will be too. That's why I believe hopefulness is an essential of the catalyst leader.

Book Review: The Catalyst Leader by Brad Lomenick -- Part VI -- Principled

6. PRINCIPLED


We learned that failures can become successes if you learn from them.

An individual or an organization must define their character and stick to it.

It it is worth doing, it's worth doing right.
It's not what you say; it's what you do.
Don't start what you won't finish.
Whether you win or lose, you'll learn.
Your word is your bond. If you can't keep it, don't give it.

Humility is not denying your strengths. Humility is being honest about your weaknesses.

Humble leaders are willing to pass on the credit but absorb the criticism, push others higher while making themselves lower, and put desires of the team ahead of their own.

Apologizing for your mistakes will turn resentment into respect.

I'm listening; I trust you; Great job; I'm sorry; That was my fault; Thank you.

Humble leaders listen more than they talk. They may be lesser known but are often more influential.

They don't view themselves as too important to perform a task "below their pay grad."

"God will not share His glory with another." He then asked them not to tempt him to steal God's glory by their praise, though he appreciated the kind words.

Humble yourself enough to focus on others.

Remember that your character and integrity is built over time in the insignificant moments when you think no one is watching.

Remind yourself often that you aren't the only member on your team.

Walking humbly with God is important both to leadership and to serving God. In fact, it's one of the three things the prophet Micah says the Lord requires of those who follow Him (Micah 6:8). As we chase after god, we stop looking at ourselves and begin focusing in on Him, seeking where He is leading, what he wants for us, and how we can serve Him better. So humility is not just about thinking less of ourselves, but thinking of Jesus more and more. Louie Giglio sums it up by saying, "If Jesus rode in low on a donkey, then we should go ahead and get down off of our high horse."

The one characteristic they all share is a commitment to hard work.

Talent may get you here, but it takes work, real work, to stay here.

When I look at the sum total of my efforts this year, do I believe I've done my best work?
Have I finished everything I've started, or have I left a wake of piecemeal projects behind?

Did I give in to the temptation to cut corners, and if so, how can I protect myself from taking those shortcuts in the future?

We know that discipline is hampered by distractions. So we've drilled down to a single goal and fixed our gaze on that.

It recognizes that following god often requires that we choose the slow, difficult, and costly.

God cares about who you are becoming way more than what you are doing or accomplishing.

To become experts now, even before they need to be. Part of being a disciplined leader is being ready. When it's your turn to come off the bench, when it's your turn to give your opinion and offer advice, when it's your turn to lead the project, you can step in and make it happen. Act, lead, dream, create, and deliver based on the job or position you want next, not the job or position you have now. Step into that role before you ever have it. Demand perfection from yourself before anyone else ever demands it of you. See where you want to be, and lead like you're already there.

Credibility is achieved through discipline and capability. People want to follow leaders who are credible-- who do what they say they will do.

If you begin a project, finish it -- no matter how long it takes or how much energy it requires. If you fail, put in the time necessary to extract lessons from that mistake.

Never stop growing and getting better. Be curious, committed, and coachable -- always a student.

The great temptation for Christians is to allow one's efforts for God in the workplace to replace one's journey with God in everyday life.

A dream doesn't become reality through magic; it takes sweat, determination and hard work.

Integrity has been defined as "a voluntary and consistent adherence to a set of human characteristics and principles including honesty, respect, loyalty, accountability and trust that are applied to all facets of business operations."

We plant sod where God wants to plant seed. He's more interested in growing our character than having us look finished.

What are the areas in which you are most vulnerable? What are your hidden weaknesses that could blow up in your face? This could be pornography, coworkers whom you are secretly attracted to, or uncontrollable greed. Once you identify these areas, establish an accountability system. Make the right thing easy to do and the wrong thing difficult. And ensure someone else is providing oversight.

I have asked a few of my team members to speak honestly to me whenever they see me falling into these traps.

None of us is too good, too spiritual, or too moral to make mistakes.

Who you are becoming is way more important than what you are doing.

In order to lead well, you must avoid insulating and isolating. Stay connected with people whom you can trust and be honest with.

Don't become untouchable and start thinking you're a big deal.

You can't do everything. The person or organization that tries to do everything will do nothing well. Focus on a few things and be great at those things. Know it. Breathe it. Love it. Live it. And do it with excellence. Do it with integrity.

When people see you living a life of integrity and accountability, they'll trust you. Take time on a regular basis to ask yourself difficult questions about your personal character. What kind of person are you when no one is looking ? Are you the same person when you're by yourself that you are around others? Do you exercise integrity in the small decisions as well as the significant ones? The answers to questions like these will help you evaluate if you're developing this essential trait in your life or not.

Remember, character is built over time and in the small moments. The seemingly insignificant decisions you make when you think no one is watching or paying attention will carve your character. So don't overlook everyday opportunities to build up your integrity. These incremental tests compose one's greater character.

Being a principled organization meant using integrity as a standard for decision-making.

Leadership functions on the basis of trust, and when the trust is gone, the leader soon will die.

And like Nancy, a catalyst leader is rooted in something more than raw ambition.

Catalyst leaders strive to maintain high levels of character, rigorous amounts of discipline, and humble spirits.  Your heart is the starting place for character, and it's what gets God's attention. Character is what turns your giftedness into influence, and unleashes God's power

2013年12月17日星期二

Book Review: The Catalyst Leader by Brad Lomenick -- Part V -- Courageous

5. Courageous


Live a courageous life that someone else would want to take notes on.

Courageous moves us from ideals to action, from potential to actuality.

Courageous leaders are working in their sweet wpot but may be outside their comfort zones.

Being fearless is less about operating with no fear and more about seeing the fear-- and stepping forth in a grand effort to overcome. Courage is not the absence of fear but rather the commitment to overcome it. Courage doesn't mean you're not afraid; it means you battle against your fear and confront it. Courage pushes you to resist the impulse to shy away from the things that stir up your innermost anxieties.

Courage is not the absence of fear -- it's inspiring others to move beyond it.

Being a courageous leader requires you to push beyond the norm and be willing to take risks.

Don't play it safe. Chase after something so much bigger than you are, there's no way you could ever accomplish it without God.

Those who follow a God-sized calling need God-sized courage.

Be strong and let your heart take courage, all you who hope in the LORD. (Psalm 31:24)

No matter what's placed in front of us, we should live life like it's the last day. As opportunities arise for me and are given to me, I take those opportunities and grab them and do everything I can. Courage is not only just doing things when it's easy, but it's doing things, and the right things, when it's hard. Choosing the harder right versus the easier wrong.

Courage is an essential element of leading well. Their hope overtakes their fear. Ti calls them to confront and to push forward, even when everything inside beckons them to shrink back. And in the process, their courage places them in the context of a larger story of what God is accomplishing in our midst.

He reminds us that fear can be a speed bump, but it should never be a stop sign. Standing directly in front of what causes us fear brings our convictions to the forefront.

God must be trusted and leaders must be brave.

Do the thing you fear the most. Leading with authentic honesty is required as well in taking risks.

Faithfulness is taking risks. If I'm not taking any risks, I don't need any faith. Walk directly toward the things you fear the most. If I don't need any faith, then I'm being unfaithful.

But had we chosen not to move forward, we felt we'd risk even more.

We desired to push people out of their comfort zones in order to provoke them to grow.

We know that all leaders confront fear of failure and fear of the unknown. But living in that fear is destructive for a team and will kill momentum.

Many, many great things have begun with a single act of courage. Throughout history and today. A person steps out and makes one courageous decision and that one domino starts many other dominoes falling. We have to step out and take that first step, and we may never know the ripple effect of that one courageous decision. Your decision to do something courageous may result in something greater than you ever imagined. Step out.

Courage is not waiting for your fear to go away. Fear in leadership usually is connected to the uncertainty about the future. But uncertainty about the future is never going to go away. I tell leaders all the time--uncertainty is why there are leaders.

Courage is the kind of virtue that without it none of the other virtues of leadership is possible. The only way to courage is through fear and obstacles, frustration and surrender.

I had let my own fears, insecurities, and emotions get in the way of executing courageously. Always confront the tough decisions or conversations head-on.

Tips for building a culture of courage: Set scary standards; Allow for failure; Reward innovation; Pursue the right opportunities. Not every risk is a good one. Be disciplined. Aggressively pursue a few things that make sense. say no often; Learn to delegate. Liberally pass responsibility and authority to your team. If you want your team to be courageous, give them the chance to lead.

Yet those who desire to be change makers have no choice; they must exhibit courage. Any leader who achieves something significant has, at one time, arrived at a moment of great uncertainty.

Action requires an unusual dose of courage.

Courage is not inborn like some other leadership essentials. It's learned.

Attacking my fear head-on allowed me to accomplish something I never thought possible.

We can't live and lead in a state of fear and inactivity. Don't sit on the sidelines. As believers, as followers of Jesus, if we're not chasing after something that is much bigger than we are--- and there's no way we could ever accomplish it without God--- then we are playing it too safe.

Men don't follow titles. They follow courage.

We must be intentional about developing this unnatural characteristic.

The jump may be risky, but the decision to stay where you are is even more so.



Book Review: The Catalyst Leader by Brad Lomenick -- Part IV -- Capable

4. CAPABLE


Our "hustle culture" caused us to run when others might walk, to always seek out the most difficult project.

Maybe no one else would notice, but deep down I would know that I hadn't given my best.

Today, "make it happen" is one of my life's mottos because I know that a strong sense of vocational calling must match a high level of excellence. And for Christians, this is more than a matter of survival. It's a matter of stewardship.

We must strive for excellent work because we serve an excellent God. Rather than just punching a card or putting in our time, we're worshiping the One who gave us our talents by offering our best labor back to Him, regardless of profession or industry.

We firmly believe in what Abraham Lincoln said long ago: "Whatever you are, be a good one."

Being a capable leader doesn't mean being big. Or being expensive. It's being excellent.


We don't just want to do work that matters but work that sets us apart.

Set standards that scare you, and work to achieve them. Know the areas you are so passionate about that you are willing to be uncompromising or even annoying. And remember that being a capable leader doesn't mean being big. Or being expensive. It's being excellent.

We want to do things the best we can do it, because God deserves our very best. God living in us informs the way we do things and the kind of excellence that god demands.

"You can't build a reputation on what you are going to do." Our big dreams must be accompanied by nearly flawless execution from each team member.

"Excellence is built on three pillars: clarity, focus, and, connection."

"Excellence starts with getting very clear on the end state you wish to achieve(winning) and relentlessly driving towards it every day," writes Green. "Excellence requires knowing when to push on (even when you don't have all the information or the perfect solution), but doing it well and constantly refining as you forge ahead. Excellence means accepting only the best, and understanding that when it is not given that you, as the leader, are at least partly responsible"

No one ever said leadership is easy. Your job as a leader is to make the difficult decisions and carry more responsibility. Embrace it.

The one thing he's always noticed about the best leaders is that ehy have the ability to "make it happen" and get something over the finish line. When given assignment, they deliver.

This person takes the same job everyone else takes but actually delivers.

I look for team members who won't balk at difficult assignments and are willing to do whatever it takes to execute.

People who are faithful with a little are also faithful with much (Luke 16:10)

They know the power of hard work and discipline, and ti's no coincidence that they are world-class athletes today.

Capable leaders constantly push forward. Surround yourself with people who spend more time dreaming about tomorrow's possibilities than dwelling on yesterday's failures.

Capable leaders are team players. In order to succeed, you need confidence. And you can't have confidence without trust.

Look for team members who can admit missteps without growing discouraged.

Capable leaders are willing to take risks.

Capable leaders are constant learners.

Capable leaders aren't entitled. The best leaders develop in the midst of action-doing, not just thinking or dreaming or talking.

Capable leaders are anticipators. It's imperative for leaders to figure out what the organization needs before anyone else ever realizes it.

Capable leaders are persistent. They see things through and don't give up.  They follow up again and again until they get the answer or solution they need.

Capable leaders are trustworthy.

Capable leaders deliver. Capable leaders get things done. Team members need to make it happen no matter how insignificant the task or assignment.

Hard work is a prison cell only if the work has no meaning.

Capable leaders are willing to set standards that scare them. Ask yourself the question, "Are you operating at good, better, or best?"

Best is where you want to live. It is greatness and doesn't mean you are better than everyone else but that you're working to your maximum capability.

Excellence is nonnegotiable. Leaders should strive to be the best in the world at what they do. I believe God demands our best, and this is what I expect from our team and from myself.

Resist the temptation to believe that you can carry an entire organization on the back of your talents or passions alone. You must surround yourself with equally gifted leaders who share a common commitment to excellence.

A high standard of excellence starts with you. The most successful leaders of this generation recognize the value of excellence in their work.

"Excellence is a spirit, rather than a presentation. But if the spirit is there for excellence, then a great presentation will follow" "Excellence starts with attitude and a servant's heart. Lift the standard always and be relentless in the pursuit of perfection, but excellence ultimately rises and falls on the spirit of your people, and spirit starts with you as the leader."

Joel says he must do two things to maintain excellence. First, he leads by example. Second, he values his people.

If what you are doing is important, you will encounter resistance. If what you are doing isn't important, it will be easy.

No one should say, "I'm doing this for Jesus" and then follow it up with a half-hearted, underwhelming effort.

Jesus gave his best, and His followers should do the same.

You have to create a system designed to help you execute and define what excellence means for your organization.

Hard worker, quick thinker, and rigorously committed to excellence.

I had a boss tell me once that 70 percent of leadership is perseverance. It's not stupid perseverance, but it's that leadership is not about being famous, but it is really hard work. And if you don't want that, don't sign up for it.

You have to be willing to work harder than anyone else, stay late, arrive early, start new projects, learn more, make it better, take out the trash, stand on the stage, accomplish the menial tasks, create the vision, push yourself lower while pushing others higher. Capable leaders are not afraid to get their hands dirty and reach down into the mess to move things forward. dirt on your hands and sweat on your brow goes a long way.

Once we discover our calling, we have a responsibility to pursue that calling with authenticity, passion, vigor, and distinction.

Being the best requires focus, determination, intentionality, hard work, perseverance, risk-taking, and making sacrifices.

We all know when our performance is not our best.

You must always strive to be the best you can be. Without a standard of excellence in your work, you have no hope for becoming a true change maker.



Book Review: The Catalyst Leader by Brad Lomenick -- Part III -- Passionate

3. PASSIONATE


I should not, could not, and would not separate my career path from the passion for God that was growing inside of me.

I felt confident that I could bring my faith  to bear on any career.

They are tying their love for Jesus to the work they do. They want their faith to be central to their lives, not an afterthought. This generation of leaders desires for a passion for Jesus and a heart to serve Him to be fully and holistically connected to everything we do and everything we are.

Luther recognized the spiritual value of the man's everyday job and encouraged him to glorify God by doing that work well.

Being a change maker means realizing that commitment to God and passion for following Jesus cannot be compartmentalized.

No matter where you work, your job can be an act of worship and service to God.

He recognized every day as an opportunity to display one's passion for Christ in whatever space he finds himself.

The foundation of life and the source of true influence must be a deep love for God and desire to glorify Him.

When your heart is in it, it's no longer a job. It becomes something freeing and beautiful.

Your vitality is going to not be so determined by how you manage your time or what programs you implement but really your vitality and strength in leadership comes from your knowledge of Jesus Christ and how well you see him and what you actually believe about him.

They crave His glory in what they do, and they are better leaders as a result. Their passion for God is contagious. If you are around them you can't help but be caught up in it.

Glorifying God is the heartbeat and soul of what we do.

Passion for God was essential to leading well. Those who desire to influence and impact others will never reach their full potential unless they develop a contagious love for the One who has called them.

My experiences with Christian leaders who are most successful today tell me that spiritual ardor is integral, rather than accessory, to leading well.

We know that the Bible is a living, breathing book.

If you aren't spiritually rooted, your life won't be as fruitful as it could be.

"God, it's just you and me because you strengthen me like no one else can... everything depends on my relationship with God."

I encourage leaders to set aside portions of their week to block out the pressures of life and pray, meditate, and seek God's face. Even if you are only able to set aside five minutes during the day to walk and pray, or simply read a few scriptures, you need to commit to this. These breaks will give you energy, enthusiasm, and renewed momentum.

Begin practicing the Sabbath. This means building margin into our lives.

Margin allows for rest, refocus, and adjustments as well as stirring our God-given passions.

Building in times of rest will pay dividends.

Leaders are targets, so we all have to be grounded spiritually. Otherwise the pressures of leadership will get to you. We must continually grow in our faith and seek to know God more and more. Leaders must protect their hearts and constantly look for ways to grow and improve their inner lives, as well as their outer lives. The leader's heart is vital to being a change maker.


Book Review: The Catalyst Leader by Brad Lomenick -- Part II -- Authentic

2. AUTHENTIC


I'm best when I'm being me.

They think that in order to maintain the confidence of their team, they must appear faultless, flawless, and ever wise. Yet most organizations need an authentic leader, not a perfect one.

But our organization doesn't need a leader with cool hair and skinny jeans. They need someone they can trust and follow. That can only happen if I embrace who I am rather than try to be someone else.

Ambition beckons us to be the person we think everyone else wants us to be. That person is usually different than who we truly are. If we don't learn to be content with who God has made us and called us to be, then we will never reach our potential as influencers.

Usually, the leader is the only person who doesn't realize how uncomfortable the're making everyone else.

These urges typically come when we enter places where we feel we don't belong.

When you find yourself in such situations and feel the urge to pretend you're someone else, resist it. The best person you can be in that moment is the one you already are.

New media encourages us to be "on" all the time, and in such a setting, authenticity requires intentionality.

Authenticity trumps professionalism!

Today, authenticity is not just expected; it's required.

With looking at yourself in the mirror and saying to your reflection, "I'm okay with who I am. God made me this way for a reason."

Today's leaders must develop the art of self-awareness. We must grow comfortable with who we are before we can share that person with others.

No one wants to work for someone who seems unaware of his or her faults, failures, and weaknesses.

Authenticity is the new authority in leadership. Sharing your failures and weaknesses is crucial to letting people in and empowering you to lead well.

It's okay for those around you to see your weaknesses. We don't have to be perfect, but to be catalyst leaders, we'd better be authentic.

Many leaders today feel great pressure to succeed, and as a result, create and accept a pseudoself.

We won't reach our full potential by investing energy into creating false versions of ourselves.

None of us should be ashamed to reach out and ask for help.

Leaders who are willing to share honestly about their own struggles immediately gain influence.

Faithfulness is a key to being a great leader.

Stand strong when others criticize them and to stand firm when everyone else may be moving in a different direction.

Authentic leaders have to be approachable and real.

We are authentic, humble, and personable.

When you are in a hurry or think someone isn't worth your time, remember that you were once in that position.

When you're small, act big. And when you're big, act small.

Practices to cultivate authenticity: Practice self-awareness; Question yourself (self-diagnosis can lead to self-discovery, which is the only path to authenticity.); Move from self-promotion to storytelling; Resist the urge to create a digital alter ego; Learn to laugh at yourself; Build a support network (Keep honest people in your life that can help you stay grounded and keep from thinking you've arrived.); Be interested over interesting (Be more concerned with listening instead of talking. Focus on others, not yourself.).

"You can't love people and influence them unless you are close to them. Upclose means you can see my warts. You can impress people from a distance, but you can only influence them up close."

This means being willing to hear things you don't like without getting defensive.

Being ourselves is more uncomfortable and difficult than we'd like to admit.

Be strong in grace. Your grace, your gift, your ability, who God's called you to be, just be yourself.... Don't be anybody else, don't compare yourself, just be you. If "you" is not everybody's cup of tea, then don't worry about it.

Be who you are. when we attempt to be someone else, we allow fear to control our lives.

You have to admit your fears in order to accept who you are and grow into the leader you want to become.

Treat others as you would want to be treated, and never compromise what you know is right.


Book Review: The Catalyst Leader by Brad Lomenick -- Part I -- Intro and Called

我曾经想过一段时间,有没有一个虔诚的基督徒,写一本如何把基督信仰用在个人成长与在这个世界上的应用,而不是仅仅的把信仰留在教会或者家庭里。也看过几个号称基督徒的人写的书,结果他们都是把基督信仰轻轻掠过,而大谈特谈的是所谓的属事的那些原则。我很失望。

而读完这本书, 我发现真是有很大的不同。Brad Lomenick 谈到了下一代基督徒领导者所应具备的八个品格。虽说书里面有一点夸耀Catalyst event的嫌疑。但是他所谈论的东西都是紧紧联系着神,联系着信仰的。并不是打着为神的幌子,来宣传自己属事的观念。这和之前我读的书有本质的不同。

下面我把在读书的时候,我所划线的句子记录在这里,作为我的笔记。笔记是以章节分开的。

0. INTRODUCTION


We must never compare our beginning to someone else's ending. Instead, we need to seek God's plan for us as He reveals our callings to us. It's important we focus on what God has called each of us to do, and not compare our callings to others'.

When people lead well, they are more likely to finish well.

The goal is not perfection but rather a posture of moving toward healthy habits and characteristics.

Ambition must be grounded in wisdom. Inspiration must be pursued with integrity. Dreams must be built with boundaries. And passions need the steady hand of principles to guide them.

Often I get so wrapped up in blind ambition and accomplishing things on my to-do list that I forget to acknowledge those around me who deserve a lion's share of the credit.

I learned that the right thing said in the wrong way is the wrong thing.

1. CALLED


Maybe you know the feeling. Something inside is pushing you to the edge, to the front of the line, to make a difference, to leave a mark.

Living one's calling is a necessary first step to leading well and becoming a change maker wherever God has planted you. Without understanding your purpose, you'll end up bogged down in the mud of life. But when you are living out your calling, your work will be better, and you will naturally want to work harder.

Leaders who make the biggest impact also have the strongest sense of calling. They seems to know the direction God has marked out for them, and they're chasing after it.

After much prayer...

I am really not that brave, I am not really that strong, and I am not doing anything spectacular. I am just doing what God called me to do as a follower of Him. Feed His sheep, do unto the least of His people.

We want others to be highlighted, we want to be focused and intentional about celebrating others.

This generation wants to find career paths that utilize both their talents and their passions. They are locating and living their callings, and we're all better for it.

God's calling is apparent and more easily identified than we might think.

Your life's calling is usually apparent at an early age, often emerging between the ages of five and nineteen.

Calling is not necessarily about a title, position, or even a certain career, but more about a vision and purpose for your life that spans all the seasons of your vocation.

Which events energized you and which drained you? What projects did you stay up late or get up early to work on? When were you able to do something with ease that might have been difficult for others?

Another reason people don't discover their callings is they're too ambitious for their own good.  They're too concerned with earning mountains of money or living a comfortable life or being respected or well-known. So they end up pursuing what they could do rather than what they should do.

I realized money and worldly success were not worth pursuing.

Pursuing one's calling is hard work. It takes time and perspective and prayer and periods of wresting to discern what God has for us. Are you even wrestling?

"Be faithful where you are," he says. "God is responsible for how big your influence gets."

"God's personal invitation for me to work on His agenda, using the talents I've been given in ways that are eternally significant."

God's will for your life begins by asking yourself, "What keeps me awake when I should be falling asleep at night?"

The second question you should ask yourself is, "What wakes me up when I should still be sleeping in the morning?"

2013年11月22日星期五

终于开始写上了

耗时巨大,墨迹了一年半的论文终于让我开始写了。虽然写了一点点literature review,但是今天正式开始写第一章了,激动。

万里长征第一步。开跋!


2013年9月30日星期一

从现在开始,我要跑啊跑,去追上那个曾经被自己寄予厚望的自己。

曾经是那么的意气风发,年级前三名,众人眼中的娇子。曾经那么的志向远大,考取人大,觉得以后一定会指点江山。

渐渐的,那个被寄予厚望的自己越跑越快,把我这个真实的本体越拉越远。不曾体会到这种差距,是因为思绪依旧存留在那个快步奔跑着的自己。而本相则远在后方碘着大肚子踱着方步。

渐渐的,以前的光环消逝了。来到了平庸的学校,在和一群平庸的学生比较中,那个快跑的我似乎跑的更加快了,而那个真实的我似乎更满足于那个快跑着的速度。完全忽略自己好久好久都只是站在原地在欣赏着前方的幻象。

许久之后,学校快不能呆了。慢慢的我要找一个公司。去面试的时候,发现每个人的两个自我都是手挽手肩并肩的前来。只有我一个人孤单的去。呼喊前面那个自己,早已没了踪影。

Travelers的拒绝,让我久违的思绪瞬时间回到了我的本身。他告诉我,其实那个快跑的我看着很远,其实更远。而要追上他,要把一些东西从我肥硕的身体上切下来,也要把一些在我旁边始终如一跟随我的东西吃进去,放到心里。

我拿着刀,在自己充满脂肪的身体上游荡,久久不愿动第一刀。他们太诱人了,他们跟随了我好久好久,从小就和我一起,我已经习惯了在他们里面的舒服与安逸。我大喊着:别人身上也有,为什么我一定要切掉?!没有声音回答我。

算了,不切了。还是先吃吧。摆在我面前的两样东西,我很早就应该吃下去放到心里。却始终逃避。 对琳琳的爱,和对神的爱。 我要把这两个吃下去,放到心里。

为了我最爱的琳琳,我什么苦都愿意吃。她是我的爱人,和我一起欢乐,和我一起悲伤,和我一起经历所有的事情,不离不弃。她是我一生的伴侣。为了她我愿意。

刚刚才对上帝发怨言,抱怨,说了好多难听的话。但我知道他依旧爱着我,过了激动的时段,平静下来后,我知道他没有离开我,只是我觉得他没和我一起。我知道我刚才流的眼泪他都装到了袋子里。他也在和我一起忧伤。即使在痛苦,他也会帮我们度过。

再见吧,懒惰, 为了琳琳和上帝。鲜血直流,我要咬着牙把你切掉。
再见吧,安逸、懦弱、逃避、不专心、不求甚解、没有目标、没有计划、浪费时间、一些没有意义的小事情。。。 鲜血染红了我的身体,我丝毫不后悔。

虽然流着血,我却身体轻盈了好多。伤口?那不是伤口,而是荣耀。神会用时间和大能抚平他们。

有了琳琳和神, 嘿!我,我要来了!

我跑啊跑,去追上那个曾经被自己寄予厚望的自己。

2013年9月19日星期四

Notes for SAS Advanced Programmer_CH10

CH10

1. Remember that when both macro language statements and SAS language statements occur in the same step, the macro processor executes macro language statements before any SAS language statements are executed.

Because the %LET statements are always processed by the macro processor
before the DATA step is executed, the value of foot will always be whatever the last
%LET statement assigns.

2. When you use the SYMPUT routine to create a macro variable in a DATA step, the
macro variable is not actually created and assigned a value until the DATA step is
executed. Therefore, you cannot successfully reference a macro variable that is created
with the SYMPUT routine by preceding its name with an ampersand within the same
DATA step in which it is created.

3. To use a literal with the SYMPUT routine, you enclose the literal string in quotation
marks.
CALL SYMPUT(‘macro-variable’, ‘text’);

4. example:   call symput(’foot’,’Some Fees Are Unpaid’);

5.
values of numeric variables are automatically converted to character values, using
the BEST12. format.

6. The SYMPUTX routine is very similar to the SYMPUT routine. In addition to
creating a macro variable and assigning a value to it, the SYMPUTX routine also
automatically removes leading and trailing blanks from both arguments.

7. CALL SYMPUTX(macro-variable,expression);
e.g.: call symputx(’crsname’,course_title);
call symputx(’date’,put(begin_date,mmddyy10.));
call symputx(’due’,put(fee*(total-paidup),dollar8.));

8. 另一种方法来用call symput(macrovariableName, expression)
e.g.: call symput(’numpaid’,trim(left(paidup)));
call symput(’numstu’,trim(left(total)));
call symput(’crsname’,trim(course_title));

9. You can use the PUT function to
􀀀 perform explicit numeric-to-character conversions
􀀀 format the result of a numeric expression.


10.

11. In this example, you use one call to the SYMPUT routine in order to create one
macro variable for each value of the DATA step variable Course_code and to assign the
corresponding value of Course_title to each macro variable. That is, for each
observation in Sasuser.Courses, the macro processor will create a new macro variable.
The new macro variable will have the same name as the value of the data set variable
Course_code for that observation. The value of the new macro variable will be the
value of the data set variable Course_title for that observation.

data _null_;
set sasuser.courses;
call symput(course_code, trim(course_title));
run;
%put _user_;       用一个 call symput 建立了好多个macro variable 在data step里。

12.


13. options symbolgen;
data _null_;
set sasuser.schedule;
call symput(’teach’||left(course_number),
trim(teacher));
run;


14.
this happens at Data step execution time.


15.
This form of the INTO clause does not trim leading or trailing blanks. Also, the
INTO clause cannot be used when you create a table or a view.

%let totalfee=&totalfee;
Note: This form of the INTO clause does not trim leading or trailing blanks, but the
%LET statement removes any leading or trailing blanks that are stored in the value of
totalfee.

16.  create multiple macro variables in PROC SQL;
proc sql;
select course_code, location, begin_date format=mmddyy10.
into :crsid1-:crsid3,
:place1-:place3,
:date1-:date3
from sasuser.schedule
where year(begin_date)=2002
order by begin_date;
quit;

17. 当不知道需要建立多少个macro  variable 的时候,先建立一个macro variable是一共多少行,然后和别的需要的连接在一起,例子如下:


18. 
这个是只想建立一个 macro variable但是要存储很多个值的情况。

19.    proc sql noprint;
select distinct location into :sites separated by ’ ’
from sasuser.schedule;
quit;

20. 用macro view 在 sql view里。

21. 


QUIZ:
1. d----------c          macro functions are handled before any SAS statement, not macro variable.
2. a              in symput, the macro variable name and value name, both need ' ' 
3. d
4. c-----b     If you enclose the DATA step
variable name in quotation marks in the SYMPUT routine, the new macro
variable will have the same name as the DATA step variable rather than having
the DATA step variable’s value as a name.

5. b
6. d
7. c
8. c
9. b----d      price=symget("daily_fee");         needs " "
10. c        in proc sql,    needs input()   to convert character to numeric.



Notes for SAS Advanced Programmer_CH8-Ch9

CH8

1. Remember that PROC SQL options are specified in the PROC SQL statement

2. After you specify an option, it remains in effect until you change it or you re-invoke
PROC SQL.

3.

4.proc sql inobs = 5;  means only read 5 rows from each table specified in the query.

5. proc sql number;    list a column in the output, which is the row number.    number and nonumber is like obs | noobs in print precedure.

6.  proc sql double; or nodouble;     means double space,   do not affect HTML output.

7. flow | noflow | flow=n | flow= n m 其实就是让每一列的内容自动换行,这样的话就不会让最后几列窜到前几列去。 对list output 有用, 对HTML pdf rtf 没用。n和m 是行宽度的范围。

8. STIMER | NOSTIMER option is showing the time for each SELECT statement. in order to use stimer | nostimer in proc sql. we have to make sure the stimer option in SAS system option is in effect by checking

    proc options option = stimer value; run;
stimer | nostimer show time after the QUIT; statement.

9 RESET optionname;     just add or reset other options. not affect other pre-set options.

10. Dictionary tables. created each time they are referenced in a SAS program; updated automatically; limited to read-only access.

11. proc sql;
select memname
from dictionary.columns
where libname=’SASUSER’        先使用 describe table dictionaryname 去看这个dictionary里面有什么,然后用这个query来选择和加条件。

12. 我感觉dictionary table 就是把某一个library下面各个数据的属性的一个集合,放到一个特殊的文件里。

13. LOOPS =  option 限制的proc sql 的inner loop 的次数。 可以用 PROMPT | NOPROMPT来 选择达到最大loop次数的时候,继续不继续。

14. EXEC | NOEXEC 先是check 命令的准确性,如果用exec,没错误了就继续执行命令。

15. 在exec in effect 时, 用 ERRORSTOP | NOERRORSTOP 去让SAS 遇到错误停不停。

16.After you specify an option, it remains in effect until you change it or you
re-invoke PROC SQL.
􀀀 The DOUBLE | NODOUBLE and the FLOW | NOFLOW | FLOW=n| FLOW=n
m options do not affect the appearance of HTML, PDF, or RTF output that is
created with the Output Delivery System.
􀀀 If you query a Dictionary table about the files in a specific library, the library
name used in the WHERE clause must be specified in uppercase letters because
that is how it is stored in SAS. Column names used in the WHERE clause must be
specified in the same case as they appear in the Dictionary table.

QUIZ:
1. a
2. b
3. c
4. d
5. d
6. d
7. d
8.d
9. b
10. b-----a



CH9Introducing Macro Variables

1. There are two types of macro variables:
􀀀 automatic macro variables, which are provided by SAS
􀀀 user-defined macro variables, whose values you create and define.

2. If you need to reference a macro variable within quotation
marks, such as in a title, you must use double quotation marks. The macro processor
will not resolve macro variable references that appear within single quotation marks.

3. When you use the %LET statement to define macro variables, you should keep in
mind the following rules:
􀀀 All values are stored as character strings.
􀀀 Mathematical expressions are not evaluated.
􀀀 The case of the value is preserved.
􀀀 Quotation marks that enclose literals are stored as part of the value.
􀀀 Leading and trailing blanks are removed from the value before the assignment is
made.

4. A SAS program can be any combination of
􀀀 DATA steps and PROC steps
􀀀 global statements
􀀀 SAS Component Language (SCL) code
􀀀 Structured Query Language (SQL) code
􀀀 SAS macro language code.

5.
General form, OPTIONS statement with SYMBOLGEN option:
OPTIONS NOSYMBOLGEN | SYMBOLGEN;
where
NOSYMBOLGEN
specifies that log messages about macro variable references will not be displayed. This is the
default.
SYMBOLGEN
specifies that log messages about macro variable references will be displayed.

6.  用 %put 后面加各种文字或者Macro variables, 先是macro variable的值。 也可以用%put _all_ 显示所有macro variable。或者%put _automatic_       或者 _user_

7. 档Macro variable里面有特殊的符号,你不想让SAS 误会的话,就用 %STR

eg:  %let prog=%str(data new; x=1; run;);
      %let prog=data new%str(;) x=1%str(;)run%str(;);
如果macro variable 里面有单引号的话,要在前面加%, 例如:
  %let text=%str(Joan%’s Report);
%let text=Joan%str(%’)s Report;      这两个的结果都是  Joan's Report

如果要把&和%也当做constant的话, 就要用 %nrstr().   eg:   %let Period=%nrstr(May&Jun);

8.
%let text=%bquote(Joan’s Report); 直接就行。也有%NRBQUOTE;

9. 
%qupcase()直接对于特殊符号不作变动。

10.
%qsubstr 不会编译解释特殊符号

11. The %INDEX function
􀀀 searches source for the first occurrence of string
􀀀 returns a number representing the position in source of the first character of string
when there is an exact pattern match
􀀀 returns 0 when there is no pattern match.

e.g.: %index(&a, v) look for the first position of v in &a.

12.
%qscan()  不会编译解释特殊符号。


13.

14.The LEFT function expects only one argument, but you are passing “June 7, 2007” to
it. It interprets the comma as the delimiter between two arguments.
You can mask the comma by using the %QSYSFUNC function instead, as follows:
title "Report Produced on
%sysfunc(left(%qsysfunc(today(),worddate.)))";
The modified statement generates the following title:
Report Produced on June 7, 2007

15. 如果macrovariable 和别的字母连起来了让SAS分辨不出来了,就用一个点(.) 来分离。那个店在编译结束后不会出现。

16.

17. If you reference a macro variable within quotation marks, you must use double
quotation marks. Macro variable references that are enclosed in single quotation
marks will not be resolved.

QUIZ:

1. b
2. c
3. a
4. d
5. d  如果macro variable里有太多的空格,SAS只留一个空格。
6. d
7. c
8. d  --------b
9. c
10. c



Notes for SAS Advanced Programmer_Ch4-CH5

CH4 COMBINE TABLE VERTICALLY

1.process a set operation: first process two select clause separately and then join together by the operator.
   process multiple operators: process first two, use the result join the next, and the next.

   INTERSECT will be evaluated first, then the rest.

2. no matter how many tables join together by set operator, only one semicolon needed(at last.)

3. when there are duplicate rows, use(INTERSECT, EXCEPT, UNION). PROC SQL eliminate the duplicate rows first and then find rows that meet the criteria.

4. 有名字按名字来操作,没有名字按位置来操作。新的列名字是第一个select clause的。如果第一个没有名字再用第二个的。

5. 必须亮同样的data type 才可以一起联合。否则有warning

6. 用ALL keyword,不删除重复行。不能和outter UNION一起用。

7. 用 CORR, 如果和 INTERSECT, EXCEPT ,UNION一起用,合并match列,删除不match的列。
    如果和OUTTER UNION一起,除了合并相应列,还会把没有match的列显示。 如果有alias,按照alias match,不是实际列名。

8. 在第一个pass, sql remove the duplicated rows. the second pass, proc sql run by operator.

9. if use  EXCEPT ALL, sql do not remove duplicated rows, only pass once by operator.

10. if use EXCEPT CORR, sql only looks lat the same-name column, remove all un-matched columns. and run by operators by the only matched column.

11. if except all corr, used all together. process ALL first by not remove duplicated rows. and then run CORR, by remove unmatched column and then run by operators.

12. use keyword ALL will speed up the process time, since it prevent SAS process data again.

13. INTERSECT  works the same way as EXCEPT. remove duplicate row, and then run...

14. INTERSECT  plus ALL , CORR works the same way too.

15. for UNION, PROC SQL concatenate two tables first and then remove the duplicate rows.

16. 用 UNION ALL,  就是两个表的简单堆砌。

17.  OUTER UNION 显示所有的行和列,不会合并列。

18. OUTER UNION CORR 会合并同名的列,其他的照显示不误。

19. OUTER UNION CORR 和 DATA NEW_DATA; SET D1  D2; RUN; 一样。

QUIZ:

1. c
2. d
3. d
4. a
5. c------------------------------------a
6. d------------------------------------b
7. b
8. c
9. b-----------------------------------c
10. a



CH5 Creating and Managing Tables Using PROC SQL


1. Notice the differences between:
   CREATE TABLE xxx (xxx char(x)....)
   CREATE TABLE xxx LIKE xxx
   CREATE TABLE xxx AS SELECT .......

2.  When creating new table, the columns should be separated by commas, and the data type and column names are separated by space.

3. By default, width of a column is 8 digits.

3.5 PROC SQL; DESCRIBE TABLE xxxxxx;      to see table information without seeing data.

4. To drop some columns from the original tables to create new table, example like:
     CREATE TABLE xxxxx (DROP = Column1   Column2) LIKE xxxxxx

5. When copying a table, such as
     PROC SQL; CREATE TABLE xxxxx AS  SELECT * FROM xxxxxx;
     the order from the new table may be different from the original one, unless using order by.

6. INserting rows by set clause.
     INSERT INTO xxxx    SET col1=value1, col2=value2, ....
     if adding another row, use another SET clause.  Not require order, since column name specified.

7. inserting by  value clause
     INSERT INTO xxxxx (optional column name)
        values ()
        values ()
     if insert all values in order for all column, do not need to add column names.
     if for some columns, need to add optional column names.
    specify missing values   ' ' for character variable and . for numeric.

8.  INSERTING by a query result.
    PROC SQL; INSERT INTO xxxxxx   SELECT .... FROM... WHERE....

9. INTEGRITY CONSTRAINT ( I personally think it is very important.)

    define integrity constraint example:
    CREATE TABLE xxxxxx
     (ID char(5) primary key,
       Gender char(1) not null check(gender in ('M', 'F')));

10.  Create a constraint in constraint specification
       example:
must give a name for constraint.


11. when inserting values into a table with constraint, if there are one values not comply with the constraint, SAS will deleting all the inserted values. (by default, can be changed)
      if there are more than one values that not complying the constraint, SAS log only shows the first one.

12.  UNDO_POLICY = REQUIRE       NONE     OPTIONAL   to specify what to do the undo process.
        example:   PROC SQL UNDO_POLICY = NONE; ......

13. only to see a table's constraint.
       proc sql; describe table constraints tablename;

14. updating all rows:
       proc sql; update tablename    set  expression(or equation)  where....;

15. when updating subset of rows. there are two ways.
  (1)  using multiple update and set clause
  (2) using a single update clause and contain CASE expression.
    CASE    WHEN   THEN  ELSE   END;    if there is no ELSE clause, it will be missing.
CASE expression can also be used in INSERT  and  SELECT statement.

16. when there is a case expression, proc sql first find the value in case expression to fill the equation, and then evaluate the equation for each row.

17 updating rows do not create any new rows.

18. in case expression, if the function used multiple time, it can be expressed one time in case operand. Example:
it can be used only hten the function is a '='  comparison.

19. use CASE expression in SELECT statement. example:
20. PROC SQL; DELETE from tablename where expression;
       to delete all rows , just remove where expression.

21. ALTER TABLE deals with columns.

22.  proc sql; alter table tablename ADD newcolumnname type format, newcolumn2 type;

23 PROC SQL; ALTER TABLE tablename DROP column1, column2;

24 use alter table cannot change character column to numeric, or the column name. it can change column length, informat, format and label.

25. PROC SQL; ALTER TABLE tablename MODIFY columnname format=...   label=...;

26. delete a entire table.    PROC SQL; DROP TABLE tablename;

27 The CREATE TABLE statement generates only a table as output, not a report

QUIZ

1. b
2. a
3. c
4. b
5. d
6. b
7. a
8. d
9. c
10. a









2013年6月16日星期日

Class notes for Introduction Python_week 7 and 8

Week 7

1. do not repeat code again and again. 把重复的code 写成方程或者是class里面的一个方法。如果同样的code重复多次,如果有错,或者需要更改的时候,每一处都要改,太容易出错。

2. 有的时候可以在dictionary里面,call function的name , 而不是 function,然后最后调用的时候在后面加上括号( ), 来调用。
e.g。
def f():
     print "hi"
d = [0: f]
d[0]()

3. 用dictionary来减少重复的code,很好

4. tuple 虽然不能被更改, 但是可以被引用。 比如 tuplename[1]

5.编程时,尽量灵活一些, 尽量避免常数。 并且如果一个常数依赖于另外一个常数,把计算的过程放在code里面,这样,一个变了,另外一个也会自动变。

6. 方程中,return多项的时候, 用逗号分开

7取50%, 50% 的时候 , 可以用 random.randrange(0,2) ==1 来弄。很有意思

week 8

1. sets: no order, no duplicates

2. instructor = set([1,2,3]), set can be iterated
    instructor.add()
   instructor. remove()

3. print 'Rixner' in instructors    ,   return true or false

4. be careful of someset.intersection_update

5. use global variable usually is a bad idea.

2013年6月4日星期二

Class notes for Introduction Python_week 5 and 6

Week 5

1. in mouse click, there should be a position parameter, which is a tuple, unmodifiable.
2. 可以用 list(pos)
3. lst.index(8), return the position of 8 in the list.
4.  82 in lst   returns T, F
5. lst.append(632) adds 632 to the end of the list. one more element added.
6. lst.pop(4) remove the value in position 4;  lst.pop()  remove the last element, and it is the last element..

7 for ball_pos in ball_list.   这里的in 和上面 4 in lst 里面的不一样,这里的是一个接着一个的跑。
8 for kccc in ball_list,  这里面的kccc没有必要是事先定义好的,只要自己心里面认为,并且之后的代码用法一致就好。


9. never remove anything when you in a iteration loop. if you want to remove something, keep track the things and remove it later.

10. start something simple, make it working. modify it, keep going. keep it working....modify it. just make small change.

11. Dictionary: actually a mapping.    Key -> value.   d1= {1:45,‘a’: 55} 定义1是45, a 是55. print d1[1] 返回的是45

12 if index in a dictionary,  just actuall iterate the keys.

13. if something in Python is a constant and never gonna be changed, use the name all capital.

14. def square(number):
          return [n**2 for n in numbers]

15. def balls_in_range2(ball2):
          return [ball for ball in balls if is_in_range(ball)]       14, 15 shows neater way for loop

16. length of a list is 5, but index is from 0, so the max index is 4.

17 dictionary has no order. only un-mutable values as key.

18 d[500] = "wow"   if there is no key 500, it will add key 500 and value wow automatically.
   d[(1,2)] = 10,   map (1,2) to 10

19 for key, value in samplelist.items():   就是成组循环key 和 value
20. samplelist.values() 是仅仅循环value

Week 6

1. Class name should be always capitalized
2. create a field inside an object,  use dot,   e.g.    self.name
3.当object要call 一个class 里面的method时, 就用 objectname.methodname, 但是一定要保证这个object是这个class里面的object。可以用 type(objectname) 来查看。

4.在任何class method 里,第一个参数永远是self,这个会由python自己来管理。

5. class 里面, self 就是object本身。

6. when to create a object in a  class, the first function always __init__

7. in each function in a class, self needs to be a prameter

8. While loop                                 while condition:
                                                            expression

9. in While loop, we do not know when the loop will end, unlike the for loop.

2013年5月14日星期二

Class notes for Introduction Python_week 3 and 4

1. in Canvas, the origin is always on upper-left corner.
2. On a 300 by 200 pixel canvas, the pixel coordinates range from 0, 0 in the top left to 299, 199 in the bottom right.

3.draw handler needs to be registered.
4. use Brackets [], to define the position of the texts.  The position is the lower-left corner of the string.

5. print s1[0]  是从0开始数一个string, 第一个字母是第0个。
6. print s1[-1] 是print 最后一个字母。
7. print s1[0:7] 是print 前7个字母,不包括7所代表的的那个字母,是开区间。
8. s2[:13] 前13位。

9. str(123)把 数字变成string;  int()就是string转成整数

10. position = [50, 60]      position[0] = 50     position[1] = 60

11. decomposition the program is important. draw is draw, timer is timer, message is message. One has nothing to do with another.

12. don't forget start the frame.   frame.start() . same for timer.   timer1.start()  timer2.start()

WEEK 4

1. list   [] empty list;  [1,2,3] or ['hello', 'goodbye'];  position = [4, 9]; even other list inside list.
 [[1,3], ['a', 'b'], []]

2. len() return the length of the list.

3.  access the list print l[0]    index start from 0   .   l2[1:3] 是l2里的第二项和第三项,不包裹第四项。

4. l2[0] = 'cheese'

5. chr() turns the key codes number into caracter.

6. in Python power use ** 2  it is square

7. In python, for update vector, we need update x and y separately.

8. a is a list, and b = a,  if change a element in a,       b is changed too.

9. a is a list,   b = list(a) , b is the same list as a , but when updating a ,   b unchanged.

10. In a function , we do not need "global" if using mutation. We only need it when doing assignment.

11. type([1,2,3]) is list,     type((1,2,3)) is tuple.  tuple is not mutable.  If you want to protect your data, you'd better save it as a tuple.

2013年5月6日星期一

Class notes for Introduction Python_week 1 and 2

1. variable name: only start with  "_" or letters. Not start with number. 也最好不要用点 . 在中间
2. "=" assign; "==" logical comparison.
3. update variable:  my_age +=1.   take the current variable value and plus 1 as new variable value.
4." : " 意味着下面要写一个block of codes. 下面的要indent,几个indent没关系,重要的是一致。when the indent is done, the block of codes is done.
5. function does not have a parameter. In this case, no input, function return NONE.

6. -3%800   结果是 797
7.  35//10,是把35除以10,然后取小数点前面剩下的数
8. str(aaa) + str(bbb) +"1111" 是把这三个string 都连起来。
9.  if        elif         else
10 在 function 里面解释, 用三个连续的 双引号“”“在前, 也用三个”“” 在后。叫做documentation。 解释这个方程式做什么的。  用comment也行。

11. x += y + x  意思是 x=x+y 然后再加上x。   和 x=x+y 意思不同。

if  condition:
   result
elif  condition:
   result
else:
   result

要写 x ==1 or x == 2,    不能 x ==1 or 2

WEEK TWO

1. Events : Input; Keyboard; Mouse; Timer
2. there is a event queue in Python which we cannot see. event一个一个的执行,不能两个一起执行。如果同时出发两个事件(比如点鼠标和按键盘),python会形成一个Queue,一个一个执行。
3. 当event发生的时候,python 会去执行相对应的Handler.

4. all the variables created inside a function are called Local variables, it can only be used in the function.
5.如果在function 里定义一个和外面的variable一样名字的variable。在function里面按你定义的走,但是外面的不影响。

6. 挡在一个function里面要创建或调用一个global variable的话,就写出来  global number1

7. Program Structure: 1. Globals (State); 2. Helper Functions ;3 . Classes(Later)
          4. Define event handlers; 5. create a frame; 6. register event handlers. 7. start frame & timers

8.  simple gui 里面是里面 string input(text input), 要用 function  int() 转换成integer number 或者用float() 来转换成floating point number.

9. 当写一个方程,没有说return什么东西的话。python会return NONE。 因为Python总是要return一个东西。

10. 写方程的时候,在每一步都加上print的输入和输出的东西,会是很好的debug工具。 最好还能加上lable