
bPHP
Members-
Posts
40 -
Joined
-
Last visited
Never
Everything posted by bPHP
-
Thanks for the great info Crayon, I'll research about it and tell you how it went! I was also thinking I might need some kind of business related degree... Maybe it would take me some work, 1 or 2 years but after that I'll probably jump away from something that has me so annoyed. I don't really understand why software engineers have to be programmers, why can't we start doing something else, maybe code from time to time... I don't get it
-
The company I work for didn't hire me because I can close/align my brackets correctly but because I can translate business needs into computer code in an efficient way using Algorithms, Design Patterns, and thorough tool knowledge (in everyday use and those available on the market). In short: they hired me for what I know not because they ran out of 5-year olds. Yeah that's what they hired me for also. But I rather design and talk to programmers, there has to be someone above you telling you what are those business needs. That's where I want to be, I know what you describe sounds pretty but I'm not having fun doing that all day. Sorry.
-
Thank you!!! I'll check that out. What kind of companies would need this, and how exactly do I get there? Any kind of studies needed, etc?
-
How can you tell programmers what to do if you suck at programming in the first place? Creating a successful/flexible system design is based upon your experiences as a programmer. The analyst should make it easier for programmers to implement and maintain not come up with something that only makes sense in the mind of an analyst. I don't suck at it, not being the best in the world and sucking are two very different things. I'm just tired of it, the long hours struggling with a piece of code to finally realize that closing bracket should have been in the line above... That tedious job doesn't need an engineer. I feel like studying software engineering to be programming 10 hours a day is like studying fashion and design to be a sewer.
-
Hi! I have a degree in Computer Science and Engineering and I have been a programmer since I graduated, around 2 years and a half ago. I really like programming, but I'm a bit tired of programming 10 hours a day for a standard wage. Plus, I'm not the best programmer in the world, and getting stuck with lines of code for hours is not what I want to do every day. I would like to know what is the best way to get away from this? I don't enjoy it anymore as much, I'd like to be in a technological company, but a bit above programmers, as an analyst maybe, talking about how things should be done and researching that, etc. I don't really know though what is that, if I need a master for it, but I want to step up in my career. Any suggestions on what can I do? Thank you!
-
Hi! I'm trying to do a time ranking in the best possible way. Let me explain a bit. I have a table of users. Each of these users have name, id and reputation. From a form, the user can request certain rankings: by country, by city, and I'm trying to make the user to be able to select for example 'this year' ranking. Or 'this week'. That would organize the users according to the reputation in the last 7 days for example. Now, what is the best way to do this? Keep in mind that the number of users is as high as 100,000 and growing every day. Should I create a new table for week, year, month, and every x time update it? Any ideas or suggestions, I'm kind of lost on how can I achieve this in a clean way. Thank you!
-
Thanks! That worked! However, I have a new problem... I was using jQuery to make a form appear slowly, and since my positions were not absolute when the form appeared it pushed all the other divs down (making a nice effect)... Now it does not push them since they have absolute positions... Any ideas on how can I do this effect now? Thanks!
-
Hi! How can I do to avoid the movement and resizing of all divs when the user resizes his browser? I want that everything stays in the same place... Thanks!!!
-
Also... Any ideas on how to make a proper chat design? It is a 1-1 chat system, you get in, you chat with just one person, and then to talk to another person you have to close the conversation with this person and search for a new one... Any ideas on a good design, if I should keep all conversations in just one table, or if I should create tables for each pair of people... I don't really know how to design this optimally from the database part. Thanks!
-
Thanks... I'll try to modify that! What about the SQL operations per second? What if I had like 5 per second? Is that still a big number when I have 50 people connected? I'm not really sure how to know this and how to monitor it, I'm kind of a noob when it comes to MySQL. Thanks!
-
I don't see anything on the logs... People from the server told me I was using too many resources and my server was shut down. I talked to a systems guy and he said it was do to MySQL processes. The code is pretty big but I can tell you a bit how it works. I would say that on average there are 10 database operations per second per person chatting. 40 people would be 400 operations per second... Is this a lot for a 256MB VPS? How much would a dedicated server sustain? I would like some general info on this as well as some information to know if it is worth it to give a dedicated server a try. Thanks for any input and for reading this long message!
-
Hi! I just created a chat website, which is basically a MySQL based chat. I'm running it on a small 256MB VPS at inmotion hosting... My question is... Is this even possible? Today I had like 30 people chatting and the server crashed... I know I probably don't have it very optimized... I have my.conf for 150 concurrent connections. What suggestions can you give me to increase performance? Do I really need a dedicated server if I wan't to have a lot of people in this chat? Thanks!!!!!
-
Thanks for the link, I'll make a memcache version and see how it goes. About using a chat program, I think I rather use my own... I'm learning a lot doing this, plus I will be able to change anything whenever I want to fit the users needs. Thanks for all the answers.
-
Actually, I'm erasing every message after it was read by the other party. Conversation tables are always empty, then get one message, this message is read, and gets erased. It works fine like that but using MySQL. If I have 200 people chatting at the same time, then I will have to store a maximum of 400 items in memcache. Looks like memcache can do the trick... But what is the maximum number of elements? How can I know that memcache won't erase one message of one of the users to put another one? The php.net documentation seems to be really vague about this, I don't want any messages from the users to be lost.
-
It's going to have around 200 people chatting at the same time at all moments, maximum. It could grow rapidly though... Is it true that memcache is not that safe in terms of storing data? According to php.net:
-
Hi! I'm programming a website that includes a chat, and I would like to know whether it would be convenient to use MySQL or memcache for messages between the users. I do not need to store the conversation messages... I'm on a VPS... I guess I could change the Apache max mysql connections to around 100 or 200, but maybe would be best just to use memcache? Thanks for any input!
-
I'm trying to change my shortcut icon dynamically but it is not working. Firebug shows that the change was made, however the page does not change the icon. Here is what I have: if (updated === true) { if (loopingNum % 2 === 0) { document.title = 'You have updates __'; setIcon('../img/icon.png'); } else { document.title = 'You have updates _-'; setIcon('../img/icon2.png'); } loopingNum++;} My setIcon function: function setIcon(path) { var i, a; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("SHORTCUT ICON") != -1) { a.setAttribute('href', path); } } return null; } The title is changed dynamically but the icon does not change... What am I missing? Thanks!
-
I don't have any yet because my website is still in development. I've tried with 4 users and worked fine, but yes, it is a big load for the server. And yes, I have a notification that the other partner is writing. I just can't figure out how to do this in a neat way. Any ideas?
-
I know... I have it set to 100 because I want it to be faster than one second... In the tracking terminal one second still looks ridiculous. Yes it should send requests, but I've seen other chats and my firebug does not show constant requests. I'm trying to improve my performance as much as possible, I'm constantly sending requests, and each request makes a SELECT from the db... It works fine right now but I'm afraid of what is going to happen if I have 200-300 users all chatting at the same time with this design.
-
I setTimeout. It is something like this: mTimer = setTimeout('getChatText();',100); //Refresh chat text getChatText looks like this: function getChatText() { if (receiveReq.readyState == 4 || receiveReq.readyState == 0) { receiveReq.open("GET", 'chat.php', true); receiveReq.onreadystatechange = handleReceiveChat; receiveReq.send(null); } } Chat.php sends back a JSON string that my function handleReceiveChat processes appropriately.
-
Hi! I have a code in ajax that is constantly calling a php function to check a database. Even though the php only sends information when it needs to (when the database was updated) if I see my page in firebug, I can see that it is constantly creating requests. How can I avoid this? Is there anyway to have it more clean? Thanks!
-
Hi! How can I do a change in the html title so that, for example, when the user has my page minimized I can alert him/her that there is something new requiring his/her attention? For example in facebook when you are chatting and you minimize the window, if someone sends you a message the title is changed back and forth to call your attention... How is this done? I'm investigating but can't even find how to do it! Thanks!
-
I know where is php executed. But at the same time I know how to call a php function from javascript, something I'm doing on my code. However, my problem is that I would like to clean the user data when he leaves (stuff in the database), and I don't know how to do it. Is there any way that if he presses OK in the navigate away from page message box I can call that php function? Thanks!
-
Hi, I'm using the following code to check if the user wants to navigate away from my page: window.onbeforeunload = unloadMess; function unloadMess () { if (!desconectado) { if (!enviando) { mess = "Los cambios realizados no se guardarĂ¡n" return mess; } } } form.onsubmit = onSubmit; function onSubmit () { enviando = true; } However, I do not know where to add something I want to do if he navigates away. I need to call a function that calls a php if the user leaves. I'm trying the following: window.onunload = limpiar; limpiar() { phpFunc('bye'); } But it is not working... Any ideas? Thanks!
-
How can I make my website hide the php extensions? Even more, how can I make it not show anything besides the main url all the time? For example, www.test.com, I want that to be the url at all times, no matter what file the user is viewing. I'm working on a VPS using cpanel, and I don't know if this is possible without the need of asking for root access. Thanks in advance!