WhiZTiM's Posts
Nairaland Forum › WhiZTiM's Profile › WhiZTiM's Posts
1 2 3 4 5 6 7 8 ... 10 11 12 13 14 15 16 17 18 (of 18 pages)
You will need solid knowledge of maths as you ascend up the ladder... Your roadmap will be: **logic and basic algorithm is okkay... **Optimization or Minimization algorithms **Graph algorithms **Numerical and Discrete algorithms **Discretization algorithms **Advanced algorithms from numerous research theses... though, for programming in a business discipline, all these aren't needed... but for a real-life engineering discipline, You Need all!! |
my solution is uploaded on PasteBin... http://pastebin.com/r3cMG9sM ...Well there are [size=24pt]3 ways I know we could solve this[/size]. 1. Procedural/functional ...like my implementation 2. Object Oriented 3. Mathematically. 1 You may have to be interested in Python to understand my code...(70lines uncommented, 122 lines commented) I was contemplating doing it in C++ or C# but thought it would be better in a lazy/weak typed language. **Ohkayy, I wouldnt talk on this cause all I would have said is represented VERY well in my Code 2 OOP: this would be similar to number 1... but in this case, all items can be treated as objects by wrapping them in light weighted classes.. ---These objects should be aware of their relative positions in the coordinate ---These objects should contain a boolean property that signifies whether its been used or not ---An abstract object or pointer can be used to transverse through the instantiated objects.. ---there should exist a simple (up, down, left, right) traveller function that will persistently travel in one direction until it reaches a limit or an object that has been taken... in this case, it changes direction in a preferential manner... ---this continues in spiral direction until there is no more object to transverse ---THIS CAN ALSO be DONE RECURSIVELY ...easier 3 MATHEMATICALLY: ...while I took a paper and was manually transversing through square matrices of diferent sizes... I realized that there exist this property of perfect squares:... ::: a summation of odd number sequences starting from 1 to n is equal to n^2. PROOF: if n = 3 1 + 3 + 5 = 9 if n = 5... 1 + 3 + 5 + 7 + 9 = 25 if n = 6 1 + 3 + 5 + 7 + 9 + 11 = 36 you can test for other cases ...now, assume a 5x5 grid.. A B C D E F G H I J K L M N O P Q R S T U V W X Y using n as 5, we have the following sequence... (1 + 3 + 5 + 7 + 9)... reversing it, we have (9, 7, 5, 3, 1)... the first L shape is of 9 elements... that is ... (A, B, C, D, E, J, O, T, Y)... the next L shape is of 7 elements... that is ... (X, W, V, U, P, K, F).... the next L shape is of 5 elements... that is ... (G, H, I, N, S) the next L shape is of 3 elements... that is ... (R, Q, L) and finally the last is (M)... [size=16pt]now... are you thinking mathematically....??[/size] yeah.... so, I did leave this method as a challenge to someone to implement authurowen's problem with MATHEMATICAL algorithm or discrete NUMERICAL algorithm.... "~~~Many programmers are really good, what may differentiate them is complex and subtle mathematical knowledge and skills~~~" ---says A renowned ACM-ICPC judge in Int'l Collegiate of Programming Contest....( I wish I recall the name) NB: I am not a mathematician but a maths hobbyist... |
mkwayisi: Hey kids. What's with you and "OOP"? OK, being an old fart, I'd like to present a solution in C just in case anyone wishes to learn something from it. Here is a complete program to do the stuff:How on earth do you want most people including rookies to learn that code!! when you wrote it as if you were contesting in Codeforces, CodeJAM, TopCoder and/or ACM-ICPC..... Next time. . . . explain whats going on there!! Well, I just went through your code and test-ran it.... I understand your code... you should have intelligently determined the size of the array based on the first line input! . . . manual entry of each element is too kid-like . . .(based on your "Hey kids" .good one though. |
Here is my code in python, well commented; and with very good explanation for easy comprehension....
http://pastebin.com/r3cMG9sM |
authurowen: as much as you would like to think your solution is right (syntax wise may be yes), semanticaly no.ooops! My misunderstanding! I understand the problem now... Thanks for your clarification. I will put forward possible solutions after church. |
Wheres the challenge here?? Lemme assume there is more attached to this that I dunno.... and answer based on my understanding frankly, I would never solve this problem in an OOP fashion. Except I know why I should. in C++
In OOP:
//...I still Don't understand the aim of your question in OOP:::: Here is my very stupid logic: If you have a continuous stream of matrices being thrown into your system and as output, you need regular sorted matrix of specific time intervals: ....if you tweak the above OOP snippet, it should be applicable to parallel systems where a thread/process/system PP1 is responsible for taking matrix input continously; *passes it to the input buffers of another PP2, ...PP2 picks them from the buffers into a priority_queue (i.e sorted) ...after a few secs, another PP3 may request sorted data from PP2, then, PP2 pushes its queued data to PP3.... OOP will be better than procedural here... |
hahaha @sarutobi... funny examples... Though, the best way to build up algorithms to take care of cases like that is to use: Nearest Neighbor heuristics; and high collision probability LSH L(ocality-sensitive hashing).... Well, banned words system is either a lazy or a simple forum filtering system . . . for a revenue generating website like NL... How about banned words + phrases....?? Grammar and linguistic systems. . . start implementing primitive systems as such.... its hard but good for commercial stuff.... Seun has a lot of big data of comments on NL, we could build such Probabilistic filtering systems.... And make it learn the kind of grammar it should ban... from a set of comments with insults.... |
Cori_corde: God wants his children to dress well, befitting their status as children of the King of kings, that's why he told the Israelites to ask for gold jewelry and clothes before leaving Egypt.so intelligent... And it was with those gold jewelry they built an idol to worship!?? Clap for your self |
kreami diva: What u see as moral is moral and what u see as immoral is immoralbabe, please share with me a keg of that ogogoro you have been drinking... Cause I havent gotten this foolish in a long time! What rubbish!! |
theres no standard measure.... Its wrong to use typing speed as a measure of any major ranking... But.... It depends on language and... . . . I think its typically counted in WORKING Lines Of Source Code per day. Which is typically 1000 - 3000 lines for FULL TIME paid veterans. ....And 500+ for other FULL TIME paid Junior programmers. for me, my rough guess, based on the last ACM-ICPC South African Regionals I participated in.... 20 - 25 lines per minute when I am playing pseudocode (prototyping). 15 - 25 lines per minute when I am happy and know exactly what I am doing... on C++... 10 - 20 lines per minute on C#, Python, and php. 5 - 10 lines per minute when I am not so confident, especially with external APIs that I am not familiar with. 2 lines per minute when I have little or no idea of what I am doing. |
Well, I think I have some knowledge as regards OS architecture.. in my spare time, once in month, I spend a few hours to play around with a hobby and very simple OS, implementing in C on a MIPS simulator....(links at the end of this post) -------------------------------------------------- What you are asking is very possible but NOT so feasible... Let me assume you have some basic technical knowledge and try to be as simple as possible... and list a few reasons out of many... A few reasons are: *You need a team of systems programmers who have attained the skill set of Software Architects, and SEVERAL millions of Naira to implement a basic or the SIMPLEST of OS's for ANY device that outclasses scaler processors that you may know of ...because the processors and system architecture of modern devices are far far and I mean by FAR MORE COMPLEX than what may be taught at B.Sc or M.Sc level *You may not succeed in having all the Hardware data-sheets, schema, architecture-details of the tablet you want to customize... *Some parts of the device like Camera, microphone, etc, may rely on proprietary code or drivers to run it.(A driver is a realtime software that acts as a bridge between your operating system's kernel and the Hardware) YOUR OPTIONS I wouldn't recommend the Linux Core Kernel because its not exactly ready-to-go on Mobile devices... Android, Ubuntu Mobile and Chromium Operating systems have modified or tweaked Linux kernels that optimize for Power, Interrupt prioritizer for Touch-Input, sensors, etc. The SOURCE CODES of Android and Ubuntu Mobile Operating Systems are pretty good to go! Get the sources, learn a HELL lot of API's write a your Customized Software, integrate, compile, and wooo lala!!! ...this is still a bit expensive but its by far more feasible than trying to write from scratch. ---Evaluating the The Option I presented you: ~~assuming you have a solid knowledge of C or C++ programming. -----learing the relevant APIs to make core changes may take you 6 to 11 months. -----It would cost you N20,000 to millions of Naira ....worth of knowledge, internet, devices, and time(money) -----then writing such stable program to integrate may take 1 day to 5years++ depending on the complexity and manpower available. -----writing such program would still cost you a lot of money... (resource and time) THE DARE-DEVIL'S option <<--sometimes I get sooo discouraged because I have gone far but haven't implemented anything so useable... but still doing it!! Its not for a feeble mind. I have been spending more money than I am making on any ad-hoc or contracted programming project. Take a risk, take a leap... follow your passion. Don't let facts, other programmers or other veterans above my level discourage you, IF YOU TRUELY HAVE THE PASSION AND WILL! LINKS if you still wanna do something outside Linux or Unix ---OS DEV... read this before thinking far http://wiki.osdev.org/Getting_Started ---What I started with... http://wiki.osdev.org/C%2B%2B_Bare_Bones ---A simulator http://spimsimulator.sourceforge.net/ --materials, get via torrents...lol http://spimsimulator.sourceforge.net/further.html ---something better to avoid Assembly... https://sites.google.com/site/lccretargetablecompiler/ ~-~-~When you grow out of these, you can take a leap and try out real systems like the "RaspberryPI" ---Even as simple as my intent is, its NOT so EASY... OS development is crazy and unparalleled. ---I am doing it to ground my self to attain some skill set of a Systems Software-Architect in FEWER years... - - - - CHEERS - - - - Timothy |
Of recent. . . For easy search, uncomment, or deletion... Using regex I start and end my debug lines with a comment. Starting at #qaz and end with #wsx.. (look at your keyboard(US Layout)) |
I also recall, I once wanted to demonstrate a small text editor I wrote following a QtSDK example.... to my friends. I failed to compile it! I couldn't figure it out and they laughed... then the following day, it compiled! thats how I learned about ENVIRONMENT variables and profiles |
System trashing I wrote a small numerical program of large 2D double array with a high amount of iterations and had memory leaking at each iteration till it used up 80% of my 2GB RAM! I was surprised Windows didn't complain, it was instead paging other processes!!! |
Ohhkaay... A dot(member access) instead of a comma in a default argument function messes me up! ..C++ void func(tagger* t1, tagger* t2 = NULL) I passed a call func(ttt,tag) instead of func(ttt.tag) which should have been ttt->tag QtCreator converts . and -> appropriately... so I get lazy to using -> at times... Well, it compiled an kept giving me seg faults!! till I almost threw the library away... only to discover my mistake weeks later with a debugger (stack tracing)... |
Share your top blunders of any category.... Semantics? Syntax? Frustrating?? Funny? Lessons? or what, share it!! PS: make sure you give insight to have a good visualization of your blunder! |
₱®ÌИСΞ: lordZOUGA: I believe that was the main target of the projectI guess due to my subjective, complete and arrogant dislike for that crazy OS, ChromeOS...(I still don't fancy it)... I didn't even remember it existed. frankly... I never even thought of ChromeOS... before criticizing this based on the currently existing platforms... Since this wouldnt beat existing platforms for the next few years, I am totally convinced of that it is aimed at passively sidetracking developers into Powerful ChromeOS App os on the long run... or for the sake of pride, Chromium OS.. How clever...!! |
talk2hb1: Yes it is possible, but to get a competent hand that will develop it to your specification will cost a lot of money because they are mostly busy with a lot of projects....sharp business man ![]() |
simply_me: #include <iostream.h>good one... But err. . . Madam, printing an array of 32 ints when the user's input only initializes less than 32 of them will print garbaged or max int. Your code is a C styled code in C++... I discourage that. Why don't you use the string class... Feed the string, then use the string.size() to instantiate the array ...convert to ascii like you did ...and loop over the int array using the string.size() as boundary ? ? ...its much cleaver that way. ![]() ...btw, I feel humbled whenever I see a ....ehhmm... What was I saying again? ? .. ![]() |
well, I cannot categorically help you on that, but use these search terms on Google. They may help. "technology and the disabled" "technology assistance for disabled" "technology for the visually impaired" "hearing aid technology" "advances in technology for disabled" ...and similar stuff |
Oga kambo, please share with me that stick you just smoked cause I haven't gotten this high in a long time! ...this is ridiculous... ...ohkkay, on a more serious note, who should retire them? we should abandon these GREAT languages(C++, C# and Java) and adopt which?? |
My Output was:
|
This should help.... Your problem has inspired me to write a full tutorial on pointer to pointer stuff... I will post when I am done ...This is what I mean... Its more readable and maintainable on the long run
|
BBM and its likes have not proven itself advantageous for programmers, ...at least me... PS... I don't have a BlackBerry mrsmithkay: C, LISP AND ASSEMBLYyou must be a well paid and boring person.... ...Just kidding... No high level OOP or scripting language?? seriously, do you write Kernels ![]() |
first of all, sizeof operator returns the size of the pointer except in statically allocated array... (i.e no pointers copied and no callac, malloc, etc)!. Check http://en.wikipedia.org/wiki/Sizeof ... You need to keep track of the array.... What you are trying to do is flawed without you having an int array to keep track of memory bounds. Save yourself troubles and use some struct... And use them hierachically... Struct Page { . . .char *elements[] . . .int element_count } struct allpages { . . .Page *pages . . .int page_count } this is what you should do! I hope you get my point here... (i cant type much on my small phone) |
I think there a some good C# developers here... Java is a great language. Java also has so many and I mean so many developers... ..And somehow, I hate crowd.... |
with respect to Mathematics... As a beginer, you should know Simple Algebra! Including logarithm, indices, etc. Then...try to know some... simple geometry Basic number theory... Elementary Probability... Elementary set theory... Some simple numerical approach to some things... And start building up ohkay... |
thats wonderful. What happens to Adobe AIR? Microsoft Silverlight? Oracle's java? IMHO, I do not concur with native clients!! For 95% of any reasoning that I have, Its a VERY bad idea to write a largescale webApp in C. C++ is even better, but still a poor idea... In terms of what this idea is aimed at, and with respect to costs, throughput, efficiency and maintainability, Micro$oft Silverlight, Adobe AIR and Java runtime systems CURRENTLY beats this idea by a wide margin! . . . I guess, it may be sandboxed, but it still poses more security risks than the aforementioned. Google is really aggressive in pushing technology forward but at the same time, they are after "Big Data". I doubt if other browsers like Mozilla, Opera, Micro$oft, etc will implement this anytime soon... Even smart phones are marginalized by this. . . . In most scenarios, C# and Java outpaces C and C++ in webapp clients. . . . with C# being much better java in many webapp endeavors(Personal Opinion, so no apologies to java antagonist). Let C and C++ do the big jobs in the server and anywhere intricate requirments are wanted with clear cut throughputs... Still, i acknowledge the PNaCl is not really a bad leap. |
Tolutheo: Does programming has anything to do with age, if yes what age should you start programming?yes! The age requirement is when you can do simple algebra, recall what you've read or known and can think clearly!! ....Otherwise, there is absolutely NO correlation between programming and age.... And If I am not mistaken, I know a 19yrs old programmer studying a non-computer related course... living and schooling in the Northeastern part of Nigeria... who started fiddling with programming @ age 15...! |
OK... So, first conclusion..... GoDaddy.com will be my hosts and Wordpress would be my CMS!! |
sarutobi: Host should be namecheap, they even accept naira mastercard. They have a package for arnd 10dolls per monthThanks a lot for the info!!!! I actually own http://whiztim.com And I have a subdomain, http://blog.whiztim.com routed to my account. ....It seems blogger ain't that costumizable.... |
spikes C: I would have said wordpress, but i don't want to say one thing now and my oga at the top will come and say it's another thingThanks... A lot Amigo :-) ..: - ) |
1 2 3 4 5 6 7 8 ... 10 11 12 13 14 15 16 17 18 (of 18 pages)
.

