« first day (550 days earlier)      last day (4624 days later) » 

15:00
i prefer Bong-Ra tho myself
One question. Can i some kind of join array keys with same values? For example ...('2'=>'active', '3'=>'active','1'=>'inactive'); numbers are identifiers for user levels. 2- user, 3-admin, 1-inactive.
Tek
Tek
@vdoogs Mine, in case you'd like a listen soundcloud.com/ht3k
@Tek killer dude. following you in a sec
@user6613 array_unique()
ok now following
Tek
Tek
15:02
@vdoogs all dnb... for now. I keep most of my music to myself, idk y Then again I just do it for fun, but I should probably share more
@Tek word man... it's hard if your feedback loop is small
had that problem for a long time
@webarto thanks
Tek
Tek
@vdoogs Tbh I have trouble finishing songs a lot, I feel like a perfectionist and I always put them off because I'm not happy with them a lot of times
@Tek word man only way i've found around that is just to make a ton of songs
some of them will stay. some will naturally go.
Tek
Tek
@vdoogs Then again I have some shitty speakers and I'm waiting to release some of the better stuff when I can get better equipment to make sure they're the best sounding :D
15:04
like women.
Tek
Tek
haha deffo
LOL
picked up krk rokit8s not long ago. best $450 ever spent possibly
Tek
Tek
@vdoogs Man, you don't even know
@vdoogs I have some like... speakers from some old stereo in 2000, not even kidding. They're not horrible, they have some bass tbh I'm surprised they don't sound like complete shit but I want these :> google.com/…
The only reason I keep them is because they're sort of big :p
daaaamn. You have space for midfields @tek?
Tek
Tek
@vdoogs I'll throw out my bed if I have to for those sexy girls
lolol
15:08
what is the recommended listening range on those? I think for my krk nearfields it's like 3-6ft
hahaha
Tek
Tek
Yeah, that sounds about right
prob gonna need to put your mixing board @ 10ft+ for those midfields?
dunno i've never had midfields
Tek
Tek
@vdoogs I'll probably end up hiring a guy to soundproof my setup and recommend what's best if I ever do end up getting those
Tek
Tek
@Trendee Once a project starts getting big I'd say you have no choice but to start learning to use a framework. You'll end up wasting more time trying to maintain that file than adapting the code to a framework and then having an easier time expanding it after that
15:13
@trendee first thing I can tell you is you should be using a caching framework
if it needs to be "efficient"
But how would a framework do what i am asking in the question? This is the last thing i need to do for my website until it goes live. Could i do this first then after it goes live start transfering over to a framework?
query caching
specifically
Tek
Tek
@vdoogs I don't think that's his problem as much as having his code organized
wat
^exactly
15:15
I am confused. Do you want it "efficient" or do you not know how to solve the problem?
How to solve the problem
I mean, i CAN do it. But i am wondering what way is best.
easiest.... put it in a query string re: the type of data
Tek
Tek
@Trendee I guess I can show you a small example
@Trendee Give me a second. Actually before I do that, do you know how to use prepared statements?
query out that data
@Trendee mysql_* is softly deprecated
15:17
ie add a column "page_type"
@vdoogs I am not going for the easiest option. Take this example. I can either have 40 different pages that i could just include depending o the $_GET or i could try something more efficient like using ajax.
"efficient"
what is that
Tek
Tek
@Trendee You can actually have your queries in a completely different page if you use prepared statements
overloaded term man
Achieving maximum productivity with minimum wasted effort or expense.
15:18
of you
or the CPU
Tek
Tek
@Trendee That way you wouldn't have to mix your php code with mysql code and it'd be a lot cleaner
@Tek I was looking into using them, but again i was planning to get this version of the ground then sweep it over to a framework.
Tek
Tek
@Trendee Then or than? Because if you mean "then" I thought you didn't want to use a framework?
sounds like twice the work @Trendee
@Trendee You just have to work out what you want to implement. How many different sports are you going to list?
are you going to list the same number for each sport?
15:22
@Tek I am planning on doing this last part of the site then putting it live. Then begin learning about frameworks and converting it over. As i have done most of the site already and is nearly completed except for this last part.
you realize 3/4 of your code base will change right?
@Paul It will depend, may add more sports, may add more athletes over time
Tek
Tek
@Mike Not necessarily, he'll just have to move it to different places
depending on query structures andsuch
Tek
Tek
@Mike It's connecting the code again that he just has to work on
15:23
Why do it with a framework? Once you have it working leave it alone.
@Mike Yes, that is why i want to finish this last part and put it live as i don't want to redo all of my site that i have been working.
Tek
Tek
@Paul He might have to maintain it, and I think he realizes that it's getting messy. It's better if he'd invest into some time to learn how to organize his code so that he can maintain it easier
@Paul It all works fine, but people have been suggesting frameworks left, right and center.
i had a similar instance happen, and im glad i scrapped what i had and wen the mvc route.
has anyone suggested a good framework, or are they all horrible ones?
Tek
Tek
15:24
@Mike Same
Symfony2, Zend
I'd say
well thats a subjective question @paul
i need to dig into Zend, i might use it for a future project.. may convert an app from CI2 to Zend
There is too much framework love happening right now. This page is pretty simple.
i havent seen it
i was just jumping on the bandwagon =P
Tek
Tek
@Paul Again, I agree with you but if he's going to maintain it it won't be practical
@Trendee just finish your code... make it work... then separate it out how you want
15:26
I still do not have a good understanding on what a framework is even beneficial for to be honest
that is how you do every code you ever do
function > form
Tek
Tek
@Trendee Maintainability, readability, testing not to mention organization. You may not need testing now but maybe one day you will and it'll be one of the most important things you'll have to do.
add performance to that as well
@Tek Surely that can be done without the need of a framework?
oh and security
15:27
class Model { public function getData() {} }
class View { public function write() {} }
$model = new Model();
$view = new View();
$view->write($model->getData());
+ not writing everything yourself
@Trendee if you don't understand that then it is best that you have a stronger grasp of PHP before jumping into one IMHO. @Paul is right
Tek
Tek
@Trendee You consider having everything in one page all that? I don't think so
lol 30k lines
Tek
Tek
@Trendee Plus you'll never have a duplicate line of code that does the same thing. Everything is recycleable
15:27
thats what i picture
@Trendee you are obvs not going to take the time to learn a framework so just finish your shit
then learn it later
and edit it
x2
like really stop insulting our intelligence. we know you don't want to do it by now. we are telling you its a good idea but takes a long time.
not to be a dick but really man. Real Talk.
@vdoogs I take that as a insult. Yes i plan on learning frameworks but as Carrie said i need to learn more about PHP in order to begin
id buy @vdoogs a drink
15:29
@trendee good
i am glad you are offended
it means you are listening
you learn by testing, programming, and breaking.
at least i do
@Trendee Consider my code above as a micro framework. It will keep your Model and View separate.
@Paul Okay, i see.
Tek
Tek
@Trendee Think about it this way. Coding as you are now you'll be fine at first but pay for damage later because there's no structure to your code.

