₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,086 members, 8,429,297 topics. Date: Thursday, 18 June 2026 at 05:00 PM

Toggle theme

Mkwayisi's Posts

Nairaland ForumMkwayisi's ProfileMkwayisi's Posts

1 2 3 (of 3 pages)

ProgrammingRe: Which Is Better And Why by mkwayisi: 10:42pm On Oct 10, 2012
Windows CE?
Yes. It's an OS for embedded systems.
Are we in 2005?
No, we're in 2012 -- the year after MS released the latest stable version of WinCE (newer than Win7).
I don't understand what you mean as "Desktop"
Perhaps you might want to look up "Mobile" and "Web" first.
A desktop app is .exe
No. For example, a Java SE program can be termed as a desktop application, however it's apparently not .exe.
PS: Just in case you care to know, Windows Phone is built on top of WinCE! And please, don't derail threads just because you feel like doing so.
ProgrammingRe: How To Become An Embedded Software Developer by mkwayisi: 12:04pm On Oct 10, 2012
Sorry, I don't mean to be pedantic, but saying C seems to be the language of choice for majority of embedded software development is completely misleading. Even the very core of all mainstream operating systems developed for modern PCs are written in ASM, let alone a device that has few system resources. No one will take his/her chances with the output that the compiler will generate, even though they're getting more intelligent... unless you're writing a hello world program. That doesn't mean C is never used in embedded systems, but the point is you cannot become an *embedded geek* without knowing assembler.
ProgrammingRe: How To Become An Embedded Software Developer by mkwayisi: 10:52pm On Oct 09, 2012
@harryobas You're sure you don't want to mention assembly language? EEK!
ProgrammingRe: Which Is Better And Why by mkwayisi: 10:47pm On Oct 09, 2012
I'm gonna stick my neck out and say VB.NET + SQL Server is better than PHP + MySQL. Reason?
VB.NET/MSSQL combo gives you desktop (Windows), web (IIS), and even mobile (Windows CE) deployment options.
PHP + MySQL = Web! Wait... unless you want to do some really obscure ungodly deeds.
DISCLAIMER: Despite the given opinion above, I do not recommend it!
ProgrammingRe: Can I Call Myself A Good Programmer If I Only Know Visual Basic by mkwayisi: 10:38pm On Oct 07, 2012
Absolutely! Because programming is not at all about languages, rather the skill -- more like data structures. Nevertheless, I'm yet to come across a "good" programmer who ONLY knows Visual Basic. But that doesn't mean you cannot be an exception. In spite of everything, you know what they say about Visual Basic and *brain corruption*? I guess I'mma write an article on that... someday ;-)
ProgrammingRe: Help I Need C Compiler by mkwayisi: 10:25am On Oct 06, 2012
@mj I thought the guy wanted a compiler, not an IDE wink
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mkwayisi: 9:29am On Oct 06, 2012
Manus17: Kindly send it to my email too 'usmankasim22kasim22@gmail.com
I posted a link to download above.
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mkwayisi: 8:03am On Oct 04, 2012
mashnino: This is not JAVA G.U.I...

You are just goofing around JOptionPane and all...

but you tried sha...

this is a simple calculator...and from what i can see it only works with one parameter..
Are you referring to mine. I guess not ;-)
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mkwayisi:
OK, so I've uploaded it online: EasyCalc: A GUI Java scientific calculator
ProgrammingRe: JAVA Joke by mkwayisi: 12:42pm On Oct 01, 2012
Who needs console when there is GUI?
Who needs CVS when there is SVN?
Who needs Java when there is C#?
-- You!
ProgrammingRe: Programming Challenge by mkwayisi: 10:02pm On Sep 29, 2012
jacob05: Final fix done {still 2 lines == 2 semi colon wink} http://pastebin.com/nKsEq9tN
The fun don finish ;-)
ProgrammingRe: Another Programming Challenge by mkwayisi: 5:32pm On Sep 29, 2012
@lordZouga: Once will never be enough unless you're coming up with a breakthrough algorithm. Let me ask, have you tried implementing what you're thinking? If not try it!
ProgrammingRe: Another Programming Challenge by mkwayisi:
₱®ÌИСΞ:
Done in Java
http://pastebin.com/znMpn3TH

Pass the file path as d only arguement

Java fileClass.java c:/file.txt
With your implementation, you did not eliminate the possibility of the same number being generated multiple times. So if your random numbers generated are say {1, 1, 2, 2, 3}, you'd end up displaying same lines multiple times as well.
ProgrammingRe: Another Programming Challenge by mkwayisi:
My definition of "random":
Suppose you are to select 3 random numbers from set P, where P = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
R = {2, 5, 9} is *more* random logically (but certainly not academically) than R = {1, 2, 3}
ProgrammingRe: Another Programming Challenge by mkwayisi: 9:48pm On Sep 28, 2012
ekt_bear: I think your algorithm works, mkwayisi. However, the splitting the lines into groups stuff is not something I mentioned...but can of course be corrected pretty easily.
I introduced it just to make the result *more* random wink
ProgrammingRe: Which I.T Related Course Could One Do Under 9 Weeks? by mkwayisi: 9:40pm On Sep 28, 2012
Miraculous reply: ANY!
ProgrammingRe: Another Programming Challenge by mkwayisi: 9:38pm On Sep 28, 2012
Javanian: ok, then i will seat back and wait for a solution grin
And there you have it... implemented in C#

using System;
using System.IO;

public class Program
{
public static void Main()
{
string fileName = "file.txt"; // Name of file to read
int linesToRead = 5; // Number of random lines read

Random random = new Random();
int totalLines = 0;
int[] groups = new int[linesToRead];
string[] randomLines = new string[linesToRead];
StreamReader sr = null;

// Count the number of lines in the file. (Hint: I hate exceptions!)
try { sr = new StreamReader(fileName); }
catch (Exception e) { Console.WriteLine(e.Message); return; }
while (!sr.EndOfStream) {
sr.ReadLine();
totalLines++;
}

// "You don high?" -- Javanian
if (linesToRead > totalLines) {
Console.WriteLine("Can't dash me {0} naira when you have only {1} wink",
linesToRead, totalLines);
goto end; // The more they hate you, the more I love you!
}

// Split the lines into groups so we will pick one random line from each.
// This will make the result set more semantically random.
for (; linesToRead > 0; linesToRead--) {
groups[linesToRead - 1] = totalLines / linesToRead;
totalLines -= groups[linesToRead - 1];
}

// Randomly select the line number to read from each group.
for (int i = 0, min = 0, max = 0; i < groups.Length; min = max, i++)
groups[i] = random.Next(min, max += groups[i]);

// With the line numbers to read set, now read them!
sr.BaseStream.Position = 0;
for (int i = 0, line = 0; !sr.EndOfStream; line++)
if (groups[i] == line) {
randomLines[i++] = sr.ReadLine();
if (i == groups.Length)
break;
} else sr.ReadLine();

// Prove to the agnostic that this algorithm works wink
for (int i = 0; i < randomLines.Length; i++)
Console.WriteLine("Random Line {0}: {1}", i + 1, randomLines[i]);

end:
sr.Close();
}
}
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mkwayisi: 4:14pm On Sep 26, 2012
PM me your email address so I can send it over to you.
ProgrammingRe: Programming Challenge by mkwayisi:
@lordZouga: Did you just call the C code "sleazy"? Well, guess what? You ain't seen "sleazy" yet!
Perl. 1 line. 71 total characters. BTW, I don't call this "sleazy", rather "nifty". Got it?
$c{$_}++for(split/ */,lc$ARGV[0]);print$c{$_}||'No'," $_\'s\n"for(a..z)
To test it, pass the sentence as an argument to the script. Eg:
$> perl test.pl "The Quick Brown Fox Jumps Over The Lazy Dog"
Write any shorter and I can't compete!
ProgrammingRe: Programming Challenge by mkwayisi: 3:14am On Sep 26, 2012
Well this is getting interesting. I have my code too in C on a single line. Now don't tell me about readability, you asked for it wink Perhaps you can write a shorter one with no lines at all wink
int main(int i,char**v){if(i>1){int c[26];char *p=v[1];for(i=0;i<26winkc[i++]=0;while(*p!='\0'){if(*p>=97&&*p<=122)*p-=32;if(*p>=65&&*p<=90)c[*p-65]++;p++;}for(i=0;i<26;i++)if(c[i]>0)printf("%cs=%d\n",i+65,c[i]);}return 0;}

After compiling, launch the exe passing the sentence as an argument. A screenshot is shown below.

ProgrammingRe: Help, In Choosing A Tangible And Successful Career. by mkwayisi: 7:52pm On Sep 20, 2012
Advice 101: Stop *leetspeaking* and learn functional English. Many people see themselves cool writing the way you do, but for me, it's just the exact opposite. Hope this does you *loads of good* ;-)
Tech JobsRe: I Need A Good Software Programmer by mkwayisi: 7:41pm On Sep 20, 2012
I'm pretty sure your idea is not something that no one has never thought of before (unless you are building a post-PC product). So what makes you think that a *good developer* can't discuss your idea and build it himself, alone, afterwards (I'm looking at Mark Zuckerberg). So, to have a really *good developer* to work with, you need to be more than just an *ideas man*, which you failed to mention in your post. Afterall, all good devs already have jobs, be it paying or otherwise.
Tech JobsRe: I Need A Good Software Programmer by mkwayisi: 1:17am On Sep 20, 2012
Just wanted to let you know there's no such thing as "Software Programmer". It's either a software developer or computer programmer because we don't program software (perhaps, they do that outside the Matrix).
ProgrammingRe: How To Create A Simple Calculator Using Java Programing Language GUI by mkwayisi: 4:06pm On Sep 14, 2012
That's exactly the kinda program I'm going to write this weekend. But mine is a bit more advanced (standard and scientific modes with hex, dec, oct and bin conversions. Cool!). I'd send you the source if you want it.
ProgrammingRe: There Is More To Software Development Than Programming by mkwayisi: 5:10pm On Sep 07, 2012
@naija_swag: I'm tempted to ask "What the heck is 'topcoder'?", but I'm gonna google it!
ProgrammingRe: Program With C# Is There Any Expert In The House! by mkwayisi: 9:41pm On Aug 30, 2012
@Javanian: You can't say that. Perhaps, he's a grandchild of Einstein wink Anyway, "sophisticated" is relative -- depends on who's telling it.
ProgrammingRe: Should I Go 4 Oracle or software engineering by mkwayisi: 8:46pm On Aug 23, 2012
Go for Oracle, straight up! It's easier to become a software engineer than an Oracle DBA. That's my opinion though.
ProgrammingRe: Desktop Application Vs Web Application by mkwayisi: 8:38pm On Aug 23, 2012
I can say with all certainty that legacy applications like Visual Studio, Photoshop, etc. shall never be functionally dependent upon the web -- just like tablets and/or mobile will never replace PCs. We may see more web apps, but desktop apps shall live still. Cloud computing is the future not the web. Imagine playing PES 2012 in Firefox :-D
ProgrammingRe: Ms SQL Server 2008 Administration by mkwayisi: 12:46pm On Jun 13, 2012
You will learn it best in school where you'd be tutored by an experienced instructor. Don't fool yourself with some 200-page PDF and think you're good -- many devs are like that. Over the years, I've come to agree that "theory" (science) is equally important as "application" (technology).

1 2 3 (of 3 pages)