What does the word "Baked" mean when describing code? [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Something I've never understood is why do people refer to code as being "Baked"? For example on the Codeigniter home page the term "A Fully Baked PHP Framework" is used and its something I see quite often. Does the word "baked" have any meaning behind it?

This probably belongs on a different site (there's an English Usage Stack Exchange site I think?), but since it's bubbled to the top...
The word "baked" has a lot of meanings and uses, several of which can provide useful metaphors for aspects of programming:
baking involves combining ingredients, following a recipe, and ending up with something more than the sum of its parts
when you bake something in an oven, you first finish preparing the raw mixture; when your source code is ready to compile, it is ready to bake
once something is "baked in", it is hard or impossible to change it, since baking is not reversible
"half-baked" means an idea that is not fully thought through; "fully baked" therefore implies the contrary
"a piece of cake" means "extremely easy", which is the likely inspiration for the name CakePHP, which I believe was first developed when "Ruby on Rails" was the hip new thing
The sentence you cite is drawing on several of these meanings to make a good soundbite; the implication is that other frameworks can't live up to them, and it's probably no coincidence that one of those rivals is CakePHP.

Related

Procedural PHP vs Object Oriented PHP [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am fairly new to PHP (you just have to see some of my previous/recent posts!). I have done a lot of my learning by studying other people's frameworks and attempting to rewrite them for my own purpose.
Out of the examples of code I have seen, it seems about 50/50 Procedural to OOP. My question is not which is better, but when should I consider using OOP over Procedural?
By the way, I don't want to encourage an open discussion of personal opinions as to why one should be used above the other. I am fully aware, after researching, that some people just prefer to use one or the other. I am after a legitimate reason as to what would encourage me to use one over the other and in what situations.
I have also read through a few different (but similar) questions on the subject, but they seem to be flagged as not constructive because it starts a debate. I don't want this, I am on a Q&A site as I am looking for an answer, not an argument.
Even thou it is 2014, you are still allowed to wash your dishes by hand, communicate with all your friends only in person, landline phone calls or letters send by the local postal service.
And you might feel incredibly well doing so.
But if you try to host a lot of dinner parties for a lot of people and organise important projects with a lot of people from remote destinations, having hard deadlines, you might consider getting a modern dishwasching machine and a smartphone.
Same goes for OOP vs. procedual. If you are just adding a tiny piece of functionality (display the current date, echo a random hash string) on your wordpress weblog: Go procedual.
If you are writing a tiny tool that does something you need to get done, if you are writing a tiny cron job batch script in PHP or if you are just fooling arround - do as you like.
But if you plan to develop sustainable, maintainable, testable, reusable, quality software that has a lot of features you should at least use OOP. Because it is bloody 2014.
OOP will enable you to blackbox and whitebox test units of your code seperately. It will enable you to not only efficiently reuse libraries and modules written by others but alos enable you to produce modules and libraris that can be reused by others.

How can I display this rather unusual schedule is an easy to digest manner via PHP and a web language? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I'll do the best to explain this, but please ask clarifying questions as needed:
I basically have a schedule attempting to map out seven stages of an event, which occurs over a period of roughly a week. This data is presently in timestamps which are difficult to read and hard to draw conclusions from, and I would like to present it visually some how.
Each stage has an estimated period of time in which it might occur, and these times can overlap with other stages because they are estimates (and in fact typically will).
In addition to the estimates, in certain stages I will sometimes know when part of the stage is known, with certainty, to be occurring.
The purpose of this map/schedule is to allow a user to look at the schedule and instantly recognize what periods of time stages are likely to occur, and what periods of time stages are definitely occurring.
How do I translate my timestamps into some sort of visual to convey this information? Would HTML 5 be the way to go, and if so, in what manner?
Thank you for your input
The question is hard to answer - so I will only try the part where you are asking on how to visualize the information.
I can recommend using the highchart library for any kind of statistical visualization.
http://www.highcharts.com/
You can find some demos here:
http://www.highcharts.com/demo/
It all works with Javascript and even in older browsers which is nice.

How much of code can I copy from an open source program? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I am building a CMS for a client, and I needed some inspiration from Drupal, Joomla!, and Wordpress. Now that I have the whole think in my mind, I typed out some of the code and it looks extremely similar to that of Joomla!. I don't want to be stealing their source code, but I want to be able to call it my own.
Is using the same methods (same ways of doing things, but written in different ways) okay? Where is the line of plagerism when it comes to programming?
edit: Lets just say, for the sake of this question, I wish to sell this CMS and generate money from it.
It depends on the license. Most Open Source programs, you can 'steal' all the code as long as you copy the licence(generally MIT or GPL).
That's the whole point of opensource. Plagiarism is relative to the author's wishes. If the author says(in the license) its okay to modify his code, its okay to modify his code
Also, if you drop a line of credit about the original authors, its perfectly fine
This question is kind of like saying you're writing a paper. To research this paper, you read a book and used the same ideas that you found in the book, but wrote the paper using your own words. Is that plagiarism? Probably. If you're writing your own CMS and borrowing a lot of code from Joomla, I'd consider using Joomla and developing an extension to fit your specific needs. If you can't do that, I'd do one of two things:
Use the code, and release your code under a license permitted
Get explicit written permission from the developers of Joomla to grant you ownership of the questionable code.
When it comes to issues like these, I think it's always better to be safe than sorry.

PHP Syllable Detection [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I would like to find a way to be able to split a word into syllables with PHP. For example, the word "nevermore" ran through detect_syllables(), would return "nev-er-more." Are there any good APIs or something out there?
There's a useful PHd thesis paper by Frank Liang that describes an exceptionally accurate algorithm for this: written over 25 years ago, it's still valid. But I'm not aware of any implementation in PHP
EDIT
A quick google has identified this link to a Text Statistics library in PHP, which includes algorithms for syllable counting within words (among other readability measuring algorithms). You should be able to find the code for syllable splitting here.
I'm actually in the finishing stages of making a PHP Hyphenator class based upon Frank Liang's algorithm and the TeX dictionaries, which pretty much seems to be the appoach taken by all office suites. (Actually I found this topic while looking for a good name for it that wasn't already taken). With slowly improving support from browsers for the ­ entity, it's becoming a realistic option to hyphenate content in websites.
Core functionality is working; splitting (and thus counting) and/or hyphenating text and/or HTML, parsing TeX hyphen dictionaries, caching those parsed dictionaries. Some planned features are still missing but nothing that stops you from using it. Also there's no good documentation, samples, formal unittest or vanity site yet.
I've created a github site for it here and will post the current version on it ASAP, so check back in a few days.
I've only tested it with Dutch (my native language) and US English, so it may still have some issues with languages using different character sets.
Note that Frank Liang's paper is on hyphenation, NOT on syllable detection. In addition, his thesis paper itself states that its success rate is around 89% for the dictionary he used, which is not going to be good enough for everyone. There really is no substitute for manually doing it for every single word it seems. It's not that efficient to have to require a complete one-to-one lookup table wordlist in order to do it, but these days storage space is far less expensive than CPU time anyways.
Perhaps someone might consider making a CAPTCHA-like service so that many users could be asked to provide the solution to every known word, with the results checked against each other, so that one person wouldn't have to do it all themselves. I'd hope the results would be released freely once complete.

Custom PHP interpretor? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Compared to some languages, PHP's syntax is a little bit long (e.g. in java calling the method of an an object is done with a period ( . ) instead of phps (->) ).
I have always wanted to write my own language but I'm only a first year bachelors student and am in no way knowledgeable enough to write a parser that converts something to byte code for the Java VM or something.
So instead I'm thinking of writing a parser in PHP that converts my syntax into PHP code then runs that using regex and stuff.
Reasons for that being:
PHP is a stable language for web sites (my syntax will be suited towards web developers)
I already know PHP at a professional level (or at least I think I do)
I have already seen an implementation of something similar: http://tetraboy.com/lolcode/lol_core.phps
This converts LolCode into PHP. And I know its just a joke but still it has been done
So since I have proof that its possible.
My question is:
Could I actually make something that I could use for future projects? e.g. Can I get it to be as fast or almost as fast as PHP is?
I'm going to give it a try either way just for the purposes of learning a little bit more about PHP and how languages are put together, but I'm wondering if I could actually turn the end result into something worth a damn.
If anything, this is a very fun learning project.
There are others that had the same idea with other languages. For instance, take a look at CoffeeScript, which is basically the same idea but for Javascript.
You can make this work, but you'll have to take into consideration the conversion process. If you're looking for performance you do not want this to be done realtime on each request. Because adding layers of complexity will simply slow down your code. Even if it's just by the tiniest bit. To rememdy this CoffeeScript offers a command line 'compiler' for pre-compilation but also allows for a lazy loading situation - which works nicely for development purposes. Such a setup might work for you aswell.
You'll want to look at PHP_LexerGenerator and PHP_ParserGenerator for implementing your parser. Even if the latter is no longer maintained :)
Good luck! ;)

Categories