If you learn more, that's time you have spent paying for the damage up front and you'll have an easier time adding things to your project without having trouble what to on what to do with your code. That's actually the last thought you'll have
@Trendee all I am saying is you don't become "most efficient" overnight. you work at it for years. so finish your code, make it work, and take refactoring it to be a long term pursuit
15:31
@Tek What would you suggest for the hall of fame page?
that is the way it should be. always
Tek
Tek
@Paul In a framework or the best solution for now without a framework?
@Tek I understand that, i am keen to learn a framework and take PHP further, but i have been working on this website for a while and am one page away from it going live. with that in mind i would rather finish the page -> get it live -> Learn about frameworks and how it will help my site -> put it into action.
@Tek w/o
Tek
Tek
@Trendee So finish it, or what is keeping you from finishing it even if it's messy?
@Tek best solution for now. (e.g what Trendee should do?)
Tek
Tek
15:34
@Paul I'd say he build a simple data mapper and model (which is basically packaged functions). One returns the data, the other one prepares the data for viewing (HTML and stuff altogether).

And on the actual page that he presents
He could have an if that detects what requests he wants, then just call the model and it's one line of code
^^^^
+infinity
Tek
Tek
I think that's the best thing he could do without a framework. It just doesn't get better than that
if($_POST['page_type']) = 'basketball' { import('basketballstyles.css'); }
or similar
@Trendee I notice you refer to a lot of $_GET query parameters. So, it looks like the sports shown will be based on the query string?
er
$_GET not $_POSt
Tek
Tek
15:38
@vdoogs There's an edit button man ;D
@Tek thx bro
or hit up with your cursor focus in the input box (before you type anything) ... like so
Sorry, had a phone call
@Trendee I would suggest a single query. Then a simple foreach loop to process the data returned from your single query into an array. Then in the View I would loop over this array to display the data.
Tek
Tek
@Paul View is a framework term, you should probably abstain from using that. I know I did use them too but I explained what they'd do :p
15:41
@Tek I already defined View above in the code I wrote.
@Paul Ah okay thanks.
also i mean include_once not import :D :D :D
@Trendee Seeing as you will be pulling the data from a single table of athletes, you can choose all that match boxing OR swiming OR footbal
Tek
Tek
@Paul I guess I missed it?
@Paul Yeah that is the easy part, so you would advise me using for example page.php?sport=Boxing&time=week?
or Ajax loading?
Tek
Tek
15:44
@Trendee That would be fine. Don't depend on ajax. Ajax should be used on TOP of php, never by itself
@Trendee Just like if you removed all ajax from facebook, facebook would still work. (Try turning off javascript). Ajax is only a secondary functionality, never main source of pulling data
@Trendee Start with a simple page, no AJAX. Only fix performance issues once you have found them. Its much easier to fix them retrospectively.
ugh. ajax loading with no framework = bad idea
@Tek I was a bit confused by your Data Mapper and Model, it seemed like it was also being the View.
Tek
Tek
@vdoogs Ajax without a framework is fine, just as long as he doesn't use it as a main functionality
@Tek @Paul Ah okay, i will use $_GETS. One of the main reasons i was going straight to ajax was because of how smooth gathering the results was and how clean the url remained. But i could just use htaccess right?
Tek
Tek
15:47
@Paul Yes. But I didn't want to make it overly complicated. I combined model & view together. He doesn't exactly need an extra class for view, not like he's going to reuse the data from the model
what did i miss ?
Tek
Tek
@tereško nothing, trust me
@tereško you missed some framework loving.
Tek
Tek
@Trendee Yep. Actually htaccess will give you cleaner urls than ajax ever will
@Tek Splitting the model from the view is the most important thing for reuse. Combining them never makes sense IMO.
Tek
Tek
15:49
@Trendee Plus you can't bookmark ajax pages... (super annoying)
@Paul That's the point, he's not going to reuse any of it
I just said that earlier
@Trendee , "learning a framework" will not make you write a better code .. quite the opposite
@Tek actually you can
@tereško +1
@tereško I want to learn it because everyone is suggesting it will help
Tek
Tek
@tereško I know he can, but he won't because he doesn't know how frameworks work
ajax = can of worms
in any case
15:50
@Trendee , who is "everyone" ?
@Tek I would reuse it. I would write a different view when I wanted to upgrade the look of my page.
Tek
Tek
@tereško I'm recommending it for different reasons, not because it'll help him "code" better. So I agree with you
@Paul I know YOU would reuse it, but I'm not talking about you lol
@tereško Most people in this chat said it would be wise to begin learning frameworks.
@Tek , how is bookmarking ajax pages related to frameworks ?
Tek
Tek
@tereško I didn't say anything about bookmark and frameworks. I said bookmark and ajax
15:51
@Trendee , who are "most people" ? i want the names , to add them to the "sh*tlist"
@Tek Maintenance. Separation of Model and View would be in my top 10 of the most important things for programming.
@Tek , pay attention to which thread you are replaying
@tereško man you are argumentative brosef
@tereško Tek and Paul both suggested i should learn about frameworks?
@vdoogs pot kettle black.
@Trendee No, I don't suggest learning frameworks at all.
15:53
so .. it seems , @Trendee , that "most people" was "only @Tek"
besides , there is a difference between "learn frameworks" and "learn about frameworks"
Tek
Tek
@tereško you should read the thread from the beginning if you want to butt in and see what his problem is about. I suggested an answer that involved a framework and one without.
@Tek I agree, @tek was suggesting a answer for both, where @Paul gave a example of a micro framework which i interpreted as a suggestion that frameworks would be beneficial in my issue
@Trendee I see, yes. The reason I suggested that was so that you would split your code into a model and a view.
@Tek , i read this part :
34 mins ago, by Trendee
@Tek I am planning on doing this last part of the site then putting it live. Then begin learning about frameworks and converting it over. As i have done most of the site already and is nearly completed except for this last part.
15:57
which seemed like a horrid idea
@tereško So you based your arugement over one comment rather than the whole discussion. I see.
@Trendee The idea is that separating retrieval of the data and actually displaying it makes your code more maintainable and reusable.
@Paul Ah i understand.
@Trendee , if you have a working project , or project , which is almost complete , adding a framework on top of it will only complicate the architecture , slow everything down and intorduce new vulnerabilities
Tek
Tek
@Paul Yes, but he's not looking to learn about frameworks right now. He wants an answer without one now which is why I suggested both. You guys are missing the point here : )
15:58
@Trendee , i thought that that was the point of whole discussion ...
Tek
Tek
@tereško No, that was additional
@Tek Suggesting a framework is not an answer.
3
no .. when someone asks "should i learn a framework" the correct response is "why ?"
and that would have been the answer to the follow-up question
@tereško I said i was planning to learn a framework after i fix this issue/
Tek
Tek
16:00
@Paul I know, which is why I said maybe in time he should in the long run. But I gave him the other answer for now.
@Trendee that makes it even worse
@tereško so you would advise that i do not advance my knowledge in php?
Tek
Tek
Well @Trendee I gave it my best shot to answer your question for your current project, if you have any questions about my suggestion let me know. Maybe that'll make it organize it a tad bit better
Thank you for the great answers @Tek and @Paul.
@Trendee , "learning a framework" will not advance your skills in php
i just advise you to not go the wrong way
16:02
35 mins ago, by Carrie Kendall
@Trendee if you don't understand that then it is best that you have a stronger grasp of PHP before jumping into one IMHO. @Paul is right
@Trendee , if you know php , then you do not need to "learn more php" , instead you need to study principles of OOP and learn how to construct better code .. that would be the way to evolve
@tereško I do not understand how they work. Once i do i can go forward and create better projects with better security, reuseability and structure.
Tek
Tek
@CarrieKendall That's kind of vague. At what point is a "stronger grasp" about php?
@Tek well for starters, grasping the need for a better structured approach.
I posted an answer for it.
0
A: Most effeicent way to have a page that has a vast amount of results depending on request

