Geeks With Blogs

News View Steve Michelotti's profile on LinkedIn


Post Categories

Mark Pearl July 2010 Entries
What happened to Community Credit

 

I noticed recently that I have stopped receiving community credit emails whenever I post a new blog. I just wanted to know with any other geekwithblogs bloggers if there is some setting that has changed in the last month or so to cause this?

Anyone else experienced this, or am I special?

Posted On Saturday, July 31, 2010 10:40 AM

F# – 5 Best practices (Practice 4)
“prefer active patterns over multiple when guards” In line with my previous posts on 5 best practices for F# from Daniel Mohl’s slideshow, over the last few days I have been learning about active patterns. The exact best practice is to prefer active patterns over multiple “when” guards during pattern matching and in this post I am going to try and compare the two techniques and then also explain some of the basics of active patterns and why it is called active. Now before I go any further, let me ......

Posted On Saturday, July 31, 2010 8:29 AM

F# - Euler Problem 9
Another day flown by… another Euler problem to tease me… today I attempted problem 9. The Problem A Pythagorean triplet is a set of three natural numbers, a < b < c, for which a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 +16 = 25 = 5^2. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. The Solution Initially I thought I would try and tackle this problem by setting up 3DArrays in F#, thus my question on StackOverflow regarding 2D Array. However, if ......

Posted On Tuesday, July 27, 2010 5:20 PM

Structured Systems Analysis & Design UNISA studies – Chap 1
Any ramblings and blog posts associated with the UNISA ICT 2621 tag should be considered study notes for my lectures... Objectives of Chapter 1 Explain the key role of a system analyst in business. Describe the various types of system and technology an analyst might use. Explain the importance of technical skills, people skills and business skills for an analyst. Explain why ethical behaviour is crucial for a system analyst’s career. Describe various job titles in the field and places of employment ......

Posted On Tuesday, July 27, 2010 9:18 AM

Programming Contemporary Concepts UNISA studies – Chap 5
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... In this chapter they discuss the essentials of function declarations, prototypes, and signatures; overloading functions; function call resolution; default/optional arguments; temporary variables and when they’re created; reference parameters and return values; and inline functions… Function Declarations Each function has… A name A return type (which may be void) A parameter list ......

Posted On Saturday, July 24, 2010 2:31 PM

F# – Euler Problem 8
Today I had some more spare time to give Euler a go and thought I would try my luck on problem 8. The Problem Find the greatest product of five consecutive digits in the 1000-digit number. 731671765313306249192251196... 969835203127745063262395783... 858615607891129494954595017... 125406987471585238630507156... 668966489504452445231617318... 622298934233803081353362766... 303589072962904915604407723... ......

Posted On Saturday, July 24, 2010 8:34 AM

F# – 5 Best practices for F# (Practice 3)
In line with Daniel Mohl’s presentation, the third best practice for F# is Tail Recursive Functions. I must admit, while I did go over recursion several years ago, I never heard (or possibly ignored) any mention of tail recursive functions… so what exactly is a tail recursive function? I posed the question on Stack Overflow and got some great examples and responses… Possibly the best explanation came from a post done by Chris Smith entitled Understanding Tail Recursion. Basically, non tail recursive ......

Posted On Monday, July 19, 2010 7:37 PM

Programming Contemporary Concepts UNISA studies – Chap 4
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... Lists – whenever possible we use lists in favour of arrays. This chapter explains ways of grouping things together in lists and how to iterate through them. Introduction to Containers There are many occasions when it is necessary to deal with collections of things. The beginners approach is to use arrays, however in c++ arrays have several negative side effects that make them not ......

Posted On Saturday, July 17, 2010 6:01 PM

Programming Contemporary Concepts UNISA studies – Chap 3
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... This chapter introduces the QT development environment, including the compiler, linker, make, and qmake. It includes a first example using Qt, and introduces iterators and lists. The chapter itself was fairly short – it mainly covered a basic equivalent to “hello world” and how to build projects. One section that I did find interesting was the section on the #include #Includes – ......

Posted On Saturday, July 17, 2010 5:35 PM

Silverlight Service Basics on Shared Hosting – my first service end to end…
So today I finally got around to playing a bit more with Silverlight. F# has been taking most of my spare time and I felt I needed to branch out into something different for a day or two… Now, before I go into this post… my disclaimer… I am a Silverlight noob – in fact I have focussed most of my development time at normal applications so the whole internet is a bit of a mystery to me… that being said I had some very definite goals for this posting… Setup my server so that it would work with the services ......

Posted On Saturday, July 17, 2010 9:32 AM

F# - Euler Problem 7
These last few days I attempted Euler Problem 7. It has been an interesting experience since it is the first real Euler problem that I initially attempted to tackle recursion for a solution but eventually bypassed as I found what I considered a simpler way to solve the problem. In addition to recursion, it was also interesting to see performance issues occur, and how a better understanding of what some of the Seq functions does can dramatically effect the over all performance of the solution. The ......

