SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
4.
ReSharper
• Тысячи анализов и инспекций
• Сотни рефакторингов
• Крутые навигация и поиск
• Форматирование и чистка кода
• Кодогенерация на все случаи
• C#, VB.NET, ASP.NET, JS
• Сотни тысяч пользователей
6.
Project Rider = +
Windows
Mac OS
Linux
Первые 90% продукта было готово до официального начала разработки.
И вообще, мы уже 15 лет этот продукт пишем.
7.
Kotlin
• Java interoperability
• Null safety
• Unchecked exceptions
• Extension functions
• Operator overloading
• String interpolation
• Zero-overhead lambdas
• Pattern matching
• Smart casts Можно писать в старом Java-стиле
Можно писать в новом функциональном стиле
Можно легко делать DSL
9.
Волшебный протокол
Buzzwords:
• Less
• DRY
• Async
• Reactive
C# Model Kotlin Model
10.
Как это работает
*И не забыть про порядок
Пользователь Frontend (IDEA) Backend (R#)
Alt+Enter Запускаем “Alt+Enter” Action
Готовим список действий
Создаём ViewModel
Отправка
Alt+Enter
Показываем
Popup
Inline Variable
Отправка
Inline Variable Запускаем “Inline” Action
Меняем документ
Формируем Changes
Показываем
новый документ
Но вот только всё это работает в 10 потоков, а порядок иногда лучше бы сохранять.
11.
Дедупликация строк
Flag=0 Len=5 H E L L O
Flag=1 ID=#1 Len=5 R I D E R
Flag=2 ID=#1
Len=5 H E L L O
Было:
Стало:
Проблема:
По протоколу летает
много строк
Решение:
Дедупликация
Обыкновенная строчка (95%)
Дедуплицируем строчку (5%)
(Вероятностная)
Пересылаем только ID
13.
R# на Mono: Проблемы, Часть 1
• COM & WPF
Хозяйке на заметку
COM и WPF как-то не очень
работают на Linux и MacOS.
Их нужно выпилить,
но при этом не сломать R#.
14.
R# на Mono: Проблемы, Часть 2
• Unmanaged code
Хозяйке на заметку
Если структура не blittable,
то MS.NET и Mono могут
создавать разный
memory layout
15.
R# на Mono: Проблемы, Часть 3
• rn vs n
Хозяйке на заметку
R# использует rn, а IDEA — n
А ещё, был у нас Python-скрипт,
в конце строк которого оказывались r,
а в строках были пути,
вот и собирай после этого под
Windows…
16.
R# на Mono: Проблемы, Часть 4
• XBuild ≠ MSBuild
Хозяйке на заметку
XBuild при чтении csproj любит
заменять обратные слеши на
прямые.
Остерегайтесь регулярных
выражений прямо в csproj!
17.
R# на Mono: Очень много проблем
• ParseFloatLiteral и неожиданный вызов внутри
OleAut32Dll.VarR8FromStr
• Ограничение на длину имени файла в UnzipFileInfo
new StringBuilder(128) → new StringBuilder(1024)
• Пустой AppDomainSetup.ConfigurationFile
"Could not allocate -6 bytes"
• Guid.NewGuid внутри финалайзеров
RNGCryptoServiceProvider из-за которого вешался AppDomain
Поэтому у нас своё Mono с блекджеком и шлю
18.
CLR vs JVM: Примитивные типы
Тип CLR JVM
Guid MS GUID Structure RFC 4122
Int Short Short
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
19.
CLR vs JVM: Примитивные типы
Тип CLR JVM
Guid MS GUID Structure RFC 4122
Date 00:00:00 January 1, 0001 A.D.
1 tick = 100ns
00:00:00 January 1, 1970 A.D.
1 tick = 1ms
Int Short Short
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
20.
CLR vs JVM: Примитивные типы
Тип CLR JVM
Guid MS GUID Structure RFC 4122
Date 00:00:00 January 1, 0001 A.D.
1 tick = 100ns
00:00:00 January 1, 1970 A.D.
1 tick = 1ms
Byte [0..255] [-128..127]
Int Short Short
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
21.
CLR vs JVM: Примитивные типы
Тип CLR JVM
Guid MS GUID Structure RFC 4122
Date 00:00:00 January 1, 0001 A.D.
1 tick = 100ns
00:00:00 January 1, 1970 A.D.
1 tick = 1ms
Byte [0..255] [-128..127]
Uri > new Uri("http://code/ fest")
http://code/ fest
> URI("http://code/ fest")
java.net.URISyntaxException:
Illegal character
Int Short Short
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
Byte Byte Byte Byte Byte Byte Byte Byte
22.
Как будем тестировать?
А ещё у нас есть своя рекордилка тестов =)
23.
Rider — отличная .NET IDE
www.jetbrains.com/rider
@jetbrainsrider
24.
@andrey_akinshin
Андрей
Акиньшин
Software
Developer
JetBrains
Вопросы?
http://aakinshin.net/
andrey.akinshin@gmail.com
0 likes
Be the first to like this
Views
Total views
776
On SlideShare
0
From Embeds
0
Number of Embeds
6
You have now unlocked unlimited access to 20M+ documents!
Unlimited Reading
Learn faster and smarter from top experts
Unlimited Downloading
Download to take your learnings offline and on the go
You also get free access to Scribd!
Instant access to millions of ebooks, audiobooks, magazines, podcasts and more.
Read and listen offline with any device.
Free access to premium services like Tuneln, Mubi and more.