PaulThe basic ideas to solving this well are: Split your data retrieval from your display. class Model { public function getData() {} } class View { public function write() {} } $model = new Model(); $view = new View(); $view->write($model->getData()); Implement Model::getData: Loop to bu...

16:05
@Paul , Thank you :)
No problems.
@Trendee , you cannot understand them before you know the underlaying principle
Tek
Tek
^This. That's why I don't agree with pauls answer.
@Tek What part do you disagree with?
@Tek Feel free to reply to the question with a answer :)
16:06
@Tek , dont you know how to create replays in chat ?
you dont need to use "^this" .. actually it is confusing
Tek
Tek
@Paul I don't disagree with the CONTENT of your answer. I just disagree that, that is the right answer when he doesn't understand the concept of that architecture
@tereško You understood, it works fine
@Tek There is nothing magical to the architecture.
I suck at architecture .. I suck really bad at it.
Well. This has turned in to a fun exercise in navel-gazing ;)
@tereško Same goes for your spelling mistake, "we understood it, so it is fine"
16:08
I already explained to Trendee the reason for it.
Tek
Tek
@Paul Yeah but you're not seeing it from his point of view. It might not immediately make sense. It does to you because you know about it, but he doesn't
@Trendee lol nice one, I was going to say that but I couldn't word it right
@Chris Hey chris ^_^
Tek
Tek
@Trendee Yo
Err, oops
Hey
Tek
Tek
@Chris Damn your name
and mine
16:09
Damn is a cool name
Tek
Tek
:<
@Chris Not when there's two in the same room
@Tek (;
Apr 11 at 2:54, by tereško
@Chris sure ... write one .. then read the PoEAA book , and then write another one that is better
Tek
Tek
@Chris It's just too damn common. I seriously cannot be in a room without 3 or 4 of the same people with the same name
16:10
@Chris , have you begun reading that book ?
@tereško Nope. Haven't finished writing one yet either.
@Trendee , oh , excuse me , since english is my 4th language
@Tek On ID I'm actually Christopher, but who cares about that anyway.
Tek
Tek
@Chris well, I guess I'm in the same boat... Mine's tian but w/e :p
Tian is a cool name (First time hearing it)
16:12
@tereško Yeah me too, html, css, php, englush.
Tek
Tek
@Chris I meant chris-tian LOL
@Chris But nice one, might name my kid after it
@Trendee no , it is latvian , russian , german and english
@Tek I knew that! (not really)
in that order
Tek
Tek
@Chris I know ;]
16:13
@tereško Mines in rand() order, sorry php is my native. Not sure how to say rand() in englush.
I know a bit of Finnish, bit of Russian, bit of Spanish, a ton of Estonian and almost a ton of English.
posted on April 18, 2012 by TechPortal

