IT/Software career thread: Invert binary trees for dollars.

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
you can get the VS 2017 community version free.

Im sorry i meant 2017, I also resharp .. all the things!!
 

TJT

Mr. Poopybutthole
<Gold Donor>
40,889
102,592
you can get the VS 2017 community version free.

Im sorry i meant 2017, I also resharp .. all the things!!

I had to convince our department that it would increase our efficiency for like 6 months until he actually got the company to buy it. Shitty thing about big corporate is that you are completely barred from using open source tools of any kind unless it is explicitly approved.

I get real tired of it. But final interview this week so let's change that!
 
  • 1Like
Reactions: 1 user

Kharzette

Watcher of Overs
4,906
3,549
Ah yea 2017 has it. Basically you do like for or while or whatever and it tries to auto insert spaces in and around ( ) or {} and it totally kills my flow. They've done it for years but you could always turn all that off until 2013 or so.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
you mean like this?
Code:
using (HttpClient wc = new HttpClient())
while (true)

those spaces are awesome. sorry man. get with the times!!
 

Deathwing

<Bronze Donator>
16,366
7,363
Been playing around with VS Code for a bit. Is there a way to set relative directory paths? For example, if I have a file that imports a local module, I can set that up fine. But if I clone a branch, the absolute directory path is goofed up and it has no idea where that import is on the branch, even though they are the same file and same import.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
1541438725892.png


actually yo are right, those wont change the adding of a space when type while(true) and then you press enter. On the other hand, it is more awesome to have it separated!!
 

ShakyJake

<Donor>
7,617
19,227

alavaz

Trakanon Raider
2,001
713
Are you wanting it to stop inserting spaces altogether, or to auto insert a space between the statement and the opening parenthesis/brace as opposed to auto inputting a space after the opening parenthesis/brace?
 

Kharzette

Watcher of Overs
4,906
3,549
I just don't want it to auto anything except maybe indentation. I hate how it puts a closing brace or ) when I type the opener. Really bugs me.

But I'm really starting to get vs code. The new project format is great but I had to learn about it on blogs that I stumbled onto by accident.

I mean look at this:

XML:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x64\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <CodeAnalysisLogFile>bin\Debug\MeshLib.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    <OutputPath>bin\x64\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <CodeAnalysisLogFile>bin\Release\MeshLib.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
  </PropertyGroup>
  <PropertyGroup>
    <ProjectGuid>{D28619D5-2D2D-40A1-AC3C-3509B7B89033}</ProjectGuid>
  </PropertyGroup>
  <PropertyGroup>
    <OutputType>Library</OutputType>
  </PropertyGroup>
  <PropertyGroup>
    <StartupObject />
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <CodeAnalysisLogFile>bin\Debug\MeshLib.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <Optimize>true</Optimize>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <CodeAnalysisLogFile>bin\Release\MeshLib.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Anim.cs" />
    <Compile Include="AnimLib.cs" />
    <Compile Include="Character.cs" />
    <Compile Include="CharacterArch.cs" />
    <Compile Include="CommonPrims.cs" />
    <Compile Include="DrawCall.cs" />
    <Compile Include="EditorMesh.cs" />
    <Compile Include="IArch.cs" />
    <Compile Include="IndoorMesh.cs" />
    <Compile Include="KeyFrame.cs" />
    <Compile Include="Mesh.cs" />
    <Compile Include="MeshMaterial.cs" />
    <Compile Include="MeshPartStuff.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="ShadowHelper.cs" />
    <Compile Include="Skeleton.cs" />
    <Compile Include="Skin.cs" />
    <Compile Include="StaticArch.cs" />
    <Compile Include="StaticMesh.cs" />
    <Compile Include="SubAnim.cs" />
    <Compile Include="TransitionHelper.cs" />
    <Compile Include="VertexStructures.cs" />
    <Compile Include="VertexTypes.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\MaterialLib\MaterialLib.csproj">
      <Project>{CABCC4D8-8F21-4728-B317-28D5B500BEFB}</Project>
      <Name>MaterialLib</Name>
    </ProjectReference>
    <ProjectReference Include="..\UtilityLib\UtilityLib.csproj">
      <Project>{DE433DFE-411F-447E-9035-B8480FCFC7D1}</Project>
      <Name>UtilityLib</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Reference Include="SharpDX">
      <HintPath>$(SharpDXPackageBinDir)\SharpDX.dll</HintPath>
    </Reference>
    <Reference Include="SharpDX.Direct3D11">
      <HintPath>$(SharpDXPackageBinDir)\SharpDX.Direct3D11.dll</HintPath>
    </Reference>
    <Reference Include="SharpDX.DXGI">
      <HintPath>$(SharpDXPackageBinDir)\SharpDX.DXGI.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="..\..\Games\packages\SharpDX.2.6.3\build\SharpDX.targets" Condition="Exists('..\..\Games\packages\SharpDX.2.6.3\build\SharpDX.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\..\Games\packages\SharpDX.2.6.3\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Games\packages\SharpDX.2.6.3\build\SharpDX.targets'))" />
  </Target>
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
</Project>