Posted On Wednesday, July 14, 2010 5:15 PM

Programming Contemporary Concepts UNISA studies - Chap 2
Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... Chapter 2 This chapter covered an Introduction to classes and objects, and How member functions operate on objects. UML is introduced. Static and const members are explained. Constructors, destructors, copy operations, and Friends are discussed. Class Definitions Section 2.1 & 2.2 briefly covered structs and classes. While these are age old… in case I ever forget. A struct takes ......

Posted On Saturday, July 10, 2010 8:13 PM

F# – 5 Best practices for F# (Practice 1)
Daniel Mohl put up a great slide presentation on the 5 best practices for F#. Since I am new to the language I thought I would go through each practice and explore it a bit as separate posts. Best Practice 1 – Prefer Short Functions with only one primary responsibility As Daniel points out, functions that follow this practice enable single responsibility pattern (SRP). function composition I must admit that up to this point, I have never really looked formally at what the SRP or Function Composition ......

Posted On Saturday, July 10, 2010 4:31 PM

Today I hit 1000 points on Stack Overflow
Yes… it took me a lot longer than I originally thought it would, but today I hit 1000 points on Stack Overflow. How did I reach this milestone ;-) Well, initially I started visiting Stack Overflow with the intention of answering as many questions as possible and getting recognized as the answer guru. I soon discovered that there are many people out there that know a lot more than I do, and can type a lot quicker than I can. So I gave that up and, and have only really been using S/O as a resource ......

Posted On Wednesday, July 7, 2010 8:22 AM

F# – Depressingly simple text file access
Today I was doing some work work and kept having to parse a log file. After a few hours of doing the same routine stuff I thought I might try and automate it using F#. It was depressingly simple to achieve… Example Extract of Text File *ERROR* : Drawing num {^BASE^2 }783, surface num 1 uses invalid real colour number 2 _warning_ : The base file has 171 DLT types, the main file has 126. _warning_ : AutoPlan error: There are no base corner units with autoplan 30 (see theme *ERROR* : Drawing num {^BASE^2 ......

Posted On Tuesday, July 6, 2010 9:32 PM

32 Most Important Algorithms

 

Today I saw this blog post outlining what the blogger felt were the most important algorithms..

worth a read…

Posted On Tuesday, July 6, 2010 3:30 PM

Programming Contemporary Concepts UNISA studies begin – Chap 1
Today I thought I would start the second semester of my UNISA studies, and after some psyching up I eventually pulled out the study guidelines and made a study schedule. By chance my Contemporary Concepts course is due first, thus this post. Any ramblings and blog posts associated with the UNISA COS 2144 tag should be considered study notes for my lectures... Chapter 1 Chapter 1 consists of 14 subsections, 9 of which are language applicable, and the other 5 possibly ramblings to fill material. The ......

Posted On Saturday, July 3, 2010 5:11 PM

ACM South Africa

 

Today I stumbled across the ACM international collegiate programming contest for South Africa website. It looked like it had some interesting programming problems so it may be a useful reference of anyone wishing to pit their luck against university level CS problems.

Posted On Saturday, July 3, 2010 3:14 PM

F# – order of code execution, values & functions again…
I had the following code snippet… #light open System let ExeC = printfn "c" 3 let ExeB b = printfn "b" 2 let ExeA = printfn "a" 1 printfn "Example %d " ExeA printfn "Example %d " (ExeB 1) printfn "Example %d " ExeC Console.ReadLine() With the output as follows… c a Example 1 b Example 2 Example 3 Initially the execution of the code seemed unusual… up to now I would have expected ExeC, ExeB & ExeA to all be functions, but a previous comment from Brian indicated that there was a difference. StackOverflow ......

Posted On Saturday, July 3, 2010 12:33 PM

F# You are sooooaaa lazy! (and program execution order)
So I have mentioned lazy functions before, in particular related to sequences, however I came across it again – but this time with lazy values and thought I would explore it a little bit more… I used the following code snippet… #light open System let lHelloWorld = lazy(printfn "Lazy Hello World"; 30+30) let aHelloWorld = (printfn "Active Hello World"; 30+30) printfn "lazy value is %d" lHelloWorld.Value printfn "lazy value is %d" lHelloWorld.Value printfn "active value is %d" aHelloWorld printfn "active ......

Posted On Saturday, July 3, 2010 9:01 AM

F# int |> bigint
I had a bit of a no brainer yesterday… I have been using the forward pipe to convert values, and came up against the problem where the following code would work let IntToFloat = 10 |> float let FloatToInt = 10.0 |> int But the equivalent bigint code would not work… let FloatToBigint = 10.0 |> bigint It was only after a few hours of reading up on type casting in F# and getting totally confused that I finally resulted to Stack Overflow. The answer was humbling… The reason why FloatToBignint ......

Posted On Thursday, July 1, 2010 5:44 PM

Copyright © MarkPearl | Powered by: GeeksWithBlogs.net | Join free