Sign in
|
Join
|
Help
Pavel's Blog
Pavel is a software guy that is interested in almost everything
software related... way too much for too little time
Home
Contact
About
RSS
Atom
Comments RSS
Go
Tags
.NET
.NET 4
.NET 4.0
.NET 4.5
.NET2
64 bit
AI
AJAX
Algorithms
ASP.NET
Audio
Azure
BUILD
C#
C# 3.0
C# 4.0
C# 5.0
C++
C++/CX
C++0X
C++11
CLR
CLR Explorer
COM
COM Apartments
Console
courses
D&D
Debugging
DEV
Developer Academy 3
Device Drivers
DirectCompute
DirectX
food
Fun
Games
Graphics
Intel
Intellisense
Internals
Interop
ITPRO
LINQ
LINQ to XML
Mathematics
Media Foundation
MEF
Memory Map Viewer
Metro
MFC
Multithreading
Native API
Native Development
NLP
Numerics
OFFTOPIC
OpenDay
PARSING
PDC2008
ReSharper
Robotics
Roslyn
Silverlight
Silverlight 2
Task Parallel Library
TECH
teched
teched_il
TechEd2010
TechedIsrael2008
thoughts
Threading
Tips
Tutorial
video
Vista
Visual Basic
Visual C++
Visual Studio
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2012
WebTech
Win32
WinDbg
Windows 8
Windows Devices User Group
Windows Phone
Windows Phone 8
Windows Phone User Group
Windows Platfrom User Group
Windows Runtime
Windows7
WPF
XAML
XNA
מכללת הי-טק
Archives
May 2013 (2)
April 2013 (2)
March 2013 (3)
February 2013 (2)
January 2013 (2)
December 2012 (3)
November 2012 (3)
October 2012 (5)
September 2012 (6)
August 2012 (4)
July 2012 (2)
June 2012 (4)
May 2012 (5)
April 2012 (4)
March 2012 (7)
February 2012 (7)
January 2012 (6)
December 2011 (6)
November 2011 (5)
October 2011 (5)
September 2011 (5)
August 2011 (5)
July 2011 (3)
June 2011 (3)
May 2011 (3)
April 2011 (3)
March 2011 (8)
February 2011 (4)
January 2011 (5)
December 2010 (5)
November 2010 (13)
October 2010 (4)
September 2010 (5)
August 2010 (7)
July 2010 (1)
June 2010 (3)
May 2010 (4)
April 2010 (1)
March 2010 (2)
February 2010 (2)
January 2010 (3)
December 2009 (1)
November 2009 (4)
October 2009 (5)
September 2009 (3)
August 2009 (1)
July 2009 (4)
June 2009 (3)
May 2009 (2)
April 2009 (3)
March 2009 (2)
February 2009 (5)
January 2009 (3)
December 2008 (2)
November 2008 (4)
October 2008 (7)
September 2008 (6)
August 2008 (5)
July 2008 (6)
June 2008 (3)
May 2008 (5)
April 2008 (2)
March 2008 (9)
February 2008 (4)
January 2008 (9)
December 2007 (6)
Navigation
Home
All Posts
RSS
Popular Tags
Browse by Tags
All Tags
»
Fun
(
RSS
)
.NET
.NET 4
64 bit
Algorithms
Android
Audio
Azure
BigInteger
C#
C# 3.0
C# 4.0
C# 5.0
C++
COM
DEV
food
Games
Graphics
Internals
Interop
LINQ
LINQ to XML
Mathematics
MS Agent
Native Development
Numerics
OFFTOPIC
PARSING
Roslyn
Silverlight
TECH
thoughts
Tutorial
Visual Studio 2010
Visual Studio 2012
VS 2010
Windows Phone
Windows Platfrom User Group
WPF
XAML
XNA
מכללת הי-טק
C# Extension Methods and Fluent Interfaces
07 February 13 03:42 AM
|
pavely
|
1 comment(s)
The idea of fluent interfaces is not new, and has many forms. The basic idea is to use a single statement to encompass a series of operations that are natural, or at least simple, to use. There are very few fluent interfaces in .NET – the most well known, which has some fluent interface semantics, is the System.Text.StringBuilder class. Here’s a simple example: public static string BuildInfo(Process process) { return new StringBuilder( "Process " ) .AppendLine(process.ProcessName) .Append...
Windows Phone 8 is soon upon us (and MS Israel hands out 7.5 phones)
09 September 12 09:30 PM
|
pavely
| with
no comments
(this is not my typical technical post, but it’s nice to have something different for a change) A few days ago Microsoft and Nokia held a press conference in New York, in which Nokia presented two new phone devices running Windows Phone 8 : The Lumia 820 and the Lumia 920 . This announcement made a short while after Samsung announced its first WP8 device, the ATIV S . You can watch the press conference video here . The 920 sure looks impressive in style and functionality. Windows Phone 8 is expected...
Windows Phone: Playing Sound Effects
03 September 12 01:25 PM
|
pavely
| with
no comments
I wanted to create a simple timer application for Windows Phone . The timer would count backwards from a user configured value and when it reached zero, it would play some sound effect to indicate expiration. Sounds simple enough… This is how the application looks like: The problem turned out to be playing that sound effect. I had a WAV file I wanted to play. Silverlight has a MediaElement object that is capable of playing video and/or audio, so it seemed to be a good candidate for the job. MediaElement...
Console Calculator with Roslyn (Part 2)
08 August 12 02:39 PM
|
pavely
| with
no comments
In the first part we created a simple enough calculator, but it lacked two features I wanted to have: 1. work with degrees or radians in trigonometric functions. 2. allow simple variables to be used without first declaring them. Let’s see how we can implement these features, starting with the first. Trigonometric functions work in radians, which is sometimes inconvenient.What we need is a way to change the parameter to the trigonometric functions by multiplying it by PI/180 if degrees was requested...
Towers of Hanoi–WPF Style (Part 2)
13 February 12 10:45 PM
|
pavely
| with
no comments
In the first part , we saw how to recursively solve the Towers of Hanoi problem in C#. In this post I want to show a graphic view of the solution. This is a starting position with 7 discs: This is how it looks when the problem is solved: In between, the discs move with animation from pole to pole, as the solution dictates. Options include speeding up the process (with the slider, very useful), pausing the animation and resetting to the initial state. Here’s something in the middle: The Poles The...
Towers of Hanoi–WPF Style (part 1)
11 February 12 10:43 PM
|
pavely
|
3 comment(s)
I remember many years ago (at least 15), I was learning Prolog . I used the “Turbo Prolog” package from (what was once) Borland. One of the nice examples there was a solution of the Towers of Hanoi , with a simple animation that showed the steps graphically. This was all textual graphics (today’s Console windows), but it was impressive (at least it impressed me). Prolog was used to show off its AI capabilities, which are, in fact, a recursive, backtracking engine. No matter; we can do it in C#. Towers...
A New Android Game in Town (by my brother)
05 February 12 10:36 PM
|
pavely
|
4 comment(s)
Anyone who has ever written a game knows it’s hard to get it done from start to finish. Sure, I can put on a demo of some game I’ve created in several hours. But creating all the graphics, sound, animation, levels, transitions, scoring, etc, from start to finish is quite a challenge, especially for a single developer. That’s why I’m very proud of my young brother, Yaniv , that has worked hard for the past 10 months (while maintaining a proper day job!) on an awesome fun game called Micro Wars , targeted...
Calculating PI in .NET
30 December 11 10:31 PM
|
pavely
|
2 comment(s)
I always loved mathematics. Although I’m certainly not a mathematician by profession, I’m always intrigued and inspired by math’s pureness and cleverness. One of the simplest and fascinating aspects of math is the number PI . Described simply as the ratio of a circle’s circumference to its diameter, it’s a constant with infinite digits after the decimal point and most importantly, non repeating (at least as far as I know). There are many ways to calculate PI, as evident within the PI Wikipedia link...
Windows Phone: Combining Silverlight & XNA in a Single Page
26 October 11 09:30 PM
|
pavely
|
2 comment(s)
There are two very distinct ways to program on Windows Phone 7.x: Silverlight & XNA. Silverlight is about UI, retained graphics and is event driven. XNA is about immediate mode graphics, based on a timer and polling; Very different models indeed. Each has its strengths and weaknesses. One of the new features in WP7.1 (“mango”) is the ability to combine the two to get the best of both worlds. Here’s a typical scenario where this need may come up: suppose you’re developing an XNA game (2D or 3D...
Porting an XNA game from Windows to Windows Phone (Part 2)
14 August 11 03:40 PM
|
pavely
|
2 comment(s)
In the first part we got our introduction screen up and running, with the starfield scrolling by. However, we couldn’t actually start playing because the game was waiting for a key press… which is nowhere to be found on a Windows Phone device. We simply need a little touch. Adding Touch Support Touch is something the XNA version of Windows and XBOX 360 have no notion of. This is specific for Windows Phone. Touch input information is available as “raw” data (touch points, with positions, etc.) and...
Porting an XNA game from Windows to Windows Phone (Part 1)
08 August 11 09:58 PM
|
pavely
|
2 comment(s)
XNA is one of the two APIs that’s supported on Windows Phone 7 (the other being Silverlight), so a natural thing to do is to port an already existing XNA game (running on Windows or XBOX 360) to the new Windows Phone 7 platform. I wanted to see how easy (or maybe not so easy) it would be to do the actual porting. My starting point is a relatively simple 2D game, the one developed throughout the XNA 2D tutorial I did a some months back. We’ll start with the final game project (discussed in the last...
Technology Radio Show, Part 2
21 March 11 10:03 AM
|
pavely
|
3 comment(s)
The second part of the technology radio show on 106.4 FM aired on last Thursday. As with the first part , I was the “Microsoft guy”. This time we were missing the iPhone and Ruby guys, but the show was more to the point (somewhat). You can listen to the recording (if you’re kinda really really bored) here (look for the March 17 show).
Technology Radio show that I participated in
02 March 11 08:40 PM
|
pavely
|
2 comment(s)
Last week I was invited to a radio show called “Technofobia” (origin in Hebrew) in the Interdisciplinary Center (IDC) in Hertzliya (Israel) (106.4 FM). This was a “special” talk about development technologies. There was a Ruby guy, a Python guy, a C++ guy (actually a girl), an iPhone guy (the famous Yossi Taguri ) and myself, as the “Microsoft guy”. I had to repeatedly (and during the music breaks) tell the hosts that I don’t work at Microsoft, I just use, teach, mostly like and develop with those...
COM Fun with Microsoft Agent
25 February 11 03:44 PM
|
pavely
|
1 comment(s)
Whenever I teach COM interoperability in .NET, I try to show some nice demo for this. The classic is to use one of the Office applications (such as Word) to do some automation by creating a document, adding some text, etc. This is effective enough but not really fun. A much more fun way is to use the Microsoft Agent technology. MS Agent is discontinued as far as further development is concerned, but it’s still fun and great for (at least) learning purposes. What is MS Agent? Its most well known appearance...
XNA 2D Game Tutorial (Part 14–Last)
31 December 10 06:54 PM
|
pavely
|
9 comment(s)
Previous posts in this series: Part 1 : Getting started Part 2 : Drawing something Part 3 : Input handling Part 4 : Game Components Part 5 : Animation and Sprites Part 6 : Handling Projectiles Part 7 : Sound Effects Part 8 : Setting Up Data Part 9 : Creating Aliens Part 10 : Collision Detection Part 11 : More Collisions Part 12 : Displaying Text Part 13 : Game States Over the past posts, we’ve created a game. A simple game, for sure, but the objective was learning XNA, not creating the greatest game...
More Posts
Next page »