Showing posts with label lion. Show all posts
Showing posts with label lion. Show all posts

Wednesday, July 25, 2012

Sharing a keyboard and Mouse between a Mac and PC

My main development box is a beefy dual screen PC. I do a lot of Mac work too. I test all our WebStart Java based code on the Mac to make sure controls are sized correctly, accelerator keys work as intended etc. That is all done with IntelliJ. I also write all the mobile code for iOS devices via Xcode and Android devices via Eclipse meaning I switch around a lot.

I tried VNC for a few days but ran into too many short comings. I have the Mac hooked up to my second LCD and switching video inputs is easy enough but hauling over the mouse and keyboard was annoying.

Yesterday over lunch I picked up a KVM at Microcenter. Box listed it at $29.99 but it rang up at $12.99 at the register. This is the TrendNet 2-port KVM Switch Kit TK-207K. Simple piece of hardware about the size of a deck of cards, just a little thicker and wider. I plugged in my USB generic mouse and MS Natural Keyboard 4000 to the device and plugged in the included outbound VGA (not using) / USB cables to the PC and the Mac. There is a 1 and 2 button on top of the box you press to toggle between machines. If I am on the PC I can hit Scroll Lock twice to go to the Mac but it does not appear to work from Mac back to PC, instead it dims the screen. Press the button is no big deal.

Both machines seem to be happy doing the switch. I can now run everything off the one mouse and keyboard which is making life much simpler. The other big advantage - the MacBook Pro only has two USB ports. I had the mouse in one and the keyboard in the other. I only need one for the KVM switch. This allows me to plug in a USB key, the iPad or whatever without pulling the keyboard.

Here are the minor issues:

1) On the Mac the main screen in the laptop screen. Everything wants to start on that screen even if a program is on the second screen it wants to show pop-ups / associated windows on the primary screen.

2) Just put Lion on the Mac so I could upgrade to latest Xcode. By default Lion does scrolling opposite of what Snow Leopard did. This makes it act like a iOS device which is fine when using touch pad but annoying when using mouse especially when you switch between it and Windows during the day. I turned off that setting.

3) Can't double scroll lock to switch back to PC side.

4) Wish I could run both my external LCD screens of the Mac even if it meant shutting down the laptop display. If that worked I could switch to just using the Mac for email, IM, IntelliJ for Java, Eclipse for Android and Xcode for iOS. The laptop display is OK but not positioned on my desk in a good spot right now. Once you get used to two 24" displays you don't want to go back to a 15" display.

Switched text editors


I had been using PSPad on the PC for the longest time. I then switched to NotePad++ and then after reading a number of glowing reviews of Sublime Text 2 I switched to that. Seems to work out nicely on both the PC and Mac. I had been struggling to find a good text editor on the Mac and was using JEdit. Using the same editor on both machines is very handy.

I tend to leave a text editor open on my machine at all times with multiple tabs going. Right now I have 5 tabs running - Work info, Android Notes, Charge Capture Mobile, Front Office, Tablet Calendar - one for each project I am in the middle of working on. During the day if someone stops by with a suggestion I type it right into the appropriate file. Maybe I come up with some wild idea - type it in. It is my way of keeping massive to do list, future notes, things to investigate and random thoughts all where I can find them easily.

The Mac will take over my Tablet Calendar notes as that is where I will be doing that work for the time being until I start the Android conversion. I also end up opening source code from other projects to steal code snippets so having a bonus text editor open is very handy. Its other big job is grep. Any text editor must have "find in files" to be useful to me.

Tuesday, July 24, 2012

Today's Apple Fun!

I need to test a new app on the iPad. iPad is 5.1x but I was on Snow Leopard and using Xcode 4.2. Can't run the iOS 5.1x SDK on this platform. I got Lion ready to go finally. Had to buy a new larger USB key so I picked up a $9 16GB at Microcenter over lunch.

