Search Results

Search found 68 results on 3 pages for 'lifestyle'.

Page 1/3 | 1 2 3  | Next Page >

  • Optimizing lifestyle and training

    - by Gabe
    I am a college freshman who has recently discovered a passion for computer science. Having had my first lick of formal python training last semester, I have cast aside my previously hedonist way of life and tunneled my sights on becoming the most rounded and proficient programmer I can be. I know that I'm taking strides in the right direction (I've stopped smoking, I've been exercising every day, I've taught myself C++ and OpenGL, and I've begun training in kung-fu and meditation), yet I am still finding myself struggling to achieve satisfactory results. I would like to be able to spend a good 3-4 hours every day burning through textbooks. I have the time cleared and the resources allocated. The problem lies in the logistics-- I have never taken anything seriously before. Recently I've realized that I am clueless when it comes to taking care of myself and gaining control of my mind, and it drastically hinders my productivity. My question is this: How can I learn to manage my time and take care of myself such that I can spend the maximum amount of time every day studying with steady concentration? Personal tricks would be key here: techniques you use to get yourself to sleep, a diet that yields focus, even computer break stretching routines or active reading techniques. Anything you could think of here would be great. I was a low-life in high school and I have the drive to turn my life around, I'm just quite a bit behind in the way of good habits :)

    Read the article

  • What's one change in your lifestyle that positively affected your work and health?

    - by pbrodka
    We know that working many hours in front of computers gives us many bad and unhealthy habits, bad health conditions and so on, which in the long term decrease our productivity. Did you make any big changes in your lifestyle that made a big improvement in your health and productivity? Please name one such activity - it could be change of diet, more sports, less coffee, change in your work environment.

    Read the article

  • How do you find local fellow programmers?

    - by Pepijn
    I'm a self-tought programmer living in a small town. Except for the occasional meetups at the other end of the country, I rarely talk face-to-face with other programmers. I'm well aware of the merits of pair programming, feedback, discussion with other programmers and all... What do you do to get in contact with other local programmers? p.s. If you live near Loenen (gld), Netherlands, I'd like to have contact ;)

    Read the article

  • Is there a website like this?

    - by Slawek
    Hi guys, because so much questions are closed here i was wondering if there is some website that's really about programmers< you know real programmers, that have a life not codemonkeys. For example i'd like to see what programmers around the world wear, maybe pictures. It's of course related to programming but i think community here is to strict to allow anything that has no "PHP" or "Java" in title. You know, some place where you can ask questions not only related to lines of code but to ... programmers :) For now this subsite feels more than .coding, not .programmers to be honest :) BTW: I saw there's life-style tag... maybe not all hope is lost...

    Read the article

  • As a code monkey, how to discuss programming with a guy who almost has a doctorate in computer science

    - by Peter Turner
    A friend of my wife's is coming over for dinner tonight and he is a lot smarter than me. What do we have in common, well... A Bachelor's in Computer Science, and that should be enough of a conversation starter. But he's nearly completed his doctoral studies and is light years ahead of me in his particular area, which I find fascinating but don't have any legit reason to care about (except for maybe a better way through heavy traffic - he's a combinatorics guy specializing in that I think) and I got married and had some kids and am a professional programmer for medical records software. We've got a lot in common, but there's a point where neither of us care or understand each other - although I really want to learn from him and I'm not certain he'd even want to talk about his work. So for all you doctors or code monkeys, what's a good conversation starter!

    Read the article

  • Before and After the Programmer Life [closed]

    - by Gio Borje
    How were people before and after becoming programmers through a black box? In a black box, the implementation is irrelevant; therefore, we focus on the input and output: High School Nerd -> becomeProgrammer() -> Manager (Person Before) -> (Person as Programmer) -> (New Person) (Person Before) -> (Person as Programmer) How are the typical lives of people before they became programmers? Why do people pursue life as a programmer? (Person as Programmer) -> (New Person) How has becoming a programmer changed people afterwards? Why quit being a programmer? Anecdotes would be nice. If many programmers have similar backgrounds and fates, do you think that there is some sort of stereotypical person that are destined to become programmers?

    Read the article

  • What incidentals do server maintenance people/devs need?

    - by SeniorShizzle
    I'm trying to put together a thank-you package for clients who are server-side developers and in charge of their company's servers and databases. Since I've never been in that line of work before, I would like to know what it is like. Get inside your heads, for instance. My first thought was (don't hate me) a few patch cables. I don't know if you guys actually need these often or anything. What are some similar things that you like or need for your lives at work. Small incidentals less than $10 are preferred, like Coffee or a notebook, screwdrivers. Et cetera.

    Read the article

  • Do you Kung Foo? [closed]

    - by Darknight
    As a programmer who also trains in martial arts (Wing Tsun + Escrima + Judo). I am really interested to know if there are other fellow programmers who also practice martial arts. Do you practice martial arts? or do you know of programmers who practice martial arts. Further question: Do you see any analogy between your art and programming. [Apologies for the terrible pun in the title :) but I do like it cheesy...]

    Read the article

  • Are there any downsides of 2 developers getting married ?

    - by simpson
    I remember that in my first year at college, the professor told us that his wife is also a software developer, and a few decades ago when there has been a tough period of 2-3 years in the software field they both had been unemployed and had experienced some hard times. Of course I am not asking about this economic downside, as it is a general conclusion for a family working in the same field, and is not related specifically to programming. I am asking about any other possible downsides of a family where both people are programmers. To all developers married to developers - I am not asking if it is "horrible" or something like that, of course it's not, just if there are any specific issues (all kinds of relationships has some specific issues, and at the same time are immune to others). And yes, I am asking about a male developer married to a female developer, I am clarifying to avoid jokes like "I believe that 2 developers can get married in some states" and so on :)

    Read the article

  • How can programming ability be used to help people in poverty?

    - by Matthew
    As a student studying Computer Science in college, I often hear from friends working on various humanitarian projects, and I want to do something myself. But it seems that programmers don't have as many obvious avenues to help out as, say, doctors or teachers. What are some ways in which programmers can put their talent to use for people in poverty. Disclaimer: I am not saying that programmers have some obligation to do this, merely that I want to. I apologize if this question is too subjective for this site--I am marking it community wiki just in case (edit: I can't figure out how to mark this as community wiki. Can someone help me out?).

    Read the article

  • Are there non-programming related activities akin to solving programming problems ?

    - by julien
    I'm talking about particular activities, for which you can draw parallels with the specific kind of reasonning needed when solving programming problems. Counter examples are activities that would help in almost any situation, like : take a shower or any other, somewhat passive activities, which are only helpful in triggering this sort of asynchronous problem solving our brain does exercise, because you brain simply works better when you're fit EDIT : It seems this question was quite misunderstood. I wasn't asking about what you can do when stuck on a problem but rather, what kind of activities you have in you spare time that you think help you, more or less directly, solving programing problems.

    Read the article

  • What do you do to make sure you take proper/enough breaks, while avoiding unwanted side-effects of break taking?

    - by blueberryfields
    preamble It seems to me that computer programmers are one of a select few groups of people who actually take pleasure from sitting in front of computers for long periods of time. Most people in other professions actively dislike their time at computers, and do their best to avoid it (so, I assume, they don't have problems taking breaks). At least for me, having external cues for taking breaks, and clear instructions on what to do with each break (stretch, go for a walk, close my eyes, look into a distance of preferably a few km and focus on faraway objects, etc...), is a must. So far, I've just been making up the breaks and tools to get them as I go along, based on what looks to be low-specificity information found on the net (generic stuff ala ergonomics advice for office staff). This has led to all sorts of side effects - loss of attention as I get distracted if I walk around, breaks in flow with alarm clocks interrupting my thoughts, and people around me assuming I'm low on work due to the frequency of my walking around compared to everyone else. /preamble tl;dr Taking breaks is important My internal break taking system doesn't work, and ad-hoc ones have unwanted side effects What do you do to make sure you take proper breaks? How do you avoid unwanted side-effects, such as getting distracted or interrupting flow or giving your co-workers the impression you're spending a lot of time goofing off?

    Read the article

  • My schoolmates are playing too much and talk loudly, what should I do ? report them ? [closed]

    - by jokoon
    I'm a in a private game programming school class (there are also 3D/art classes in the school), and at least half or two third of the 12 people in my class play at various games (Age of Empires, web games, online card games, etc). They are talking quite loudly on top of that, and I'm getting hard times trying to concentrate: it feels like I'm in a cybercafe full of teenagers. I don't know if I have Hyperacusis (http://en.wikipedia.org/wiki/Hyperacusis),

    Read the article

  • Working as a software developer in a small town [closed]

    - by James
    I'm thinking of moving back to a small town in the near future. Coming from a large city (Dallas), I'm worried about being able to find work as a developer. I've worked remotely for companies as a contractor before, but would prefer a full time position for health insurance. Has anyone successfully made a good career for themselves while living outside of a major city (the nearest big city will be Minneapolis, about 3 hours away)? If so, how did you do it and what steps could I take between now and then to maximize my chances for success?

    Read the article

  • Dropping the full-time high-pay gig - I need help choosing a smart path that I can rely on to produce enough to survive comfortably ($2,500 per month)

    - by Jeff V
    I have about 6 years of full time experience developing web applications and tools. I know perl, python, PHP, ruby, and a good deal of SQL and relational theory. I have never had to choose a self-employed path as I have always had full time work or a bank account (credit cards) to support a big project. I'm planning to move out of the country to an area that will not offer local employment, and need some advice on what to focus on. I want to move in no more than six months, I have enough savings to live for an additional six months, but I would like to conserve it as much as possible. I enjoy taking risks, so I'm not looking for discussion of whether this is a good idea or not. I want advice on the most reliable solution given my skill set. Some paths I'm considering: Learn objective-c and build quality Apple software. Develop subscription based web tools for SEO, or other Marketing applications Attempt to acquire freelance projects by developing a reputation within open source projects, freelancer.com, and other online communities The last time I left my job, I was building a startup (that went under), and missed out living in a beautiful place due to the amount of time I worked. I would like to work 30-40 hours per week max. I can dedicate 10-15 hours per week while at my current job to prepare and learn. A preemptive thanks for the advice...

    Read the article

  • How to react to an office harassment based on my profession ? [closed]

    - by bob from jersey
    A lot of my co-workers (not developers, people from the other departments) who are framing me in the classical "nerd" stereotype, and with that acting disturbing towards me. Of course they are not aggressive or anything, since we are in a work environment having rules on it's own, plus we are all grownups now, but they are on a "quite war" against me (not particularly against me, they are against all developers, but I am the only one who dares to speak about it). I hear names, "nerd", "geek", "cyborg", "outsider" and so on, it's really inappropriate. Of course, nothing is said in our faces, but, you know, "you hear things over". Also this general feeling of "them not liking us at all" can be sensed in the air all the time. And while it is not a problem for a few weeks, a larger duration of constant office harassment (going for months now), can be really annoying and can cause a serious drop in the development performance, which will (inevitably) lead to problems with the management (maybe getting me fired). I want to know, should I continue with my current defensive strategy (passively ignoring their inappropriate labels) or should I switch into a more aggressive maneuvers, like giving them logical reasons why their antisocial behavior should be banned?

    Read the article

  • Anti-depressant and programming: does it reduce your thinking and focusing abilities ?

    - by user12358
    I wanted to ask your opinion on anti-depressants, since I took them daily for 3 years now, but I can't be sure if I'm less perfomant with them or without, since I never withdrawed. I'm still at school at the age of 25, still having some motivation problems (for example I can't get used to do something at school if I don't think it will teach me something), but I'm quite motivated to work in the video-game field, since I have some personnal projects in mind. I know C++ programming etc, I'm still learning techniques, but do you think I should try more to do my project instead of just following the work I'm assigned to ? Have you had experience with depression or anti-depressants ? How did it affect your work ? Do you think that being depressed or half-depressed can improve creativity ? Do you feel it has affected the way you end up writing your algorithms ? EDITED

    Read the article

  • Anti-depressant and programming

    - by user12358
    I wanted to ask your opinion on anti-depressants, since I took them daily for 3 years now, but I can't be sure if I'm less perfomant with them or without, since I never withdrawed. I'm still at school at the age of 25, still having some motivation problems (for example I can't get used to do something at school if I don't think it will teach me something), but I'm quite motivated to work in the video-game field, since I have some personnal projects in mind. I know C++ programming etc, I'm still learning techniques, but do you think I should try more to do my project instead of just following the work I'm assigned to ? Have you had experience with depression or anti-depressants ? How did it affect your work ? Do you think that being depressed or half-depressed can improve creativity ?

    Read the article

  • When do married programmers find time to work?

    - by dave-keiture
    Hi people, Maybe my problem is unique (though I don't believe so), and probably I should go with it to the psychologist, but sinse I get married (~year ago) I feel that I don't have enough time to work anymore. For years I've been working at my day job doing regular stuff, and at nights I've been committing to the opensource projects, freelancing and self-educating. Now, I can't work at home at all, because once I start working, my wife either says that there're more important thing to do (walk out the dog, buy something in a grocery, etc.) or that I don't pay anough attention to her.. As a workaround, I've started getting up at 3-4AM in the morning to do the things I was usually doing nightly before. After a month of such schedule I feel myself totally crushed. So... 2 questions: Do you have the same problems, or I'm just a <..., who should say goodbye to programming, and start doing "really important things"? If you have the same problems, when do you find time to work? Maybe you know any cool lifehack or trick to spend at least some tome for doing the thing you like :) Best regards.

    Read the article

  • How do you keep a balance between working, training, health and family?

    - by Jim Burger
    One trend I see in the awesome developers I've met, is that they devote inordinate amounts of time to coding at the expense of (usually) their health. Personally, I also find it hard to motivate myself to keep healthy. Every now and again, I meet a fantastic coder who has it clocked; they are up to date with the latest dev news, have time to read about good programming practices, and to finish it off, have happy wives/husbands and families. How do you guys/gals manage it in the short 24 hours a day that we all have?

    Read the article

  • Setting up Inversion of Control (IoC) in ASP.NET MVC with Castle Windsor

    - by Lirik
    I'm going over Sanderson's Pro ASP.NET MVC Framework and in Chapter 4 he discusses Creating a Custom Controller Factory and it seems that the original method, AddComponentLifeStyle or AddComponentWithLifeStyle, used to register controllers is deprecated now: public class WindsorControllerFactory : DefaultControllerFactory { IWindsorContainer container; public WindsorControllerFactory() { container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle"))); // register all the controller types as transient var controllerTypes = from t in Assembly.GetExecutingAssembly().GetTypes() where typeof(IController).IsAssignableFrom(t) select t; //[Obsolete("Use Register(Component.For<I>().ImplementedBy<T>().Named(key).Lifestyle.Is(lifestyle)) instead.")] //IWindsorContainer AddComponentLifeStyle<I, T>(string key, LifestyleType lifestyle) where T : class; foreach (Type t in controllerTypes) { container.Register(Component.For<IController>().ImplementedBy<???>().Named(t.FullName).LifeStyle.Is(LifestyleType.Transient)); } } // Constructs the controller instance needed to service each request protected override IController GetControllerInstance(Type controllerType) { return (IController)container.Resolve(controllerType); } } The new suggestion is to use Register(Component.For<I>().ImplementedBy<T>().Named(key).Lifestyle.Is(lifestyle)), but I can't figure out how to present the implementing controller type in the ImplementedBy<???>() method. I tried ImplementedBy<t>() and ImplementedBy<typeof(t)>(), but I can't find the appropriate way to pass int he implementing type. Any ideas?

    Read the article

  • Problem with initializing a type with WinsdorContainer

    - by the_drow
    public ApplicationView(string[] args) { InitializeComponent(); string configFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log4net.config"); FileInfo configFileInfo = new FileInfo(configFilePath); XmlConfigurator.ConfigureAndWatch(configFileInfo); IConfigurationSource configSource = ConfigurationManager.GetSection("ActiveRecord") as IConfigurationSource; Assembly assembly = Assembly.Load("Danel.Nursing.Model"); ActiveRecordStarter.Initialize(assembly, configSource); WindsorContainer windsorContainer = ApplicationUtils.GetWindsorContainer(); windsorContainer.Kernel.AddComponentInstance<ApplicationView>(this); windsorContainer.Kernel.AddComponent(typeof(ApplicationController).Name, typeof(ApplicationController)); controller = windsorContainer.Resolve<ApplicationController>(); // exception is thrown here OnApplicationLoad(args); } The stack trace is this: Castle.MicroKernel.ComponentActivator.ComponentActivatorException was unhandled Message="ComponentActivator: could not instantiate Danel.Nursing.Scheduling.Actions.DataServices.NurseAbsenceDataService" Source="Castle.MicroKernel" StackTrace: at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, Object[] arguments, Type[] signature) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency(CreationContext context, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver parentResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context, Type[]& signature) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency(CreationContext context, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver parentResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context, Type[]& signature) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveServiceDependency(CreationContext context, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver parentResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context, Type[]& signature) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service) at Castle.MicroKernel.DefaultKernel.get_Item(Type service) at Castle.Windsor.WindsorContainer.Resolve(Type service) at Castle.Windsor.WindsorContainer.ResolveT at Danel.Nursing.Scheduling.ApplicationView..ctor(String[] args) in E:\Agile\Scheduling\Danel.Nursing.Scheduling\ApplicationView.cs:line 65 at Danel.Nursing.Scheduling.Program.Main(String[] args) in E:\Agile\Scheduling\Danel.Nursing.Scheduling\Program.cs:line 24 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.ArgumentNullException Message="Value cannot be null.\r\nParameter name: types" Source="mscorlib" ParamName="types" StackTrace: at System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.FastCreateInstance(Type implType, Object[] arguments, Type[] signature) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, Object[] arguments, Type[] signature) InnerException: It actually says that the type that I'm trying to initialize does not exist, I think. This is the concreate type that it complains about: namespace Danel.Nursing.Scheduling.Actions.DataServices { using System; using Helpers; using Rhino.Commons; using Danel.Nursing.Model; using NHibernate.Expressions; using System.Collections.Generic; using DateUtil = Danel.Nursing.Scheduling.Actions.Helpers.DateUtil; using Danel.Nursing.Scheduling.Actions.DataServices.Interfaces; public class NurseAbsenceDataService : AbstractDataService<NurseAbsence>, INurseAbsenceDataService { NurseAbsenceDataService(IRepository<NurseAbsence> repository) : base(repository) { } //... } } The AbstractDataService only holds the IRepository for now. Anyone got an idea why the exception is thrown?

    Read the article

  • castle PerRequestLifestyle not recognize

    - by Herman
    Hi all, New to Castle/Windsor, please bear with me. I am currently using the framework System.Web.Mvc.Extensibility and in its start up code, it registered HttpContextBase like the following: container.Register(Component.For<HttpContextBase>().LifeStyle.Transient.UsingFactoryMethod(() => new HttpContextWrapper(HttpContext.Current))); What I wanted to do is to change the behavior and change the lifestyle of httpContextBase to be PerWebRequest. so I have change the code to the following: container.Register(Component.For<HttpContextBase>().LifeStyle.PerWebRequest.UsingFactoryMethod(() => new HttpContextWrapper(HttpContext.Current))); However, when I do this, I got the following error: System.Configuration.ConfigurationErrorsException: Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule Add '<add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.MicroKernel" />' to the <httpModules> section on your web.config which I did under <system.web> and <system.webServer>, however, I am still getting the same error. Any hints? Thanks in advance.

    Read the article

  • count number of business that belongs to subcategory in doctrine

    - by Ibrahim Azhar Armar
    this is follow up of this question. count number of foreign keys i am using doctrine 1.2 and i want to count the number of business that belongs to subcategory. following are the mysql tables. 1.fi_category +----+-----------------+-----------------+ | id | name | slug | +----+-----------------+-----------------+ 2.fi_subcategory +----+-----------------+-----------------+-------------+ | id | name | slug | category_id | +----+-----------------+-----------------+-------------+ 3.fi_business_subcategory +----+-------------+----------------+ | id | business_id | subcategory_id | +----+-------------+----------------+ i am using this DQL. $q = Doctrine_Query::create() ->select('c.name, c.slug, sc.name, sc.slug') ->from('Model_Category c') ->leftJoin('c.Subcategory sc') ->leftJoin('sc.BusinessSubcategory bsc'); which gives me something like this. Array ( [0] => Array ( [id] => 1 [name] => Entertainment & Lifestyle [slug] => entertainment-lifestyle [Subcategory] => Array ( [0] => Array ( [id] => 1 [name] => Arts and Crafts [slug] => arts-and-crafts ) [1] => Array ( [id] => 2 [name] => Family [slug] => family ) [2] => Array ( [id] => 3 [name] => Fashion [slug] => fashion ) ) ) ) i am looking to fetch the number of business, i.e the returned result should be something like this depending on the business it belongs. Array ( [0] => Array ( [id] => 1 [name] => Entertainment & Lifestyle [slug] => entertainment-lifestyle [Subcategory] => Array ( [0] => Array ( [id] => 1 [name] => Arts and Crafts [slug] => arts-and-crafts [business_count] => 35 ) [1] => Array ( [id] => 2 [name] => Family [slug] => family [business_count] => 10 ) [2] => Array ( [id] => 3 [name] => Fashion [slug] => fashion [business_count] => 27 ) ) ) ) tried various ways using DQL, but nothing seems to work out. any idea how should i go with what i want?

    Read the article

  • pooling with Windsor

    - by AlonEl
    I've tried out the pooling lifestyle with Windsor. Lets say I want multiple CustomerTasks to work with a pool of ILogger's. when i try resolving more times than maxPoolSize, new loggers keeps getting created. what am i missing and what exactly is the meaning of min and max pool size? the xml configuration i use is (demo code): <component id="customertasks" type="WindsorTest.CustomerTasks, WindsorTestCheck" lifestyle="transient" /> <component id="logger.console" service="WindsorTest.ILogger, WindsorTestCheck" type="WindsorTest.ConsoleLogger, WindsorTestCheck" lifestyle="pooled" initialPoolSize="2" maxPoolSize="5" /> Code is: public interface ILogger { void Log(string message); } public class ConsoleLogger : ILogger { private static int count = 0; public ConsoleLogger() { Console.WriteLine("Hello from constructor number:" + count); count++; } public void Log(string message) { Console.WriteLine(message); } } public class CustomerTasks { private readonly ILogger logger; public CustomerTasks(ILogger logger) { this.logger = logger; } public void SaveCustomer() { logger.Log("Saved customer"); } }

    Read the article

1 2 3  | Next Page >