posted on April 18, 2012 by TechPortal

posted on April 18, 2012 by TechPortal

posted on April 18, 2012 by TechPortal

We are down for maintenance, our apologies for the inconvenience.                                       

posted on April 18, 2012 by TechPortal

We are down for maintenance, our apologies for the inconvenience.                                       

posted on April 18, 2012 by TechPortal

We are down for maintenance, our apologies for the inconvenience.                                       

I actually want to learn French, but it's so darn complicated.
well probably russian is more complicated, but dunno.
I can't write any Russian what-so-ever, but I can swear in it and say basics things like "I have no idea", "I don't know"
16:19
ja ne znaju is not a bit of russian :P
It is.
not even tiny bit
I use "njet" way more tho'
When a Russian wants a smoke, when a Russian wants to beat me up, when a Russian says "that's my girl, get away from her".
A very useful word is "njet".
Who's mass flagging Feeds?
Could you please stop doing so?
I have no idea what your talking about @OctavianDamiean
16:23
njet me
Well, the person that is doing it knows quite well what I'm talking about.
cya all laters. going home.
goodnight all
@OctavianDamiean use @ if you know
@Paul gn
@webarto Thanks for the chat crash-course. If we >10kers would know we'd certainly do. ;)
16:36
@OctavianDamiean which reminds I need to get to 10k to see what's it like. Good luck chasing bad guy/girl. Kind of not helpful that you can't see who flagged it.
17:20
anyone know how to make the chrome bar not vertical? i want it at the bottom of the page like firefox, and thats where it was at first, but i accidentally pressed the undock button and now when i try to redock it always goes to the right side of the screen
nvm... its in settings and dock to the right was checked
flamewar aside, anyone have experience with HMVC + Sparks + CI2
17:35
what is "continues integration 2" ?
CodeIgniter
=P
He knew it, he just knows it sucks or thinks it does.
Yes, I can read minds.
lol
@Chris, which is why i said flame war aside.
It's @tereško, your out of luck.
lol
17:39
That being said, I have experience with CI (never knew anyone adds a version number after it), but not with HMVC nor Sparks.
@Mike , there is an IRC channel for code igniter , use that
yeah i do too, but no exp with HMVC..
this is more like a general chat room
cant use IRC @ work, but good tip.
Did I hear IRC?
17:40
@Mike , this does no work ? webchat.freenode.net
The ancient but never-gonna-die chat protocol?
"Your request was denied because of its content categorization: "Chat/Instant Messaging""
;)
Your network admin is an asshole.
indeed
its actually a team of them
@Mike , do you have access to remote linux/bsd box ?
17:41
and they're all assholes
lol
lol
well .. you are in this chatroom .. i am assuming that you are a developer
developer on the side
im an accountant by day!
pays tuition >_>
Me, too. I'm a criminal by day.
No, seriously .. I just started community service and it sucks .. it sucks real bad.
17:43
@Mike , in that case , make a question in the main site
@tereško i did, but my generation craves instant gratification ;)
screw this i nede a drink
Sam
Sam
does anyone know how gmail opens a user's chat window without being blocked by the browser's popup blocker?
Browser has a popup blocker? What's that, a plugin?
Sam
Sam
all modern browsers block popups unless the user initiates it
My Chrome must be broken then.
Sam
Sam
17:49
all major browsers, dude
I consider chrome a major browser.
ooo branch of CI integrates sparks
nice
But mine shows the popup thing only when I visit porn sites.
Don't judge me!
Sam
Sam
lol.
no judgment here......you are a normal dude
anyway, back to my question
I have no idea.
Sam
Sam
17:51
I understand gmail uses frames
Probably some JS trickery.
JS devil trickery
Sam
Sam
most likely......but I would like to know how it bypasses the browser's popup requirement
The same way it passed the safari tracking scandal .. illegally.
Sam
Sam
lol.....I don't think it's done illegally
17:58
Perhaps your right and I'm paranoid. Or I'm right and your not paranoid. OR! I have no idea wtf is going on in my brain.
In php, I know to get the date of "last sunday" i do it like: $start = date('Y-m-d 00:00:00', strtotime('last sunday', $today)); but how can i get the sunday before?
-7 ?
just a guess
Btw, I have good news and I have bad news. My blogging thingy starts to take shape. The bad news is, the code is crying for architecture.

« first day (550 days earlier)      last day (4624 days later) »