Run disk tools to create Lion installer on USB key
Lion install went smoothly.
Run Xcode, tells me it is too old. Drag it to trash and it crashes.
Install updates to Lion amounting to 1.84g of download and install.
Still wants to install iTunes update but it fails on two attempts - give up on that.
Try to install free application from App Store - Xcode for Lion.
Wants credit card information, nope, not on a shared work laptop.
Look on web and find you can set up your account under iCloud without credit card info.
Attempt to do that but it wants to verify email first.
Don't appear to be getting email to confirm.
Finally realize it came to my personal account, I have gone round and round with Apple over this and they can't fix it - I log in with my work email but can't associate my work email account to the Apple account.
Confirm iCloud email via link click and login on my PC to Apple website
Ask iCloud to try again but it fails.
Close iCloud.
Open iCloud
iCloud is now happy so I click into manage account and it has a NONE option for credit card.
Update and save info.
Get multiple Apple emails to my personal email about the updates.
Open App Store.
Click on Free on Xcode in search results
Click on Install
Nothing happens
Click on Xcode to move from search results to full screen Xcode information
Click on Install
States Installing... but no status visible
Click on Purchases so I can monitor 1.53 download
Get another email from Apple saying I am downloading stuff and if I did not do that I should change my password. 
Ignore the email.

Run Xcode
Asks to uninstall old Xcode (guess the crash really did fail even though Xcode did not appear any longer in Applications)
Install old Xcode
Xcode runs some extra updates
Xcode up and running and I am able to run the App on my test iPad.
App runs great, scrolls around at full speed.

Try a couple of times to update iTunes and it continues to fail
Search on Google and it is suggested I download the DMG directly from Apple iTunes site
Download 170 meg of iTunes fun
Start installer - asks to close Xcode
Close Xcode - run installer
Installs just fine this time
Run Update checker - no updates found

System is now up to date, well as up to date as it can be with Mountain Lion ready in a few hours, Xcode runs and I can go back to app development. It was a bit of a winding road to get it all to happen though. Felt like way too many hoops to jump through to install the few things I needed to keep working.

UPDATE
Java is not installed by default with Lion. I am now downloading and installing Java so I can use AppCode and IntelliJ to do development. The keystrokes in Xcode are driving me nuts so I am going to switch to AppCode to see how that goes.

Wednesday, July 18, 2012

iOS developer woes

I am working on a new iPad program. It will allow an anesthesiologist at a facility to shift around the appointments of the providers in his group. Scheduled surgeries run late and there are a variety of other reasons to shift things about.

I got back into the CGContext side of programming under iOS and have the time margin, row headers and basic grid painting up and running. I wanted to see how this looked on the physical device before I got much farther along. Not allowed.

My iPad has been updated to iOS 5.1x. I am targeting iOS 5.0x but since the iPad has received the OTA updates it is past that. You are not allowed to get the iOS 5.1x SDK without Xcode 4.3.x and you are not allowed to get Xcode 4.3.x without Lion.

A couple of things stink here. Before Apple moved Xcode to the App Store you could download the DMG file and extract the iOS 5.1.x SDK files and use them with Xcode 4.2.x. That is no longer the case. In fact it appears you need to uninstall Xcode 4.2 before you install 4.3 as the new install directory is App Store based and not developer based like it was before.

Reviews of Xcode 4.3 are not glowing. Appears to be more crash happy than 4.2. Xcode has always been a flaky IDE but it is the only one in town. Yes you can use AppCode from IntelliJ but you still need Xcode installed for debugging and Interface Builder.

We need to upgrade to Lion but that is silly to do when Mountain Lion is due out in a week for $20. That means I need to wait but there will probably be an onslaught of others upgrading at the same time and it will not be a small download. Servers will be hit hard and heavy.

Xcode is a massive download at 1.43g but am I allowed to get that now? No, the App Store will not allow me to download that since I don't have Lion. I will have to fully upgrade before I can start the next monster download. This is going to take multiple days with me leaving the laptop on overnight for downloads. I can't queue things up either.

I think this will be my order of execution:
Uninstall Xcode 4.2
Upgrade to Mountain Lion
Install Xcode 4.3 from App Store
Hope all my projects still work, Mountain Lion is stable and Xcode is not super crash happy.

I could downgrade my iPad to iOS 5.0 to do my testing. That would work as a temp solution but it is not my iPad, it is used by QA and Technical Writing. Since the update is OTA and it will ask about it there is a very strong chance it will be updated again once it is off my desk for a few minutes.

I just hope nothing goes wrong during all these changes. I was using VNC on my PC to do Mac programming. It is my understanding that VNC is rather broken under Lion and I have not heard that they addressed that under Mountain Lion. My whole development environment is being turned upside down.