Posted by
Scott
on
31. March 2009 05:05
Training the un-wanting is just plain hard.
Can you teach me to program/code? I get this question a lot in my day to day life. I have fallen for it almost 100% of the time and in total, about 10 times in the past two years. Friends ask me if I can teach them how to program. Other Friends want to create nifty little applications and need to know how to start. Then there are those that wish they knew, but don't know where to start. Every time I tell people I am a full time developer, I tend to get the question. The problem here is not that I get the question, its that 99% of the time I say yes. I actually don't really remember the last time I said no.
The United States along with other countries such as South Korea, India, Parts of China, Australia and Parts of England are now fast becoming post industrial countries. They are losing their manufacturing expertise and moving to more of an intellectual work environment. In this work environment, most people sit on their butts all day in front of a computer and get something done. In a work where the computer rules the office space, people want to manipulate their computers more and more. They want to figure out how to change information and manipulate the way things work. So because of this post industrial revolution, people want to learn how to program. Take for example, MySpace. You have to know how to develop for the web in order for you to make your page more personal. Its becoming more and more mainstream to hack a bit at code. It used to be the things that nerds do and now every kid on myspace.com has coded a little bit.
I have one friend who wanted to create a small application for user management of their organization (I ended up doing most of their work). I have another friend who wanted to learn how to create online games for Myspace. I sat down with him for a couple of hours and banged out some code. For the next week, he experimented a lot. Then he just fell off and I no longer heard him talk about code. I just had another friend who knew a bit of C and C++ in which she asked me if I can teach her to code. I said yes for the plain fact that its hard to say no. I learned to say no a while back and people tend to confuse me with someone as selfish or self absorbed. I usually let it go as that for the short answer. The long answer for those closer to me is I almost always said yes to things and became overwhelmed with things to do. It happens to everyone that says yes too much, so I had to learn to be a bit more selfish or people would just step all over you.
So, how do I make sure that the people I teach are actually going to continue doing it? This is a question I ask my self a lot and still don't have an answer for. For every person I taught; I have tried to seduce them to being my partner in crime but it just doesn't seem to happen. I still don't know how to keep these people working on code. To keep developing, to keep moving and firing. The point is, I need to start saying no to these folks as well or I need to bind them to a contract that says we are going to build this together and this will be how you learn to code. By helping me build this application, I will teach you how to code.
Thanks for listening.
If you liked this post, please be sure to subscribe to my
RSS Feed.
Posted by
Scott
on
24. December 2008 22:34
At the time of writing this, I finally got my second real website out for customers and would like to publish my profile online. So at the time of writing this, I have completed two sites for customers. This list will grow with time with each new project I create.
- Lumber by Lance - 12/24/2008 – This site is for a customer that produces logs to lumber and then has a kiln to dry the lumber out.
- Indialantic Volunteer Fire Department - 6/20/2008 – This site is for a volunteer fire department out of Indialantic Beach, Fl. I was quite happy with this project because all the white space is completely updatable before I found out the concept of what a CMS is.
- DotNet Instant Messenger - 12/28/2008 - This site was designed by a friend without a website. I designed and created DotNet IM. Pretty proud of this one actually. First real engine I have put out on the internet.
- DrinkingFor -1/09/2008 - Been working on this site with my partner in crime. I knew asp.net and he knew only java. Since C# and Java go hand and hand, he wanted to jump onto a simple project. This is it. We are working on it to make sure it up to web 2.0 standards but it has been launched.
- UtopiaPimp -6/30/2009 - I started this site well over a year ago and gave it a break so I could work on DrinkingFor. I am back at this site and it is working well for me. The site is built for a Online game at Utopia.Swirve.com. It is a game that requires a bit of intellect and collaboration. The learning curve has said to be high, but it is still one of the best and if not oldest online games in the world. UtopiaPimp currently has over 13k users.
If you liked this post, please be sure to subscribe to my
RSS Feed.
Posted by
scott
on
26. May 2008 01:56
Visual C# 2008 Keyboard Reference Poster
Visual Basic 2005 Keyboard Shortcut Reference Poster
VERY Cool!
If you liked this post, please be sure to subscribe to my
RSS Feed.
Posted by
Scott
on
23. April 2008 19:34
Boy am I tired. I can literally say I am exhausted. Now here is why. Sessions today were AMAZING and today was a good day because yesterday I found a programmer just like me who is as young as I am who wants to start up his own company just like I do. I am not telling you his name, but I got his contact information and will be giving him a ring ding ding soon! Anyone else interested in helping me with my ideas? I am poor and don't pay until we actually produce something, but I am looking for some takers. I don't mind splitting 60-40 or even starting a small business with employees. It will NOT be a consulting business, too many of those floating around. I want to start a business with my own ideas and make them a reality. Any takers?
Sessions Attended:
Building Custom AJAX Controls:
Taught by Dan Wahlin. If you have ever met him, he is as tall as me and married. One question I asked him personally is how he gets so much done and his wife be okay with it, when I have a girlfriend of my own. He said she gets used to it. This guy is also pretty interesting and pretty informed on the subject of ASP.NET. I enjoyed this session, because the JavaScript he taught was pretty much down to my level of understanding. He hit the topics of web services and JavaScript debugging in Visual Studio. He hit on the things to do when your starting up a new JavaScript file and make sure it talks to ASP.NET. Cool session, but far too much to be explained here.
Building N-Tier Applications with LINQ:
Taught again by Dan Wahlin. Another great session about how to implement LINQ into your projects and showed the easy parts of LINQ which only gets easier from T-SQL. Thank you Dan for this great session. It is a lot to implement in this short session.
Can you tell I am getting tired?
PLINQ: LINQ but faster:
Taught by the one and only Stephen Toub. The same guy I met last night is now teaching a session. I didn't know much about what he was talking about last night, but when he hit on it today in the session, I WAS BLOWN AWAY. So, he has got this 24 CORE computer up in Washington that he ran demos for us on. If you don't know what LINQ is I should ask that you check it out. PLINQ is the next step up and which you can select and transfer data at tremendous speeds using the processors that a person has in their computer. He completed a select statement with one processor with 256mbs worth of data and took about 20 seconds. The second select statement was with PLINQ with the same amount of data and the select completed at .5 seconds. Amazing STUFF. This kind of data selects could be used for gaming and even the Folding@Home project where they use personal computers from all around the world to fold protein. Amazing things if they only had their hands on this.
.NET Rocks:
Live interview with Dan Wahlin. I screamed a few times and asked the first question. Great interview and good times thanks to Carl Franklin, Richard Campbell and Dan Wahlin.
Time to Go home. Thanks for reading. More to follow.
Side Note: I am required by my company to do a "What I learned" white paper. I will post it to this blog when done, because it will contain a lot of things that I thought would be too detailed to explain in these entries.
If you liked this post, please be sure to subscribe to my
RSS Feed.
Posted by
Scott
on
22. April 2008 19:32
The third day and almost done. I wasn't happy that the third day was here, but I guess I have to live with it. There is something about being around a bunch of nerds. All I can say is I did thoroughly enjoy my self on this day. I got to meet a bunch of interesting fellows including Carl Franklin and Richard Campbell. I will speak more on that later, but now lets get to what I learned.
Sessions Taken:
Programming SQL Reporting Services:
Taught by Paul Litwin which is the director and coordinator of sessions at DevConnections. He was extremely knowledgeable in Reporting Services and one area of development that I needed more time in. I specifically need this for my job more and so any Reporting services sessions I saw at DevConnections, I made it mandatory for me to go to. This session along with the other reporting session I took, were very informative. They talked about how to make very good looking reports along with the ability of drilling down to more detailed reports when you clicked on a certain data item. The reports are coded on the back end with vb 6 and so this causes a slight problem when a developer works in C# or VB.NET and they have to convert to the old ways of vb 6. I also learned a few things about configuration manger and how to access the web.config files information. This was a rather valuable session and I must say that if you haven't already, meet Paul Litwin personally. He is quite a character and was a great help on a personal level.
The Science of Great UI: A MUST see session!
Instructed by Mark Miller. This was one of those sessions you take a lot of information in and only remember it for a small amount of time unless you implement it. This session was taught by the same guy who invented and is the Chief architect of CodeRush. Mark presented extremely well and talked about all the UI problems in many programs he sees out there in the real world. To give you an example, the SAVE button is an old "A:" floppy drive, but who uses those anymore? Another would be not to have keyboard shortcuts in any program you create. Shortcuts are essential to great UI because it lets you get around the program faster. I must note that half way through the session, Marks computer went down and instead of saying "oh my god, the session is over" he pulled out his thumb drive and asked for another computer from the audience. He is a great speaker and presenter which knows a lot about UI. One session I would like to see over again.
ASP.NET Internals:
Taught by Rob Howard. When I was done with this session, I was immersed in the amount of stuff I didn't know and the amount of stuff I will try and remember. He described a lot to do with why the ASP.NET team built things the way they did. Why the Update panel does a full page update, the need for sessions and caching, the underlying structure of the framework, the IIS advances with ASP.NET. He also showed information about the HTTP Runtime and the underlying way to create a scheduled task. For Example:lets say you are on a virtual network and don't own the box so therefor you can't create a scheduled windows tasks. He showed us how to do it using the Global ASAX and how to speed up our box by caching a lot of data. I admire this man. He has done exactly what I wanted to do with my life. I went up to him at the end of the session and let him know he was my hero. He built a application that is free to non-profit organizations. Its called Community Server and after quitting Microsoft he has turned a profit and is continuously working on it day in and day out. He had an idea and went with it. That is why he is my hero. I have plenty of ideas and I am currently running with one of them, but finding the time is the issue. haha. Thank you Rob for a wonderful job.
Building "Pure" Ajax Applications with ASP.NET Ajax:
Taught by Stephen Walther. This session went into a DEEP DIVE into JavaScript and how it could be made without full page posts backs. I must say that I did drop out of this session half way through because it was more about politics and why using JavaScript over ASP.NET controls was better than the other. It didn't take a deep dive into how to functionally use it which is what I would have wanted. After dipping out I went to ASP.NET search engine optimization tips and tricks by Rob Howard. This session after enjoying the first of Rob's sessions was also very cool. I enjoyed understanding how to better suite my online application for the search engine these days. Thanks again Rob for another wonderful half a session.
Building a LINQ-Based Business layer for ASP.NET application:
Instructed by Rick Strahl. I must say I am a frequent visitor to Ricks site and the picture on the left hand side doesn't do him justice for the way he looks in person. Sorry for being blunt, but he is an overall very cool and nice guy. Sometimes after reading his blog posts, I think he is a bit too smart for his own good and after meeting him in person, I must say he is wicked smart and has a good sense of street smarts. heh. In this session, he completed a lot of things I didn't know. Background "I have only been programming professionally for a year and a couple of months and he taught me through his code how to really set up an application or multiple applications with one code block." I also must say, because of this mans session, I have started my own framework called the STFramework for SpoiledTechie which builds off of the ASP.NET Framework with my own personal code. heh. He taught us how to set up an application layer, business layer, data layer and a UI layer for starters. Then he went deep into how fast LINQ was compared to other data selects and I must say, it does become a bit slower, but over all LINQ is an awesome language to deal with.
Extra things I learned:
Bill Gates is genuine and has a good character. I was talking to Julie Lerman which did an interview with Bill Gates and published it in Code Magazine. Thank you Julie, and which if you haven't met her, she is a great person. We chatted for a good 30 minutes all about what I was learning, how ASP.NET was evolving, how much people make on book deals heh, and which she introduced me to a guy up at Microsoft named Stephen Toub who works on Parallel Computing up at Microsoft's R&D labs. Pretty impressive stuff he is working on and which I will explain more in my next post about DevConnections Day 4.
Google has an Achilles heel. More to come on this topic in my next blog posts, but it is an interesting topic.
I got to spend an evening with Richard Campbell and Carl Franklin who run the Internet radio show DotNetRocks in which their fun an entertaining interviews of ASP.NET superstars are informative and topic related. Richard, and Paul Litwin and I talked about various things until Carl and Mark Dunn came stumbling in from a Irish pub. We had great conversation over Microsoft, good drinks and what are Gets:Sets in the programming language. I did ask the question of what Gets and Sets are and out of Paul and Mark, I will have to say that Mark answered the question better. Thanks for the great night guys. I truly enjoyed your company and hope for many other nights like it in the future. heh. Pictures below. Also, Rob Howard was there for a few minutes, but he stepped up as I sat down because it was getting late of course.
Sorry about the lighting, Taken with my AT&T Tilt. From Left to Right (Richard Campbell, Me, Paul Litwin, Carl Franklin).
Ahh, before I forget, I won over $300,000 dollars in PLAY money at the craps table tonight! Too bad it didn't win me anything at the raffle the next day.
I can't think of anything else and I hope this was a good read.
If you liked this post, please be sure to subscribe to my
RSS Feed.
Posted by
scott
on
4. April 2008 01:12
So here I am building a new site that will estimate around 500,000 page views and 50,000 database transactions DAILY. I am currently working on a simple query that selects ONE row[column] from a database and returns the value to the rest of the methods. I have a simple thought or question I would like answered and thought this would be a place to bring it up.
Is the foreach loop required even if I know I will receive only 1 record back from the database?
That's it and to give you an example:
CS_Code.DataContext db = new CS_Code.DataContext(SQLStatementsCS.ConnectionStringID());
var query = from RN in db.Province
where RN.Name == Name
select RN.uid;
int value;
foreach (var uid in query)
{ value = uid; }
I think it is kind of pointless to create a foreach loop and use 3 lines of code to just get an ID out of the database. So let me know in the comments section if this is the only answer and I will point out the answer and give you a link back to a site of your choice.
Thanks guys and dolls.
Posted by
scott
on
12. March 2008 16:35
Alright ladies and gents. Two weeks ago, I sent a memo to my boss. I told him all about Devconnections and how much impact it would have on the team of developers I work with(currently 4 total and the other three are Cold Fusion dev's) and our next up and coming projects include a HUGE project we just landed. If you know who I work for, then you would know what I was talking about. I am excited with this project. It excites me. There is allot of data capturing and this type of project is on the bleeding edge of development and ideas. Wow and I am excited for both my company and I now get to go to Devconnections. I currently reside in Melbourne, FL so it is an easy drive to Orlando which the company will pay for everything including but not limited to food, transportation, hotel etc... I also get to go to the Heroes Happen Launch of Microsoft 2008 Products on company time. The launch event is sold out for Orlando, FL which every attendee also gets a version of Windows Server 2008, Visual Studio 2008 and SQL Server 2008 for FREE. This is a heck of a bargain that I just cant say no. I am pretty sure these versions are complete full versions. Can someone Verify?
I think this will also be an amazing event which opens the Friday after Devconnections. What do I need help with? Well let me tell you after looking through the brochure, there are allot of courses and sessions to look over. I then went ahead and narrowed it down to 19 sessions I want to go to. I still have to decide on only 13 sessions with the hope they don't overlap. I need feedback so please help me on this.
Requirements:
- I don't want a course that I can learn through an ASP.NET tutorial on the web EASILY. I pick up things quick, so I want sessions that I can't pick up unless its shown to me.
- I have only been coding for 1.5 years now with a total of 8 years web design experience, so I still consider my self new to the C# world. I want to learn things, the average person wouldn't pick up in that year.
- I want things that will benefit my company and me. Sorry, I can't give you name of the company, but they have been in the news allot as of lately.
- I want to learn new technologies including take a few courses with JavaScript.
- I want to take Carl Franklins session. I have heard him plenty of times on .Net Rocks and know he is a master programmer and presenter!
Those are the requirements, now since I still consider my self a newby in the C# world, please help me pick. I will listen to all replies with earnest.
AMS304: INTRODUCTION TO THE NEW ASP.NET MODEL VIEW CONTROLLER (MVC) FRAMEWORK MICROSOFT
One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. In the near future, ASP.NET will include support for developing Web applications using an MVC-based architecture. The MVC pattern can also help enable red/green test-driven development (TDD)—where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself. Join us for a dive into the new MVC Framework.
ADX210: BUILDING A LINQ-BASED BUSINESS LAYER FOR ASP.NET APPLICATIONS RICK STRAHL
With LINQ and LINQ to SQL, there are many new opportunities for creating a more flexible, business object layer using the enhanced database connectivity and language enhancements that LINQ offers. Rather than focus on the new features of the LINQ engine, this session puts LINQ into the perspective of a business-object framework and how you can leverage LINQ as part of this high-level application layer. I’ll start by examining how LINQ to SQL interacts with the database and see how this model fits for data access, both directly in the user interface layer and in a more formal, multitier-type business layer. I’ll then dive in and examine different ways you can use LINQ to SQL in combination with a traditional business layer and highlight the fact that DLINQ, on its own, does not necessarily replace a flexible data access layer in an ASP.NET application. The focus of the session is on ASP.NET business-application development, which is used for examples and special considerations for data retrieval.
AMS204: DISPLAYING DATA WITH THE NEW LISTVIEW AND DATAPAGER CONTROLS IN THE .NET FRAMEWORK 3.5 MICROSOFT
Get complete control over how your data is displayed using the new ListView and DataPager controls. Take a deep dive into using these controls to easily and efficiently display and update your data. Learn how you can control every detail of how data is presented to the users of your site.
ADX211: BUILDING N-TIER APPLICATIONS WITH LINQ DAN WAHLIN
Creating a modular and maintainable application architecture is always a key part of the application development life cycle. In this session, you’ll learn how to build N-Tier/N-Layer applications that leverage Language Integrated Query (LINQ) to minimize development time while still maintaining module design practices. Topics covered include using the Visual Studio 2008 LINQ to SQL designer, using data context objects, and performing different types of LINQ queries.
AGN311: DEVELOPING A PROVIDERBASED FEATURE FOR ASP.NET 2.0 MIGUEL CASTRO
You’ve used ASP.NET 2.0’s Membership system, right? You’ve even developed your own custom Membership Providers. But did you know that you can use that same Provider Model for any feature of your application you wish? I’ll show you how by creating a “credit card processing and returns“ sub-system that takes advantage of ASP.NET 2.0’s Provider Model, allowing you to create different credit card processors any time you want without changing your site code. Many ASP.NET developers don’t know you can even do this; come be a part of the few.
AGN310: URL REWRITING: WHAT, WHY, AND HOW MIGUEL CASTRO
You may have noticed sites out there with URLs like“.../2007/10/8.aspx“. Obviously this signifies a date, but can there really be a page for every day of the year on this site? The answer is definitely not. This is a technique known as URL rewriting, which allows for friendlier URLs that may not necessarily correspond to the site’s physical page structure. More importantly, this technique is crucial for search engine optimization, since typically search engines ignore query strings in the URL. In this session, I’ll show you the basics of URL rewriting, teach you how to centralize it using HTTP Modules, and even get you going on a reusable URL rewriting engine component.
AAR101: USING THE ASP.NET MVC FRAMEWORK DAVE SUSSMAN
The ASP.NET postback model was a radical step for Web applications when it was released and is now commonplace. However, applications are becoming more complex and provide some challenges to testing. The new ASP.NET Model View Controller (MVC) framework provides a clear separation between the aspects of ASP.NET pages, allowing for cleaner code, easier and faster testing, and powerful and flexible URL mapping. This session.com April 20-23, 2008 Orlando, Florida will examine the MVC framework, showing how it differs from the postback architecture, and how you can integrate it into existing applications.
APF310: ASP.NET PERFORMANCE AND SCALE TIPS AND TRICKS ROB HOWARD
This presentation takes a look at some tips and tricks for getting great performance out of your ASP.NET solution. It will start with some of the common physical design options, examine the choices to make when writing ASP.NET and .NET code, and finally look at some of the tools used for tracking and measuring changes in your ASP.NET application’s performance. You’ll leave this session with some actionable tips & tricks that you can take home and apply immediately.
ARP250: PROGRAMMING SQL SERVER REPORTING SERVICES PAUL LITWIN
In this session, you’ll learn how to programmatically manipulate SQL Server 2005 Reporting Services (SSRS) and integrate SSRS into your ASP.NET applications by employing URL Access, Report Viewer controls, and the Reporting Services Web Services. A major issue with SSRS is that you can normally only display reports using Internet Explorer, but in this session you’ll discover how to integrate SSRS into your applications using any modern browser, including Firefox, Netscape, and Safari. You’ll also learn how to extend reporting services by calling custom .NET assemblies from your SSRS reports. Finally, the session will touch on improvements to SRRS promised for the upcoming SQL Server 2008 release.
APG315: ASP.NET INTERNALS ROB HOWARD
This presentation is a deep-dive into the inner-workings of ASP.NET. In it you’ll learn exactly how ASP.NET communicates with the outside world, such as with IIS. The session will also peel open ASP.NET’s HttpRuntime for a deeper look at the internals of the request/response processing architecture. Then the session will wrap up with a discussion of the ASP.NET Page and how it is parsed and compiled. If you want to learn how to write better ASP.NET applications, knowing exactly how ASP.NET works is critical.
ACS311: BUILDING CUSTOM ASP.NET AJAX CONTROLS DAN WAHLIN
By creating custom ASP.NET AJAX controls you can encapsulate frequently used functionality and promote better code re-use in applications. In this session, you’ll learn how to create client-side ASP.NET AJAX controls that extend classes in the ASP.NET AJAX script library. You’ll also see how you can encapsulate client-side controls in ASP.NET AJAX server-side controls. Topics covered include defining client-side control constructors and fields, using the prototype design pattern to define control properties and methods, disposing of resources, and creating server-side controls that implement the IScriptControl interface.
ACS216: JAVASCRIPT FOR ASP.NET DEVELOPERS STEPHEN WALTHER
JavaScript is a badly misunderstood language. This is unfortunate, since a mastery of JavaScript is a requirement for building Rich Internet Applications. In this session, Stephen Walther provides an introduction to the JavaScript language for C# and Visual Basic .NET developers. In particular, you’ll learn how to create JavaScript objects and how to take advantage of prototype inheritance. You’ll learn how inheritance in JavaScript differs from inheritance in Visual Basic .NET and C#. The session will also tackle important and advanced features of the JavaScript language such as closures.
A LAP AROUND VISUAL STUDIO TEAM SYSTEM 2008 MICROSOFT
In this demo-intensive session, you will be exposed to many of the new features in Visual Studio Team System 2008. This session cover everything from Team Foundation Server for project management, work item tracking, version control and build support, to integration with Microsoft Project and Excel, unit testing, code coverage and code metrics, database projects, to Web testing with AJAX support and the new user-pace load testing. You will leave with an understanding of how Visual Studio Team System 2008 can be your organization’s Application Lifecycle Management (ALM) solution, and enable you and your team to collaborate and communicate to ensure software quality and provide visibility into the development process.
IMPROVING TEAM DEVELOPMENT MICROSOFT
Do you build software alone? In today’s world, software development is done by increasingly larger teams made of people with different skill sets, including project planning, functional definition, development, and testing. As teams grow larger there is a greater need for tools to enable the communication and collaboration that is necessary to deliver high quality software effectively. In this session, you will learn how to function as a collaborative team using Visual Studio Team System 2008, including process templates, work item tracking, version control, and reporting. Whether you are on a team that values Agile process, one that prefers CMMI, or any other process, this session will apply to you.
VISUAL STUDIO 2008: LINQ DEEP DIVE AND BEST PRACTICES AMANDA SILVER
LINQ (Language Integrated Query) is a key platform innovation introduced with Visual Studio 2008 which brings SQL-style query expressions into VB and C# enabling you to describe what data to reason about instead of how to access the data. In this session, by taking a much closer look at the language features that enable LINQ-enabled frameworks, we’ll uncover tips, tricks, and best practices for writing queries that will help you write robust, high-performing, maintainable business applications more quickly. In addition to gaining a solid understanding of LINQ for data access, you’ll also leave this session with a clear understanding of how query and the individual language features can be leveraged in other parts of your application to write less code.
BUILDING SERVICE ORIENTED APPLICATIONS WITH WCF AND VISUAL STUDIO 2008 JOHN STALLO
Windows Communication Foundation (WCF) is one of the core platform technologies introduced in .NET 3.0 and Visual Studio 2008 includes tool support for building and consuming WCF services. In this demo-focused session, we’ll start from the basics of creating and consuming a WCF service and quickly move into the advanced techniques and support related to service hosting, service configuration, etc. This session assumes you are familiar with the basic concepts of WCF and will focus on the end-to-end experience within Visual Studio 2008 for building and consuming WCF services.
VVS310: FUN WITH PROGRAMMING CARL FRANKLIN
Looking for something fun and inspirational? Let Carl Franklin show you some of the fun you can have with Visual Studio .NET and a few cool ideas, from artificial intelligence to practical joke software.
VPF305: FUNDAMENTALS OF WINDOWS PRESENTATION FOUNDATION: BEYOND THE BLING KATHLEEN DOLLARD
Have you seen Windows Presentation Foundation (WPF) portrayed as a way to spin photos on cubes and wondered what this had to do with you? Windows Presentation Foundation does take us into a new realm full of graphic possibilities, but it also offers a radical new UI model that’s well worth exploring. This session focuses on how you can use WPF to make business user interfaces. You’ll focus on the underlying model and separation of UI into discrete pieces that can be expressed in different ways. You’ll build UIs with grids and stack panels for layout and explore databinding, templates, and triggers. You’ll see how to create an application that’s logically organized and you can customize both in look and feel on a global basis—either to customize for individual clients or to keep your application looking fresh through future UI fashion changes.
I hope that narrows it down for you so you can give me pointers on where to take this.
Scott Pio
Posted by
scott
on
9. March 2008 18:57
Here is my first thought on things.
I just created a twitter account, I know its a long time. But since I created my blog with the idea of wanting to get the word out about what I think. I decided to go searching for a twitter control for the BlogEngine.net. Which I found one at Codeplex, it is called BlogEngine.NET Twitter Extension. I went to look at the application and I was satisfied, but I only found that the application just gives the latest feeds of what you published in twitter. I wanted to give it more extensibility like the JavaScript version of the Twitter badge.
The current Twitter application on codeplex like I said only does the updates without any times, dates or user names. I decided to upgrade the application to include how long ago the message was sent and a link to the message on twitter. This took a few hours actually to dive into the old code and produce the new stuff. I hope you like it.
To Download:
Twitter.cs (8.22 kb)
To Install:
Prerequisites
BlogEngine.NET 1.3 (1.2 ?)
How To
1. Download source code. Put the Twitter.cs file in App_Code/Controls folder of your BlogEngine.NET site.
1. Télécharger le code source. Copier le fichier Twitter.cs dans le dossier App_Code/Controls de votre site BlogEngine.NET.
2. Add the following line in the page where the control should appear.
2. Ajouter la ligne suivante dans la page où le contrôle doit s'afficher.
<blog:Twitter ID="Twitter" runat="server" Username="julesss" Password="mypassword" />
Properties
- Username (required) : username of your Twitter account
- Password (required) : password of your Twitter account
- Timeline (optionnal) : updates type to display from Twitter : User, Friends or Public (default : User)
- NumberOfStatuses (optionnal) : number of updates to display (default : 20, which is the maximum recommended by Twitter)
The lines I personally edited is around line 141.
The old code was:
1: string innerText = status["text"].InnerText;
The New code I inserted is:
1: string innerText = "\"" + status["text"].InnerText + "\"" + "<br />"
+ "<a href='http://twitter.com/" + status["user"]["screen_name"].InnerText + "/statuses/"
+ status["id"].InnerText + "/'>";
2: string TwitterTime = status["created_at"].InnerText;
3: string[] TimeValues = TwitterTime.Split(' '); 4: TwitterTime = TimeValues[1] + " " + TimeValues[2] + " "
+ TimeValues[5] + " " + TimeValues[3] + " GMT";
5: DateTime dt = Convert.ToDateTime(TwitterTime);
6: innerText += GetRelativeDate(dt);
7: innerText += "</a>";
I also inserted a new method that allows for the relative time to be found.
1: /// <summary>
2: /// gets the relevant time of the current twitter user.
3: /// </summary>
4: /// <param name="date"></param>
5: /// <returns></returns>
6: private String GetRelativeDate(DateTime date)
7: { 8: DateTime now = DateTime.Now;
9: TimeSpan span = now - date;
10: if (span <= TimeSpan.FromSeconds(60))
11: { 12: return span.Seconds + " seconds ago";
13: }
14: else if (span <= TimeSpan.FromMinutes(60))
15: { 16: if (span.Minutes > 1)
17: { 18: return "about " + span.Minutes + " minutes ago";
19: }
20: else
21: { 22: return "about a minute ago";
23: }
24: }
25: else if (span <= TimeSpan.FromHours(24))
26: { 27: if (span.Hours > 1)
28: { 29: return "about " + span.Hours + " hours ago";
30: }
31: else
32: { 33: return "about an hour ago";
34: }
35: }
36: else
37: { 38: if (span.Days > 1)
39: { 40: return "about " + span.Days + "days ago";
41: }
42: else
43: { 44: return "about a day ago";
45: }
46: }
47: }
I hope you like it as much as I do. By the way, did I tell you its written all in ASP.NET and C#. There's another fine example of a GREAT language!