Larisoft's Posts
Nairaland Forum › Larisoft's Profile › Larisoft's Posts
1 2 3 4 5 6 7 8 9 10 (of 12 pages)
For programming section kwa? Na war ooo. |
virus05:If its been upto 48 hours since the site was registered, try this. 1. create a .htaccess in your public html folder. 2. put this in it <IfModule mod_rewrite.c> Options -ExecCGI </IfModule> make sure its saved, then visit the site again. Also note that waiting a few days will automatically clear the error. |
tr3y:my brother, I wanted the students to some how think the app is by the school authorities... at least till they realize it works and get hooked. I think it worked. |
DanielTheGeek:Dan, what I was saying there is that the fact that the option exists at all to replace objects with arrays is tempting peeps to write bad code. The shit hits the ceiling when you make a mistake in the string key while trying to access a or change a value. e.g $value['name'] = 'me'. then on another page you try to access $value['Name']. Autosuggest won't work here (to correct your misspelling of 'name' , no matter the ide because its a string literal, not a variable. when you pass this false object around, you must remember the correct spelling of each variable. Thanks for reading Dan. |
dhtml18:Lol. You know say when musician dey sing, im go sing some misses, sing some hits... Thanks, Dhtml. I appreciate your recommendation. Really. |
webninja:Thanks for noticing me bro. Am sorry my posts annoy you but now you know me and I know you...and its probably because of them. If that's all it has earned me, its not entirely unprofitable. About the blog; I'm sure (and hope) you will develop a better opinion of it someday. I am learning! What I dont know today, I will know tommorrow. Thanks for reading!!!! |
tr3y:Php is here to stay. but all languages are not dumb. perl, python, c#, to mention a few, are languages that were designed carefully, in strict adherence to core computer science principles established over years of trial and error. I think I will write an article detailing the design flaws of php. I feel weird perpetuating this but....I guess it'd demand and supply. |
danidee10:thanks man. I m checking out odoo today. you wouldn't believe how everybody wants systems these days and no one wants programs anymore. |
dhtml18:Lol! what are forumns like this for my brother? |
ugo2016:Wow! Thanks man! Have been too occupied lately. I'm glad you enjoy my opinions. Please note that I sometimes publish articles on my blog which I do not share here. |
I JUST WROTE WHAT MIGHT BE THE WORST SYSTEM EVERY PROGRAMMED IN THE HISTORY OF THIS COUNTRY: HERE'S HOW I DID IT First of all, how do I know that this code is the worst piece of code ever written in Nigeria? - The System consists of only 2 backend scripts. Each of which has over 2000 compacted lines of code comprising several classes and independent methods. It has several front pages of course, but everything relies on these 2 backbones (i.e. Every page references the two pages one way or another. (Wasn’t the plan initially, trust me). - The only comments in these pages are previously existing code which I marked as comments after replacing them with new, working code. (I’m scared that if I try removing these unused codes, I might mistakenly remove a letter from a variable and have another hour in hell). Anytime I realize I have to change a variable name…My mouth goes dry and I feel myself sweating. And changing the variable name usually takes 2 hours, with a lot of ‘ctrl F’. - The Error reporting is set to NONE. I dare not set it to WARNING or the browser will crash with all the text it will spit out. - Some newbie out there has probably written something worse, but it can’t possibly be this large. This is a system that is meant for a big institution. Any newbie that attempted this would have given up in frustration after correcting the first 1000 bugs (Am not joking!). On the other hand, no pro could have written this. They usually have established conventions they follow to avoid this sort of thing. And they would have charged enough money to justify rewriting it once things started to look funny. Now, even though this is a baaaad barge, it’s a barge all the same.I have written the worst piece of code in this country! And not knowing how else to vent my frustration with this piece of code; I’ve decided to blog about how I accomplished this disastrous feat…and perhaps, stop someone else from beating my record. This is how I did it. I PUT PRODUCTIVITY ABOVE ALL ELSE This project actually started as a small program – not a system. My company got the contract last year when I hadn’t written this article on how to treat clients (http://larisoftng..com.ng/2016/05/what-freelancers-should-make-clients.html). I accepted the job, and wrote two simple, neat, object-free scripts to solve the core problem. I can’t mention the real project here, but its very much like computing Employee payroll. The client said he didn’t have a lot of cash. All he needed was a script that would record employees’ basic Bio data, and get the salary of each person when one keys in their name or email. He pleaded that it shouldn’t take me more than 3 hours. (He was a programmer that did more job-hunting than programming, and this contract he got turned out to be above him, so he outsourced to me). Here’s what I should have said: “Bro, this program doesn’t seem to be complete and I know you will come back for more features. Hence, the only condition upon which I will write this program for you is that you sign this agreement that you will not request for any other feature than what you just listed. And that if you do, you shall pay me whatever I charge you before I’d be able to add them”. Unfortunately, here’s what I said: “Its alright, bro. I will send it to you this evening”. My poor laptop was probably screaming at me to take that back. But I didn’t hear it. I got a really cool template, (this project is one of the best looking I’ve made by the way), pounded away at the keyboard for 2 hours using a language that is very good for getting things DONE FAST (more on that later), and our program was ready. I had produced value in less than 2 hours and got paid for it. Yeah! That’s how I rolled. However, twice or so every week, the guy would call and plead that I add a function to do something simple…like say… a ‘form to record employee attendance’…or’merging employee attendance with employee salary’…or a ‘view that enables seeing the difference between what the employee is paid and what he should actually be paid’. I always added these features within minutes, collected whatever token he thanked me with, and moved on to whatever major project I was working on. Productivity was key. I CHOSE PHP Its unfortunate that my very last blog post was a critique on PHP, and here I am again, ranting against a language that has paid me over and over again. A language that I couldn’t create, even if it was to save my poor soul. But the truth must be said I guess. Its possible to write bad code in any language; but PHP actively begs you to write bad code. 1. While PHP offers OOP, it offers what seems like a poor implementation of a hashmap, which tempts you to avoid creating objects at all. This implementation is called string indexed arrays. For instance, why create $person = new Person(); $person->name = “me”; $person->confession = “I wrote bad code”; $person->punishment = “Five projects ahead of absolutely clean code”; When you could simply do this: $person[‘name’] = “me”; $person[‘confession’] = “I wrote bad code”; $person[‘punishment’] = “five projects of absolutely clean code”. Note that I didn’t even have to initialize the array. And this error will be suppressed once I change the error report from WARNING to NONE. The second option is very tempting right? I fell into that temptation a lot on this project. Till date, the project has no objects. I guess am doing functional programming. 2. Error reporting: PHP is very soft-spoken about what you can do and not do. If I had created this mess in Java, I would have given up after the first 500 lines because too many compilation errors would have stopped me. But with PHP, all you need to do is turn the error reporting off and everything looks clean! And boy! did I use that ‘turn off’ button’? 3. There is a lot of bad design decisions in PHP, which may or may have not aided me in accomplishing this feat. But I will leave those for maybe another article. 4. This one is largely dependent on the fact that I used Net beans, but the automatic indenting for braces and if statements is very poor for PHP. I shouldn’t have used the duo. Yeah! I just blamed Rasmus Lerdorf again for my own shortcomings. I guess that’s how I roll! I Used An Already Existing But Unrelated Project, And Several Libraries: I already mentioned that I used a template. What I didn’t mention was that I also used a sample project for an employee database. As time went on, I would clutter my workspace with so many libraries and sub projects, so long as I found a way to fuse them to my two backbone php pages. Things were bad. Rather than stop, I patched it on: As at 3 months ago; it was clear what this project had become. One would think I’d have the sense to propose a rebuild but I didn’t. I kept patching it for tokens. Well, that’s how I got this barge! If anyone asks you who has written the worst piece of code in Nigeria yet, you know who that person is. More on the project; we are now at the point where I’m making charts to show employee performance, performance in comparison with objectives, performance in comparison with other employees, etc. And there is no fixed price for all of this. One may ask, why don’t I drop the project? My response: Am the only one alive who can navigate this code. I have accepted too many tokens over time to reject it now or charge again to rewrite it. My client wont hear of rewriting everything from scratch, too much money has been spent and everything seems to be working okay. Calling in a new developer would reveal the abomination that’s been hidden for a year now so am reluctant to pull away forcefully. Also, I am so engaged now that I would be squeezed for time to redesign it . Its sort of that position where you are too small to get over, too tall to get under, and you are stuck in the middle. (Tribute to Michael Jackson there). Do you think you have written something worse than I did? Please share! It would be really comforting to know am not that bad… Source http://larisoftng..com.ng/2016/07/i-just-wrote-what-might-be-worst-system.html |
FincoApps:noted, boss. Do you think its slow and the coloring hides some of the text? And it doesnt have an icon? Like the guys behind the veil dont really care that much? |
I have been trying to hold my peace, but the truth is that I feel like flogging many people on this thread - and I shall if seun gives me an e-cane.Lol! Too bad you didnt know youtube was written in PHP IN THE EARLY STAGES, but they moved to Python, and eventually JAVA and GO when things got critical. And Speed is about the programmer's efficiency? Donald Knuth was the one who said that premature optimization is the root of all evil. Now, when Donald Knuth speaks, I tend to listen. When you are writing code, and optimizing while coding because you are using a certain langauge, is that not a loud cry to change your tools ON TIME? All the technologies that were written in PHP have long ported resource hungry parts of their code to languages like JAVA, C#, C++. I bet they would rewrite the whole thing if it wasnt too late already. Google is our friend in this regard. As to people criticizing languages and being lazy because of it, how would we learn all the things posted on this thread alone, if not for such criticisms? Would all the newbies reading this thread tell me they have learnt nothing? Would the pros tell me their opinions were not put through fire after all this exchange? In what country do developers not argue about their tools? The likes of Jeff Atwood, Linus Trovalds, Donald Knuth (who has openly criticized modern languages as opposed to assembly languages), even Djikistra for Christs Sake! do it too! What is wrong with exchanging opinions on something we care about? I am currently working on 3 apps, managing my blog, maintaining a backlog of old apps, responding to user requests/feedbacks. How does the 5 minutes I spend here ranting against a language am heavily using make me unproductive? And yes! I have built something that has been used by thousands of people too! And it was with PHP! And the multithreading was horrible! And the only available solution was worse! Why the hell would I have to use a third party library or create a new instance I have no control of for something as essential as that? I HIGHLY respect you and your opinion, bro. But you asked questions and I responded. I recommend we all read these. I don't agree with them completely. but their points are cojent at least; https://webonastick.com/php.html https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ Even Jeff Atwood has something to say on this issue... https://blog.codinghorror.com/the-php-singularity/ these men have designed software for millions and when they talk, I shut it and listen! apart from the fact that my personal experience inspired my opinion in the first place. |
FrankLampard:well...I don't know iroko TV that much, and don't know anyone personally who relies on their services. I could be wrong, but that tells me their client base is still very modest (< 1000 video plays a day). And am I the only one who finds their site painfully slow with so many texts badly colored (Can barely read the caption on their homepage)? But if its not, I have merely listed the flaws I see in PhP, all of which even though could be worked around, make the language a bad choice for certain projects. Languages have areas where they shine brightest. If a project's success is heavily dependent on concurrency, efficiency, and core OOP, using PhP is abusing PHP. But if the project's success is dependent on speed of development, low budget, and ease of maintenance, PHP is the best option I know. There are people who know better than me about these things on this forumn and my opinions are just what they are: opinions. I change them once I m provided with logical reasons. My 4 blog posts have been on the front page of nl programming section for days now, and have elicited the reactions of heavy weights I respect so much. That makes me very happy and grateful indeed. I love everything about this industry and doing what I do is an honor. |
Finco Apps... making sense since 1900 |
dhtml18:how can I be cutting off e-head when I said I was wrong? Please oh! I said I WAS WRONG ABOUT THE C# COMPILER BEING PROPRIETARY. HOWEVER, I DIDNT SEE THE NEED TO EDIT MY POST because THE PURPOSE OF COMING HERE IS TO LEARN; NOT PROVE THAT AM RIGHT! |
basbone:Lol! I dont come here to post things that are always right. I come here to express my opinions, and receive corrections where am wrong...like now. Am not editing jack. And; thanks for the correction. The core c# compiler, which is what am still using, is not open source. |
I love this forumn! @Dhtml, Sleepingdemon, Kento, mafizo, discussing topics like this one with you guys from the comfort of my room, while facing a stubborn bug that wont go away, is a fun filled break for me any day! |
Well; I have threaded JSP (Java Spring) and .NET (C# MVC) and have these to say: JSP is hard! C# MVC is easy at least to start using. But JSP gives you the flexibility you wont ever get in .NET. C# is always forcing you to do things the way microsoft wants you to do it. Depending on the type of coder you are; this can take away all the fun becuase you rarely ever get to implement your own stuff. Everything seems to be already thought out for you and you just have to read a tutorial to see how Microsoft wants you to do it. Also, Microsoft software is proprietary and neither visual studio nor the C# compiler is open source. (Please; I know about mono and know its limitations). But with Java, your imagination is your only limit. You can do it the conventional way, or introduce your personal style at any point you like. If your writing something that requires strict security; please go with .NET so you will have rest of mind. But if you are looking for something you can truly call your own; java is the way to go! |
Am not impressed by what I see a person has done. Not with all the free apps out there available for one to customize and claim ownership of. And definitely not with many brilliant coders lacking GUI skills. Yes; A coder should not have to be GUI design genius. what I look at are: 1. The neatness of code (does it have comments? is it well tabbed and spaced?). 2. The structure and architecture: Are related classes placed in the same folders? Are there irrelevant classes? If I add a module to this app, will I have to change everything else? Does a method perform only one function or several functions? 3. What are the unique things this app does? Is it basic crude operations (under which circumstances I will think you are good), or does it bring new breath taking algorithms which handle data with so much dexterity one thinks there is a human brain in there. (under which circumstances I will think you are super dope)? Programming is an art. Doing stuff that works is okay. Doing stuff that marvels is ....cool. Finally, how much of this code did you actually write? It is definitely okay to use someone else's code, after all, the best code is no code at all (learnt that from Code Complete), but you shouldn't take credit for another person's work by posing as though you wrote it. As for languages, the problem I have with people who claim to know several languages is that they dont even know those languages. You know C# right? If you were given only notepad, would you be able to write a medium-level c# app... like say...a windows form? What about those that claim to know PHP? could you install your own PHP (not lamp stack) and configure your simple notepad scripts to run php? Do you know how that language works? Do you know its founding philosophy and WHEN NOT TO USE IT? If you could do all these in all the languages you claim to know, you'd definitely know computers deeply enough to justify your claims to bragging rights. But most of these guys only know one language. Some dont even know any at all. |
Lol! Who said PHP is useless? Php is good for where it is good. But it is evil when used for certain things. Go and ask Jeff Atwood, anytime you have to start patching things up with using that framework and that library...things are going south because trust me, those frameworks come with their own baggage. For a small forumn? Hell Yeah! For another gmail or google drive? Hell No! Ask that guy that used PHP to write Nigeria's search engine how thats working out for him. |
Thanks so much guys. I've been exposed to perspectives I didnt think of while writing this. Thanks Olumyco, Jagbantiele, e.t.c. Algorithms as referred to in the article is not the basic kind of algorithm where the steps are obvious (i.e. collect user name and print it). Am talking about steps that are game changing, and efficient as hell. Many 'technology guys' do not know it. If I ask an algorithm question on this board, it may be unanswered for a day at least while there are many great programmers on this board. And yes! You can code enterprise applications today without being good at algorithms. No one implements sort anymore. No one implements search anymore. No one implements encryption. All these have been provided in libraries, and stackoverflow. All you need to do is familiarize yourself with the technologies so you can copy and paste or import as the case maybe. But you should know that using the algorithms of others doesnt make you an algorithm guru. You will become dumb once you meet a problem no one has attempted before. Hence, the algorithm guys are different from the guys who are great at learning new technologies. One painfully missing category here would be security experts. |
FrankLampard:Frank, thanks for calling my attention to PHP 7. Python 3 is another interpreted language. There are just places these technologies are best used. A small forumn? Yes. An online video school? Probably not except you want to be implementing patches for the rest of that application's lifetime. By the By; its good to see all the coders arguing away...just like the good ol' times. |
Now you've seen us? |
Nna eh...Na so e bad reach? |
From my experience; it is profitable but you have to put in a lot of work and make an app that suits the advert monetization strategy. For your app to make enough cents in a day, it has to be an app that will keep users hooked for hours. Hence, a Music Player App, Game, or social forumn like Nairaland where people spend hours each day will make far money than an app for exercise which users will never use more than once in a day, and they'd be even too busy in the day to click around your ads. In more details, the amount you make depends on the amount of impressions you get. An impression refers to what happens when a user sees one ad rendered in your app. 1000 impressions roughly translates to one dollar (with admob). This means that you will need to get upto 1000 users daily to expect a dollar each day. Of course, you can add more than one ad in your app. If I'm to be too bold, I would say you should expect to make 10 dollars daily when you hit 2000 users for an app that users find addictive and use several times in a day. Good Luck, bro. |
In Nigeria, it is taken for granted that any body who calls him/her self a programmer knows the PHP language. PHP rocks. There are thousands of already written free software implemented in the Language. There is a hug support base…probably the biggest for all web programming languages. And most importantly, PHP has a low learning curve. However, except in the hands of those who know the language thoroughly (and because they know it thoroughly, they know when not to use it) PHP might be a bad language for any slightly huge project. Here is why. Bad Concurrency As a newbie, I churned out more programs in a week than I knew what to do with. Every program seemed so easy and I kept wondering why I would ever need to use Java or C# to write a web app. I then got a contract to implement an app which facilitates file sharing. This was no big deal. In a matter of days, the app was ready (with a lot of bad, undocumented code of course). There was a problem though. Once up to 100 persons tried sharing files of (5mb+) at about the same time, a lot of errors sprung up ranging from gateway time out to connection to server lost. Once this happened, the user had to start over. I realized what I needed was called “multi-threading”. This would have allowed the files to be queued for upload, eaten away in bits and pushed to another queue of files ready to be sent to clients that request for them. All this would be so efficiently controlled that a thousand people can exchange files, and the user can see a message like “too many people are uploading, your file is uploading but going much slower”. Or it could just show a progress bar (like google drive). I will also be able to limit the number of active threads, keeping some activities in pause till more threads are freed. The load on the server would have been so controlled, PHP is just bad for this. There are libraries of course that simulate this by instantiating another PHP Instance. But you’d be simulating and you’d eventually move over to langauges that offer multithreading features natively. Speed There are lots of goody goody resources out there telling us that PHP’s speed is just as good as any other language. I wont argue. I will just show you facts and let you decipher the truth for yourself. PHP is an interpreted language. Every time a page is requested in PHP, it is compiled and then the compiled code is executed. This means that your code is read from disk first, compiled, and then the compiled code is executed. Compare this to a compiled language like C# where the process for responding to a request is just ….execute! Respect Respect is everything in the lives of hackers. Introducing yourself as a coder whose primary language is PHP makes you look weak. This will affect the circle of programmers you maintain. The circle of programmers you maintain will affect the opportunities you are able to attract. If I may brag a little, rumour around town has it that am kinda a good coder. If you want to work on a project with me….I’d really love java or C# or C++. Its stupid….but you know…hackers value bragging rights. Opportunity Even though the job you will be doing most times will be restricted to PHP, many job offers will list perceived hardcore languages like C++, C, C#, Java as vital to the job just to scare off coders they perceive as unserious. As tempting as it is to keep using PHP for all projects, Nigerian coders should work hard to stretch their horizon beyond it because when the game gets big...the language gets weak. Source: http://larisoftng..com.ng/2016/07/why-you-should-not-have-php-as-your.html |
The 190es and W230s for instance almost always go for below 300k. Please guys, I am getting interested in these cars but the price seems to suggest it may be a trap. What are these cars like? |
Laolballs:its alright, bro. |
ugo2016:Thanks my brother. |
Laolballs:I understood your confusion. That was why I said what I said about your level of experience. In java, and just about every other oop langauge, the return statement in a method terminates that method, including any loop that might have been executing within the method. The only exception I know of is when there is a try, finally clause. I was angry because you could have asked questions or used google; rather than speak authoritatively as though you know what you are saying. |