Becomes:
XML:
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net46</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
      <PackageReference Include="SharpDX" Version="4.2.0" />
      <PackageReference Include="SharpDX.DXGI" Version="4.2.0" />
      <PackageReference Include="SharpDX.Direct3D11" Version="4.2.0" />
    </ItemGroup>
    <ItemGroup>
      <ProjectReference Include="..\MaterialLib\MatLib.csproj"/>
      <ProjectReference Include="..\UtilityLib\UtilityLib.csproj"/>
    </ItemGroup>
</Project>

If it's that readable I don't mind hand editing. And honestly I had to hand edit stuff alot anyway when vs got confused about platforms and spewed all sorts of wierd configs everywhere.

Also really like how you can chain dependencies. I think in the old csproj you needed to have packages and references for the other extra reference's dependencies if I'm remembering right.

Oh and you don't need packages.config, just those PackageReference lines are enough for nuget to do its thing.
 
Last edited:

alavaz

Trakanon Raider
2,001
713
In VS2017 if I go to options > Text Editor > C# > General and uncheck automatic brace completion it works the way I think you want it to.

GSMHGYT.png
 

Kharzette

Watcher of Overs
4,906
3,549
That works! The only thing left that I can see is it puts a space between {}

The other brace thing mentioned in that bug I pasted was supposed to be in 15.7 and I'm on 15.8.9, maybe they rebroke it.

Anyhooooooooo, I'm getting fairly happy with vs code. But I'm sure I'll need visual studio someday in the future.

One of my lingering projects is a plugin for skyrim script extender and that has to have VS2008.
 

Kharzette

Watcher of Overs
4,906
3,549
Well it is all working now. I did run into some problems though.

I've got some ugly dependencies that stretch back into my sharpDX libs, so I went ahead and updated those and there were alot of breaking changes to texture loads. While working on those, intellisense was picking up false completions from somewhere. I suspect there were some old versions laying around somewhere. So it kept trying to complete old stuff, and you could even right click and go to definition and it would make a metadata thing for stuff that no longer exists.

Meanwhile everything compiled fine but the editor was showing all these horrible errors and underlines. This often caused problems where I'd type out like: type<tab>varname<tab>=new type(); And because intellisense didn't know type it would tab complete something totally unrelated, I'd back up and fix that, then every time I tab over to type the varname it would fight me and change it back.

I had to turn off tab completion. Then when typing the varname it thinks you are trying to do a type there so tries to change that too. It was a battle. Restarting a few times eventually fixed it.

When I eventually got it all building I had alot of fun with this:

BigFun.png


Hey you can't run this without 4.6.1, hey you can't install 4.6.1 because you already have it.

After alot of cursing and violence and several instances of the dotnet command crashing and zeroing out my solution file, I got it going. Debuggery is mine! I can type code relatively unannoyed as soon as I fix a couple more things I shall be back in the land of rapid iteration. :D

BTW, going into this, I had no idea what dotnet core was. I still don't really. To me dotnet is a shitty shared library that they update and break every few months. I think I am basically using dotnet core building with dotnet framework shtuff. I'm glad it works though, the project files are so much nicer now.
 

alavaz

Trakanon Raider
2,001
713
.NET is similar to Java where it compiles to an intermediate language that then gets JIT compiled on execution to machine code. That's why you can write .NET in multiple languages, it all compiles to the same intermediate language. Core is just the OS agnostic version of this and it lacks (obviously) a lot of the Windowsy stuff.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
.net core is the .net that run on linux. so you can deploy it to aws on a linux machine.

If you are going to deploy to IIS, no need to do core.
 

alavaz

Trakanon Raider
2,001
713
.net core is the .net that run on linux. so you can deploy it to aws on a linux machine.

If you are going to deploy to IIS, no need to do core.

I wouldn't necessarily say that. Maybe you want to deploy it to both IIS and Linux, in which case you would most definitely want to do core. Actually, unless you are writing an application very specifically for Windows, I see no reason to not do core. Freedom to have your application run on most major OSes (Linux, Mac, Windows) is pretty nice.
 

Lendarios

Trump's Staff
<Gold Donor>
19,360
-17,424
I wouldn't necessarily say that. Maybe you want to deploy it to both IIS and Linux, in which case you would most definitely want to do core. Actually, unless you are writing an application very specifically for Windows, I see no reason to not do core. Freedom to have your application run on most major OSes (Linux, Mac, Windows) is pretty nice.

I disagree, programming for the middle of road is very inefficient. There are much better library support for .net that there is for .net core.

For example you need to build a web scrapper and you want to use html agility to parse the html, there are less options available for it on .net core.

If you are going to aws and lamda, then yes, go to core. But if you make something middle of the road, you will have less functionality.

We have a super complex application on Azure, written on .net 4.61 that the higher up decided for no reason, to move to AWS. Really for no technical benefit / reason.

Now we have to move everything and some functionality will be lost, because of "reasons"