Search Results

Search found 15698 results on 628 pages for 'keep alive'.

Page 100/628 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Bullet Physics - Casting a ray straight down from a rigid body (first person camera)

    - by Hydrocity
    I've implemented a first person camera using Bullet--it's a rigid body with a capsule shape. I've only been using Bullet for a few days and physics engines are new to me. I use btRigidBody::setLinearVelocity() to move it and it collides perfectly with the world. The only problem is the Y-value moves freely, which I temporarily solved by setting the Y-value of the translation vector to zero before the body is moved. This works for all cases except when falling from a height. When the body drops off a tall object, you can still glide around since the translate vector's Y-value is being set to zero, until you stop moving and fall to the ground (the velocity is only set when moving). So to solve this I would like to try casting a ray down from the body to determine the Y-value of the world, and checking the difference between that value and the Y-value of the camera body, and disable or slow down movement if the difference is large enough. I'm a bit stuck on simply casting a ray and determining the Y-value of the world where it struck. I've implemented this callback: struct AllRayResultCallback : public btCollisionWorld::RayResultCallback{ AllRayResultCallback(const btVector3& rayFromWorld, const btVector3& rayToWorld) : m_rayFromWorld(rayFromWorld), m_rayToWorld(rayToWorld), m_closestHitFraction(1.0){} btVector3 m_rayFromWorld; btVector3 m_rayToWorld; btVector3 m_hitNormalWorld; btVector3 m_hitPointWorld; float m_closestHitFraction; virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) { if(rayResult.m_hitFraction < m_closestHitFraction) m_closestHitFraction = rayResult.m_hitFraction; m_collisionObject = rayResult.m_collisionObject; if(normalInWorldSpace){ m_hitNormalWorld = rayResult.m_hitNormalLocal; } else{ m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis() * rayResult.m_hitNormalLocal; } m_hitPointWorld.setInterpolate3(m_rayFromWorld, m_rayToWorld, m_closestHitFraction); return 1.0f; } }; And in the movement function, I have this code: btVector3 from(pos.x, pos.y + 1000, pos.z); // pos is the camera's rigid body position btVector3 to(pos.x, 0, pos.z); // not sure if 0 is correct for Y AllRayResultCallback callback(from, to); Base::getSingletonPtr()->m_btWorld->rayTest(from, to, callback); So I have the callback.m_hitPointWorld vector, which seems to just show the position of the camera each frame. I've searched Google for examples of casting rays, as well as the Bullet documentation, and it's been hard to just find an example. An example is really all I need. Or perhaps there is some method in Bullet to keep the rigid body on the ground? I'm using Ogre3D as a rendering engine, and casting a ray down is quite straightforward with that, however I want to keep all the ray casting within Bullet for simplicity. Could anyone point me in the right direction? Thanks.

    Read the article

  • How to Freeze and Unfreeze Rows and Columns in Excel 2013

    - by Lori Kaufman
    If you are working on a large spreadsheet where all the rows and columns of data don’t fit on the screen, it would be helpful to be able to keep the heading rows and columns stationary so you can scroll through the data. You can freeze rows and columns in your spreadsheet. To do so, select the cell above which and to the left of which you want to freeze the columns and rows. Click the View tab.    

    Read the article

  • Ignore certain packages from ppa

    - by Fraekkert
    I've been using Elementary Desktop for a while, but after the last update, Docky have broken. I've tried using the Docky stable ppa, but it is overridden by the Elementary ppa, as they provide a newer version of Docky. I would like to keep receiving updates to the Elementary theme, but I would also like to use the older version of Docky. Is there any way I can do this, or do I simply have to file a bug and wait?

    Read the article

  • Business Insight, IT Execution: 9 Project Management Tips

    - by Sylvie MacKenzie, PMP
    Excerpt from Profit Magazine - by David Rosenbaum When Marcos Baccetto was first asked to be the business-side project lead on Eaton Corporation’s Vehicle Group South America (VGSA) Oracle project, the operations services manager responsible for running manufacturing was, he confesses, “a little afraid” because of his lack of IT experience. Today, Baccetto calls the project “a fantastic experience,” and he is a true believer in the benefits of a close relationship between IT implementers and their line-of-business peers. Through his partnership with Jesiele Lima, then VGSA IT manager, Baccetto and Eaton’s South American operations team came to understand several important principles of business and IT. Here he shares nine tips managers should consider when working on an enterprise technology project. 1. Make it a business project, not an IT project. All levels of functional management must have ownership, responsibility, and accountability for the success of the implementation. 2. Share responsibility. Business owners should sign off on tests and data conversion. 3. Clean your data. Dedicating a team to improve core data quality prior to project launch can be a significant time-saver. 4. Select resources properly. Have functional people who can translate business needs to IT and can influence organizational change. 5. Manage scope. Follow project management methodologies and disciplines. 6. Adopt common processes, global solutions. Avoid customized, local solutions. The big-picture business goals can get lost in the details. 7. Implement processes prior to the go-live date. Change management can be key. Keep the workforce informed and train users in advance. 8. Define metrics milestones. Assume there will be a crisis during deployment. Having baseline metrics to compare against will help implementers keep their cool—and the project moving forward. 9. The sponsor’s commitment is critical. It is needed to support the truly difficult decisions.

    Read the article

  • TechEd 2010 Twitter Book Give Away

    - by Scott Dorman
    If you’re going to TechEd North America this year, Sams Publishing will be giving away 9 advanced reader copies. In order to win a copy, be sure to follow the InformIT Twitter account and the #TechEd hash tag. Sporadically throughout the day a tweet will be sent out stating that the first person who comes to the booth and mentions my book will get a copy. The give away will probably occur over multiple days, so be sure to keep an eye on Twitter. Technorati Tags: Books,Sams Teach Yourself C# 2010

    Read the article

  • want to change host account for google app email ?

    - by Sathyam Shivam Sundaram
    I have a standard ( Free ) Google app Email Service , From last 5 Months we are using this service. Our webiste was hosted on the Third Party Web Hosting Company. Nut Now iam planning to change my Web Hositing provider , but i want to keep my domian in the previous Hosting Company. Can Google App Allow this option of changing web hoster for the registred Domain in the Google App for Email Service. Is there any body done this ?

    Read the article

  • Authorize.net CIM or using the module's storage

    - by CQM
    this site is intended to allow users to sign up and pay for a service, they will be able to pay using Paypal and Authorize.net since I am using two different payment gateways, it makes me wonder where I want to keep the user information. Authorize.net offers CIM, but some users will pay with paypal therefore Authorize.net won't have all user's information Would the best solution then be to not use CIM and store everything within my member database module? for the record I am using OSE for Joomla for my subscriber service

    Read the article

  • Webcast Q&A: Qualcomm Provides a Seamless Experience for Customers with Oracle WebCenter

    - by kellsey.ruppel
    Last Thursday we had the second webcast in our WebCenter in Action webcast series, "Qualcomm Provides a Seamless Experience for Customers with Oracle WebCenter, where customer Michael Chander from Qualcomm and Vince Casarez & Gourav Goyal from Oracle Partner Keste shared how Oracle WebCenter is powering Qualcomm’s externally facing website and providing a seamless experience for their customers. In case you missed it, here's a recap of the Q&A.   Mike Chandler, Qualcomm Q: Did you run into any issues when integrating all of the different applications together?A: Definitely, our main challenges were in the area of user provisioning and security propagation, all the standard stuff you might expect when hooking up SSO for authentication and authorization. In addition, we spent several iterations getting the UI’s in sync. While everyone was given the same digital material to build too, each team interpreted and implemented it their own way. Initially as a user navigated, if you were looking for it, you could slight variations in color or font or width , stuff like that. So we had to pull all the developers responsible for the UI together and get pixel level agreement on a lot of things so we could ensure seamless transitions across applications. Q: What has been the biggest benefit your end users have seen?A: Wow, there have been several. An SSO enabled environment was huge a win for our users. The portal application that this replaced had not really been invested in by the business. With this project, we had full business participation and backing, and it really showed in some key areas like the shopping experience. For example, while ordering in the previous site, the items did not have any pictures or really usable descriptions. A tremendous amount of work was done to try and make the site more intuitive and user friendly. Site performance has also drastically improved thanks to new hardware, improved database design, and of course the fact that ADF has made great strides in runtime performance. Q: Was there any resistance internally when implementing the solution? If so, how did you overcome that?A: Within a large company, I’m sure there is always going to be competition for large projects, as there was here. Once we got through the technical analysis and settled on the technology choices, it was actually no resistance to implementing the solution. This project was fully driven by the business with the aim of long term growth. I can confidently say that the fact that this project was given the utmost importance by both the business and IT really help put down any resistance that you would typically see while implementing a new solution. Q: Given the performance, what do you estimate to be the top end capacity of the system? A:I think our top end capacity is really only limited by our hardware. I’m comfortable saying we could grow 10x on our current hardware, both in terms of transactions and users. We can easily spin up new JVM instances if needed. We already use less JVM’s than we had planned. In addition, ADF is doing a very good job with his connection pooling and application module pooling, so we see a very good ratio of users connected to the systems vs db connections, without impacting performace. Q: What's the overview or summary of feedback from the users interacting with the site?A: Feedback has been overwhelmingly positive from both the business and our customers. They’re very happy with the new SSO environment , the new LAF, and the performance of the site. Of course, it’s not all roses. No matter what, there are always going to be people that don’t like the layout or the color scheme, etc. By and large though, customers are happy and the business is happy. Q: Can you describe the impressions about the site before and after the project within Qualcomm?A: Before the project, the site worked and people were using it, but most people were not happy with it. It was slow and tended to be a bit tempermental, for example a user would perform a transaction and the system would throw and unexpected error. The user could back up and retry the steps and things would work fine, so why didn’t work the first time?. From a UI perspective, we’d hear comments like it looked like it was built by a high school student.  Vince Casarez & Gourav Goyal, Keste Q: Did you run into any obstacles when implementing the solution?A: It's interesting some people call them "obstacles" on this project we just called them "dependencies".  There were both technical and business related dependencies that we had to work out. Mike points out the SSO dependencies and the coordination and synchronization between the teams to have a seamless login experience and a seamless end user experience.  There was also a set of dependencies on the User Acceptance testing to make sure that everyone understood the use cases for how the system would be used.  With a branching into a new market and trying to match a simple user experience as many consumer sites have today, there was always a tendency for the team members to provide their suggestions on how things could be simpler.  But with all the work up front on the user design and getting the business driving this set of experiences, this minimized the downstream suggestions that tend to distract a team.  In this case, all the work up front allowed us to enumerate the "dependencies" and keep the distractions to a minimum. Q: Was there a lot of custom work that needed to be done for this particular solution?A: The focus for this particular solution was really on the custom processes. The interesting thing is that with the data flows and the integration with applications, there are some pre-built integrations, but realistically for the process flow, we had to build those. The framework and tooling we used made things easier so we didn’t have to implement core functionality, like transitioning from screen to screen or from flow to flow. The design feature of Task Flows really helped speed the development and keep the component infrastructure in line with the dynamic processes.  Task flows and other elements like Skins are core to the infrastructure or technology stack of Oracle. This then allowed the team to center the project focus around the business flows and use cases to meet the core requirements and keep the project on time. Q: What do you think were the keys to success for rolling out WebCenter?A:  The 5 main keys to success were: 1) Sponsorship from the whole organization around this project from senior executive agreement, business owners driving functionality, and IT development alignment; 2) Upfront design planning and use case definition to clearly define the project scope and requirements; 3) Focussed development and project management aligned with the top level goals and drivers; 4) User acceptance and usability testing along the way to identify potential issues and direct resolution of the issues;  and 5) Constant prioritization of the issues for development to fix by the business.  It also helps to have great team chemistry and really smart people working on the project. If you missed the webcast, be sure to catch the replay to see a live demonstration of WebCenter in action!  Qualcomm Provides a Seamless Experience for Customers with Oracle WebCenter from Oracle WebCenter

    Read the article

  • How to detect if an app was already installed before

    - by Dante
    How do software applications keep track of whether the user already installed the application before in it's Windows system? Say you install app X, trial version, remove it, then re install it, and when you run it again it detects you had already installed it before. If you uninstall and clean all registry information it shouldn't know you had already installed it before... Disclaimer: I'm not trying to "hack" any application, just thinking about how this is implemented.

    Read the article

  • ASP.NET Web Forms is bad, or what am I missing?

    - by iveqy
    Being a PHP guy myself I recently had to write a spider to an asp.net site. I was really surprised by the different approach to ajax and form-handling. For example, in the PHP sites I've worked with, a deletion of a database entry would be something like: GET delete.php?id=&confirm=yes and get a "success" back in some form (in the ajax case, probably a json reply). In this asp.net application you would instead post a form, including all inputs on the page, with a huge __VIEWSTATE and __EVENTVALIDATION. This would be more than 10 times as big as above. The reply would be the complete side again, with a footer containing some structured data for javascript to parse and display the result. Again, the whole page is sent, and then throwed away(?) since it's already displayed. Why not just send the footer with the data to parse (it's not json nor xml but a | separated list). I really can't see why you would design a system that way. Usually you've a fast client, and a somewhat fast server but a really slow connection. Why not keep the datatransfer to a minimum? Why those huge __VIEWSTATE and __EVENTVALIDATION? It seems that everything is done way to chatty and way to complicated. I really can't see the point and that usually means that I'm missing something. So please tell me, what are the reasons for this design and what benefits (and weaknesses) does it have? (Yes I know that __VIEWSTATE is used to tell what type of form-konfiguration should be sent back to the server. But WHY is this needed?) Please keep this discussion strictly technical and avoid flamewars. Update: Please excuse the somewhat rantish question. I tried to explain my view to be able to get a better answer. I am not saying that asp.net is bad, I am saying that I don't understand the meaning of those concepts. Usually that means that I've things to learn instead of the concepts beeing wrong. I appreciate the explanations about that "you don't have to do this way in asp.net", I'll read up on MVC and other .net technologies. However, there most be a reason for this site (the one I referred to) to be written the way it is. It's written by professionals for a big organisation with far more experience than what I've. Any explanation about their (possible) design choice would be welcome.

    Read the article

  • Make Your Ink Cartridges Last Longer

    The speed at which technology progresses is so fast it can be hard to keep up with new developments, changes and products. These days hardly anyone uses the traditional paper and pen to write things ... [Author: Kathryn Dawson - Computers and Internet - June 11, 2010]

    Read the article

  • Make the Taskbar Buttons Switch to the Last Active Window in Windows 7

    - by The Geek
    The new Windows 7 taskbar’s Aero Peek feature, with the live thumbnails of every window, is awesome… but sometimes you just want to be able to click the taskbar button and have the last open window show up instead. Here’s a quick hack to make it work better. To better understand the problem, imagine having nine windows of the same type open on your screen, but you are primarily working in just one of the windows at a time. So every time you want to switch back, you have to click the taskbar button, and then choose the one you are using from the list, which can be pretty annoying… Now if you know your Windows 7 shortcuts, you’d know that you can simply hold down the Ctrl key while clicking on the taskbar button, and the last window will show up. In fact, you can keep holding down the Ctrl key and keep clicking, and Windows will cycle through the open windows. It’s a useful shortcut, but hardly something you want to do every single time. Instead, we’ll use a quick registry hack to make the normal click switch to the last open window—if you still want to see the thumbnail list, just hover your mouse over the button for half a second to see the full list. Manual Registry Hack for Last Active Window Open up regedit.exe through the start menu search or run box, and then head down to the following registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced Once you’re there, create a new 32-bit DWORD value on the right hand side, give it the name LastActiveClick, and set the value to 1. Once you are done, it should look something like this: Once you are done, you’ll have to log off and back on, or you can kill Explorer.exe through Task Manager and re-open it. Download the Registry Hack Instead Since you probably don’t feel like registry hacking, we’ve provided you an easy downloadable version. You can simply download the file, extract it, and then double-click on the LastActiveClick.reg file. Once you are done, you’ll have to log off and back on, just like with the manual registry hack. Download LastActiveClick Registry Hack from howtogeek.com Similar Articles Productive Geek Tips Make the Windows 7 Taskbar Work More Like Windows XP or VistaStupid Geek Tricks: Select Multiple Windows on the TaskbarReorganize Your Taskbar Buttons and Tray Icons in XP/VistaKeyboard Ninja: Create a Hotkey to Switch to Your Open Outlook WindowTaskbar Eliminator Does What the Name Implies: Hides Your Windows Taskbar TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Gadfly is a cool Twitter/Silverlight app Enable DreamScene in Windows 7 Microsoft’s “How Do I ?” Videos Home Networks – How do they look like & the problems they cause Check Your IMAP Mail Offline In Thunderbird Follow Finder Finds You Twitter Users To Follow

    Read the article

  • Need help drawings planets in Java.

    - by d33j
    I am looking for help/links/notes/agorithms/URLs/examples on drawing/rendering spheres in pure Java (so that I can hopefully, one day, generate/render planets with various surfaces & atmospheres) So for the moment, i'd be pretty happy to be able to start off with just drawing a wireframed sphere(s). ps: I don't want to use external libraries like Java3D, JOGL or aftermarket engines like JMonkeyEngine, Would rather keep it as straight Java.

    Read the article

  • Silverlight 4 Twitter Client &ndash; Source Files

    - by Max
    Here you can download the source files this includes all the parts we have discussed and one more list feature which I am currently working on, its not fully finished. Will see you soon in my next post with the next part ready. I received a few emails, saying that my tutorial is good – Thanks for all your support. A few asked for source files, here it is. All your support gives me more reasons to keep blogging! Cheers!

    Read the article

  • Why should I not do a masters degree

    - by aurel
    I have left university on July 2010 where I studied web design (as we all know you learn more by your self but that’s not the issue at the moment). Since then I have not managed to find a job (apart from a one month work experience), from the way things are going, and by taking into account the fact that all my university friends are in the same situation, I don’t think that I am going to find a job soon (within the industry) Now as we all do, even though I don’t have a job, I am still working on personal projects and try to keep up to date (I don’t need a job or uni to do this) – but I am thinking, because there is not work available, would it be worth going back to uni for a master degree? I know I don’t need it and I know that is unlikely that I will learn anything important, as I believe in self learning, and in most cases it is a lot more effective (but I have to say I don’t mind going back to school) The only reason I am thinking of doing the master is, (and this is where I need your help): If it takes me a year to get a job, then on the interview, would the employer think “what the hell did this guy do since he left university” – now if I go to university that would solve this problem. Or I’m I making up a problem that does not exist Plus, I know that employers need examples of sites that I have been working on, at the moment I only have 3 (as when working on personal projects, where their is not time limit I tend drag things in order to get them perfect, and they never get perfect) – so by going back to uni, then this problem maybe solved I said all this as I have read a lot about the fact that you don’t need to have a masters degree to work on web design market (and I totally agree) but considering my concern, the question is should I do a masters course to avoid just spending hours in my room working and learning in my own (but that it would be hard to convince employers that I was really learning in my room) Maybe because I’m still young age 22 not that old anyway :), but I don’t have the “dream” of being rich, so if I were to tell the truth I don’t really care of the fact that I don’t have a job (at the moment), because regardless, I am working on what I love every day, but I know that in the future when I will need the job I may find it harder to get one, if I neglect doing so now Every time I ask a question that I’m not sure about, I keep going on and on, but I really hope you get what I am trying to get across. By the way the course that I am looking at for a masters says that it would teach me how to do these: e-commerce e-government e-science e-learning I don’t know any of them, a part from e-commerce Thanks

    Read the article

  • How to prevent Google from indexing non-domain URL of website?

    - by Gavin
    My webhost gives you two URLs for your website: the URL on your shared server, which is something like usr283725992783.webhost.com and your domain URL, which is www.example.com Google is indexing both of these URLs, but obviously I only want www.example.com to be indexed. I can't add "nofollow" tags to usr283725992783.webhost.com because that URL serves the same files as www.example.com. How can I only make Google not follow usr283725992783.webhost.com and keep following www.example.com?

    Read the article

  • How to leverage the internal HTTP endpoint available on Azure web roles?

    - by Alfredo Delsors
    Imagine you have a Web application using an in-memory collection that changes occasionally but is used very often. The collection gets loaded from storage on the Application_Start global.asax event and is updated whenever its content changes. If you want to deploy this application on Azure you need to keep in mind that more than one instance of the application can be running at any time and therefore you need to provide some mechanism to keep all instances informed with the latest changes. Because the communication through internal endpoints between Azure role instances is at no cost, a good solution can be maintaining the information on Azure Storage Tables, reading its contents on the Application_Start event and populating its changes to all other instances using the internal HTTP port available on Azure Web Roles. You need to follow these steps to leverage the internal HTTP endpoint available on Azure web roles to maintain all instances up to date. 1.   Define an internal HTTP endpoint in the Web Role properties, for example InternalHttpEndpoint   2.   Add a new WCF service to the Web Role, for example NotificationService.svc 3.   Disable multiple site bindings in web.config: <serviceHostingEnvironment multipleSiteBindingsEnabled="false"> 4.   Add a method on the new service to receive notifications from other role instances. namespace Service { [ServiceContract] public interface INotificationService { [OperationContract(IsOneWay = true)] void Notify(Information info); } } 5.   Declare a class that inherits from System.ServiceModel.Activation.ServiceHostFactory and override the method CreateServiceHost to host the internal endpoint. public class InternalServiceFactory : ServiceHostFactory { protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { var internalEndpointAddress = string.Format( "http://{0}/NotificationService.svc", RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["InternalHttpEndpoint"].IPEndpoint); ServiceHost host = new ServiceHost( typeof(NotificationService), new Uri(internalEndpointAddress)); BasicHttpBinding binding = new BasicHttpBinding(SecurityMode.None); host.AddServiceEndpoint( typeof(INotificationService), binding, internalEndpointAddress); return host; } } Note that you can use SecurityMode.None because the internal endpoint is private to the instances of the service. 6.   Edit the markup of the service right clicking the svc file and selecting "View markup" to add the new factory as the factory to be used to create the service <%@ ServiceHost Language="C#" Debug="true" Factory="Service.InternalServiceFactory" Service="Service.NotificationService" CodeBehind="NotificationService.svc.cs" %> 7.   Now you can notify changes to other instances using this code: var current = RoleEnvironment.CurrentRoleInstance; var endPoints = current.Role.Instances .Where(instance => instance != current) .Select(instance => instance.InstanceEndpoints["InternalHttpEndpoint"]); foreach (var ep in endPoints) { EndpointAddress address = new EndpointAddress( String.Format("http://{0}/NotificationService.svc", ep.IPEndpoint)); BasicHttpBinding binding = new BasicHttpBinding(SecurityMode.None); var factory = new ChannelFactory<INotificationService>(binding); INotificationService instance = factory.CreateChannel(address); instance.Notify(changedinfo); }

    Read the article

  • On-Site SEO 101 - Simple Tips to Help Improve Your Website Visibility

    Search Engine Optimization (SEO) is often perceived as impossible to understand by novice website owners and creators. While it is true that any website would benefit greatly from experienced, professional SEO services, many people simply cannot afford to keep an SEO on payroll on a consistent, month-to-month basis. For people in this category, all hope is not lost.

    Read the article

  • Make My Own Website - WordPress Plugin SI CAPTCHA Anti-Spam

    Computer-generated blog comments can be annoying and bothersome. Working to review these website or blog's comments and determine, which have been posted by a computer or a "bot" can be time-consuming and tedious. Here is a way how to keep your website clean, without unwanted automatic comments.

    Read the article

  • GUI for DirectX

    - by DeadMG
    I'm looking for a GUI library built on top of DirectX- preferably 9, but I can also do 11. I've looked at stuff like DXUT, but it's way too much for me- I'm only needing some UI controls which I would rather not write (and debug) myself, and their need to keep a C-compatible API is definitely a big downside. I'd rather look at UI libs that are designed to be integrated into an existing DirectX-based system, rather than forming the basis of a system. Any recommendations?

    Read the article

  • “It’s only test code…”

    - by Chris George
    “Let me hack this in, it’s only test code”, “Don’t worry about getting it reviewed, it’s only test code”, “It doesn’t have to be elegant or efficient, it’s only test code”… do these phrases sound familiar? Chances are if you’ve working with test automation, at one point or other you will have heard these phrases, you have probably even used them yourself! What is certain is that code written under this “it’s only test code” mantra will come back and bite you in the arse! I’ve recently encountered a case where a test was giving a false positive, therefore hiding a real product bug because that test code was very badly written. Firstly it was very difficult to understand what the test was actually trying to achieve let alone how it was doing it, and this complexity masked a simple logic error. These issues are real and they do happen. Let’s take a step back from this and look at what we are trying to do. We are writing test code that tests product code, and we do this to create a suite of tests that will help protect our software against regressions. This test code is making sure that the product behaves as it should by employing some sort of expected result verification. The simple cases of these are generally not a problem. However, automation allows us to explore more complex scenarios in many more permutations. As this complexity increases then so does the complexity of the test code. It is at this point that code which has not been architected properly will cause problems.   Keep your friends close… So, how do we make sure we are doing it right? The development teams I have worked on have always had Test Engineers working very closely with their Software Engineers. This is something that I have always tried to take full advantage of. They are coding experts! So run your ideas past them, ask for advice on how to structure your code, help you design your data structures. This may require a shift in your teams viewpoint, as contrary to this section title and folklore, Software Engineers are not actually the mortal enemy of Test Engineers. As time progresses, and test automation becomes more and more ingrained in what we do, the two roles are converging more than ever. Over the 16 years I have spent as a Test Engineer, I have seen the grey area between the two roles grow significantly larger. This serves to strengthen the relationship and common bond between the two roles which helps to make test code activities so much easier!   Pair for the win Possibly the best thing you could do to write good test code is to pair program on the task. This will serve a few purposes. you will get the benefit of the Software Engineers knowledge and experience the Software Engineer will gain knowledge on the testing process. Sharing the love is a wonderful thing! two pairs of eyes are always better than one… And so are two brains. Between the two of you, I will guarantee you will derive more useful test cases than if it was just one of you.   Code reviews Another policy which certainly pays dividends is the practice of code reviews. By having one of your peers review your code before you commit it serves two purposes. Firstly, it forces you to explain your code. Just the act of doing this will often pick up errors in your code. Secondly, it gets yet another pair of eyes on your code! I cannot stress enough how important code reviews are. The benefits they offer apply as much to product code as test code. In short, Software and Test Engineers should all be doing them! It can be extended even further by getting test code reviewed by a Software Engineer and a Test Engineer, and likewise product code. This serves to keep both functions in the loop with changes going on within your code base.   Learn from your devs I briefly touched on this earlier but I’d like to go into more detail here. Pairing with your Software Engineers when writing your test code is such an amazing opportunity to improve your coding skills. As I sit here writing this article waiting to be called into court for jury service, it reminds me that it takes a lot of patience to be a Test Engineer, almost as much as it takes to be a juror! However tempting it is to go rushing in and start writing your automated tests, resist that urge. Discuss what you want to achieve then talk through the approach you’re going to take. Then code it up together. I find it really enlightening to ask questions like ‘is there a better way to do this?’ Or ‘is this how you would code it?’ The latter question, especially, is where I learn the most. I’ve found that most Software Engineers will be reluctant to show you the ‘right way’ to code something when writing tests because they perceive the ‘right way’ to be too complicated for the Test Engineer (e.g. not mentioning LINQ and instead doing something verbose). So by asking how THEY would code it, it unleashes their true dev-ness and advanced code usually ensues! I would like to point out, however, that you don’t have to accept their method as the final answer. On numerous occasions I have opted for the more simple/verbose solution because I found the code written by the Software Engineer too advanced and therefore I would find it unreadable when I return to the code in a months’ time! Always keep the target audience in mind when writing clever code, and in my case that is mostly Test Engineers.  

    Read the article

  • Stop a rotating object at a specified angle?

    - by Krummelz
    I'm working in JavaScript with HTML5 and the canvas. I have an object which is rotating at a certain speed, and I need the object's rotation to slow down gradually and the front of the object to stop at a specified angle. (I'm using radians, not degrees.) I have a variable to keep track of the angle which the object is facing, as it rotates. How would I go about getting the object to come to rest, facing the direction I want it to?

    Read the article

  • Should I use JavaFx properties?

    - by Mike G
    I'm usually very careful to keep my Model, View, and Controller code separate. The thing is JavaFx properties are so convenient to bind them all together. The issue is that it makes my entire code design dependent on JavaFx, which I feel I should not being doing. I should be able to change the view without changing too much of the model and controller. So should I ignore the convenience of JavaFx properties, or should I embrace them and the fact that it reduces my codes flexibility.

    Read the article

  • Changing Ogre3D terrain lighting in real time

    - by lezebulon
    I'm looking at the Ogre 3D library and I'm browsing through some examples / tutorials. My question is about terrain. There are a few examples showing how great the terrain system is, but I think that the global illumination and shadows of the terrain have to be pre-computed, which kinda makes it impossible to integrate this with a day / night cycle. Is there a way to change the terrain light sources in real time? If so it is possible to do it and keep a decent FPS?

    Read the article

  • Editing /.config/dconf/user

    - by user86322
    I am having a problem with Gnome3 (actually, I have it set to fallback mode, or Gnome 2). I have two displays and I need an X screen (I used nvidia-xconfig and nvidia-settings to do this) for each screen. However, every time I either restart X or log in, Gnome seems to be adding the objects values under /gnome/gnome-panel/layouts (ex. first time I set the two separate X screens I had clock, then log out/in, there was clock and clock1 under objects, and then log out/in there were three, clock, clock1, clock2,.......log out/in, ............30 times....clock, clock1, clock2, ......clock 42.....!! The same thing goes for top-panels, menu-bars, etc.) After a while, I found out I could remove all those using the dconf-editor, going to /gnome/gnome-panel/layouts, removing all the repetitions under fields objects-id-list and top-id-list and leaving one value of each object. This is not a solution but at least allow me to keep using Linux without so much problem. However, the problem persists every time I restart X or log in. I now finally learned about "dconf" and where the user profile settings are located (~/.config/dconf/user) and one can use "dconf" to see the keys. In my case, I need to change/remove many keys (all those clocksX, workspace-X, menu-bar-X, etc., where goes from 1 to 42 and still counting) so it's really tedious and boring to be changing one by one using "dconf write". So I found "dconf dump", which actually allow me to dump everything into a .txt file and edit the file really quick (i.e, "dconf dump / >> dump_user.txt"). The problems? Two of them: How do I "load" back "dump_user.txt" I edited into the user profile? (I read somewhere there was a "dconf reload" but reload doesn't exist as a command under "dconf") How do I stop Gnome from keep adding more objects to my desktop environment every time I log in/restart X? NOTE: The problem doesn't occur when I set the displays to use TwinView feature (i.e., the desktop is extended/shared by both displays). However, for my case I need two separate X's. Any help/suggestion would be greatly appreciated. Thanks

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >